CDTK.Dynamics.IniConSampler module
- class CDTK.Dynamics.IniConSampler.IniConSampler(x0, funcE, **opts)[source]
Bases:
object
Samples initial conditions according to some statistical distribution
The object produces a bunch of files, each one containing a simulationbox object ready for propagation.
- burnin(**opts)[source]
Run the sampler without collecting data and adjust acceptance rate to target
- Options
- steps – number of steps to be taken in this burin phase (1000)
default: 1000
- increment – number of steps used to compute rate (50)
default: 50
- targetRate – target acceptance rate (0.4)
default: 0.4
- startnorm – initial norm of MonteCarlo steps
default: 0.1
- sample(**opts)[source]
Sample initial conditions and produce a list of files ready for use
- Options
stepnorm – norm of the MonteCarlo steps to be taken. NSAMPLES – int, number of samples to collect savefiles – bool, True, save new simulationbox objects to disk
- sampleR(**opts)[source]
Sample pure rotational initial conditions and produce a list of files ready for use
- Options
stepnorm – norm of the MonteCarlo steps to be taken. NSAMPLES – int, number of samples to collect savefiles – bool, True, save new simulationbox objects to disk
- sampleW(hessian, is_linear, modes, **opts)[source]
Sample Wigner initial conditions and produce a list of files ready for use
- Options
stepnorm – norm of the MonteCarlo steps to be taken. NSAMPLES – int, number of samples to collect savefiles – bool, True, save new simulationbox objects to disk
- sampleWigner(hessian, nmfreq, nmcoord, is_linear, m, is_1d=False, **opts)[source]
Sample Wigner initial conditions and produce a list of files ready for use. WARNING: THIS ONLY WORKS FOR 1D AND NEEDS TO BE UPDATED TO WORK FOR GENERAL CASES!!!
- Options.
NSAMPLES – int, number of samples to collect
- sampler_boltzmann(hessian=None, is_linear=None, modes=None, **opts)[source]
Sample initial conditions according to exp(-betaH) and produce a list of files ready for use
Options stepnorm – norm of the MonteCarlo steps to be taken. NSAMPLES – int, number of samples to collect savefiles – bool, True, save new simulationbox objects to disk
- CDTK.Dynamics.IniConSampler.bwd_fft(modes, nb)[source]
Transform from normal mode representation to bead representation using FFT.
Input: modes — current position/velocity values in normal mode representation nb — number of beads
Output: beads — positions/velocities in bead representation
- CDTK.Dynamics.IniConSampler.get_omega(x0, m, hessian, quantum_numbers=None, is_linear=False, modes=None)[source]
- CDTK.Dynamics.IniConSampler.rotation(x0, v0, phi=None)[source]
Isotropically sample one rotaional degree of freedom. Currently limited to rotations about the y-axis.
Input: x0 - list of input cartesian coordinates. v0 - list of input cartesian velocities. phi - optional list of given rotation angles; for testing purposes. Output: x - list of cartesian coordinates with added sampling. v - list of cartesian velocities rotated correctly.
- CDTK.Dynamics.IniConSampler.sampleRotation(xref, mass, temp, nsample, **opts)[source]
xref – reference geometry to sample rotations [[x1,y1,z1,],[x2,y2,z2,],…], a.u. mass – atom masses [m1,m2,…] assume a.u. temp – rotational temperature nsample – number of initial conditions to generate
- CDTK.Dynamics.IniConSampler.sampler_zero_point_energy(nsample, x0, m, hessian, quantum_numbers=None, is_linear=False, modes=None, rpmd=False)[source]
Sample independent normal modes according to quantum state energies
nsample – int, number of positions and velocities to generate x0 – np array, Cartesian coordinates of the reference geometry m – np array, Mass of each Cartesian coordinate hessian – np array, Hessian matrix quan… – list, quantum number of each mode increasing in energy is_linear – bool, True if linear (e.g. diatomic) system
- CDTK.Dynamics.IniConSampler.sampler_zero_point_energy_rpmd(nsample, x0, m, hessian, nb, beta, quantum_numbers=None, is_linear=False, modes=None)[source]
Sample independent normal modes according to quantum state energies
nsample – int, number of positions and velocities to generate x0 – np array, Cartesian coordinates of the reference geometry m – np array, Mass of each Cartesian coordinate hessian – np array, Hessian matrix quan… – list, quantum number of each mode increasing in energy is_linear – bool, True if linear (e.g. diatomic) system