CDTK.Dynamics.SimulationBox2 module
- class CDTK.Dynamics.SimulationBox2.SimulationBox(**opts)[source]
Bases:
object
Bunch of atoms given by their cartesian coordinates.
Provides functionality to follow and analyze their classical dynamics
- add_observable_cntrl(ob)[source]
Add an observable object
OB objects provide observable properties for the molecule
- centerOfMassVelocity(**opts)[source]
Compute the velocity vector of the center of mass
Optional arguments: - stepnum: step number to consider - time: time to consider
** use time OR stepnum
- getKineticEnergy(**opts)[source]
Total kinetic energy of the system of particles
Optional arguments: - stepnum: step number to consider - time: time to consider
** use time OR stepnum
- getMomentum(**opts)[source]
Return total momentum vector (in [au])
Optional arguments: - indices: tuple with indices of a group of atoms - stepnum: step number to consider - time: time to consider
** use time OR stepnum
- getPotEnergy(**opts)[source]
Return potential energy (last time or stored) of the system (a.u.)
Optional arguments: - stepnum: step number to consider - time: time to consider
** use time OR stepnum
- getProperty2D_F(a_dir, a_funcX, a_filename, match=None)[source]
Return a 2D function of the system in block form, one block per time step
- Input arguments:
a_dir – directory with SimulationBox to be averaged a_filename – file where to store the data in table form
match – load only files matching a_match
- On return two arrays with:
time, func_val
- getPropertyTable(funcX=None, filename=None, usevel=False, **opts)[source]
Return property as a function of time
Works on a single SimulationBox instance
- Input arguments:
- funcX – (optional) function of the coordinates
may have more than one return value
filename – (optional) file where to store the data in table form usevel – (optional) if True, velocities are
used instead of positions
- on return the following arrays:
time, ekin, etrans, erot, evib, epot
- or
time, func_val
if funcX provided
- Options
finalTime – final time for property analysis over patial time domain
- getPropertyTableDir_E(a_dir, filename=None, match=None, **opts)[source]
Return ensemble averages of various energies
- Input arguments:
a_dir – directory with SimulationBox to be averaged
filename – (optional) file where to store the data in table form match – load only files matching a_match
- On return two arrays with:
time, func_val
- Options
finalTime – final time for property analysis over patial time domain
- getPropertyTableDir_F(a_dir, a_funcX, filename=None, match=None, usevel=False, **opts)[source]
Return an ensemble average property as a function of time
- Input arguments:
a_dir – directory with SimulationBox to be averaged a_funcX – function of the coordinates;
may have more than one return value
filename – (optional) file where to store the data in table form match – load only files matching match usevel – (optional) if True, velocities are used instead of positions
- On return two arrays with:
time, func_val
- Options
finalTime – final time for property analysis over patial time domain
- getRotationalEnergy(**opts)[source]
Rotational energy around the center of mass of the system of particles
Optional arguments: - stepnum: step number to consider - time: time to consider
** use time OR stepnum
- getTranslationalEnergy(**opts)[source]
Translational energy of the center of mass of the system of particles
Optional arguments: - stepnum: step number to consider - time: time to consider
** use time OR stepnum
- getVibrationalEnergy(**opts)[source]
Internal energy of the system of particles
Optional arguments: - stepnum: step number to consider - time: time to consider
** use time OR stepnum
- getVibrationalMomentum(**opts)[source]
Internal momentum of the system of particles
Optional arguments: - stepnum: step number to consider - time: time to consider
** use time OR stepnum
- loadDirectory(a_dir, match=None, **opts)[source]
Load all simulationbox objects stored in a directory
- Input arguments:
a_dir – directory where to load simbox objects from match – (optional) load only files that match “match”