CDTK.Dynamics.Trajectory module
- class CDTK.Dynamics.Trajectory.Trajectory(NDof=1, **opts)[source]
Bases:
object
Born-Oppenheimer trajectory on a single PES
self.NDof – int, Number of degrees of freedom self.R – np.array, positions self.V – np.array, velocities self.M – np.array float, masses self.dt – float, time-step for nuclear displacements self.rseed – int, default None, random seed to be set before 1st step self.NAME – Identification string of this trajectory. It is uniquely
generated at the initialization
- self.f_Egrad – function, provides energy and gradient on PES of state S
e,g = f(R,S)
self.ES – electronic state for large hop electron dynamics self.MM – MM region instance
- getCOM(atomlist, step=0)[source]
This function returns the center of mass of a set of atoms given by their index.
Input: atomlist — list of indices for the atoms
Output: center of mass
- integrate(tfinal=None, **opts)[source]
Integrate trajectory until tfinal
tfinal – final time to be reached by the integrator in steps of dt.
- **opts:
- dt – delta time used in this segment.
It is not a good idea to change this when continuing from a previous integration
- kinetic_energy(step=None, atomlist=None)[source]
Calculates the kinetic energy for a certain timestep and a given set of atoms.
Input: step — timestep for which kinetic energy should be calculated given as integer.
default is None and gives the current timestep
atomlist — list of indices for the atoms to be included, default is None and gives all.
Output: kin — kinetic energy