CDTK.Dynamics.Trajectory_SH module

class CDTK.Dynamics.Trajectory_SH.Trajectory_SH(NDof=1, NStates=1, **opts)[source]

Bases: object

Surface Hopping trajectory

self.NDof – int, Number of degrees of freedom self.NStates – int, Number of electronic states 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.C – np.array complex, quantum coefficients 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,V,S,t)

self.f_NAC – function, provides NAC vector between states sI,sJ

dIJ = f(R,sI,sJ,t)

self.f_W – function, provides potential matrix for quantum evolution

Returns a diagonal matrix with adiabatic energies if purely adiabatic representation

self.f_D – function, provides the matrix of kinetic couplings

-i dIJ * V This matrix would be zero in a purely diabatic representation

self.f_DD – function, provides the matrix of kinetic couplings

-i dIJ * V This matrix provides couplings to an external system, for example an electric field, and therefore the transitions induced by do not conserve total energy. In practice, no velocity adjustments are performed when a transition takes place.

self.ES – electronic state for large hop electron dynamics

Notes on the supplied external functions:

f_EGradIn the usual Tully SH prescription the gradients of adibatic states

are used, for example from an electronic structure program. This is the usual prescription. The gradient is used exclusively for the evolution of the classical DOF.

f_NACNon-adiabatic coupling vector between a pair of electronic states.

It is used in the adjustment of the velocities after a quantum transition. f_NAC is _not_ used in the quantum evolution

f_WThe potential part of the electronic Hamiltonian (depends only on

nuclear positions). In the usual SH prescription this is a diagonal matrix with the adiabatic PES. The matrix provided will be used as it is (e.g. if a diabatic matrix is provided) unless differently specified.

f_DThe kinetic part of the electronic Hamiltonian (depends on positions

and velocities of the classical DOF). If a diabatic representation is provided this function may remain undefined.

init_log()[source]
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()[source]
log()[source]
log_to_file(**opts)[source]

Write all log information to a set of files

restart()[source]

Function to restart trajectory. Reads in all important values from log-files.

set_constraints(f_constraints)[source]
CDTK.Dynamics.Trajectory_SH.W11_TA(x, A=0.01, B=1.6, C=0.005, D=1.0)[source]
CDTK.Dynamics.Trajectory_SH.W11_TB(x, A=0.1, B=0.28, E0=0.05, C=0.015, D=0.06)[source]
CDTK.Dynamics.Trajectory_SH.W12_TA(x, A=0.01, B=1.6, C=0.005, D=1.0)[source]
CDTK.Dynamics.Trajectory_SH.W12_TB(x, A=0.1, B=0.28, E0=0.05, C=0.015, D=0.06)[source]
CDTK.Dynamics.Trajectory_SH.W22_TA(x, A=0.01, B=1.6, C=0.005, D=1.0)[source]
CDTK.Dynamics.Trajectory_SH.W22_TB(x, A=0.1, B=0.28, E0=0.05, C=0.015, D=0.06)[source]
CDTK.Dynamics.Trajectory_SH.W_TA(x, A=0.01, B=1.6, C=0.005, D=1.0)[source]
CDTK.Dynamics.Trajectory_SH.W_TB(x, A=0.1, B=0.28, E0=0.05, C=0.015, D=0.06)[source]
CDTK.Dynamics.Trajectory_SH.dot(K, L)[source]
CDTK.Dynamics.Trajectory_SH.dq_W11_TA(x, A=0.01, B=1.6, C=0.005, D=1.0)[source]
CDTK.Dynamics.Trajectory_SH.dq_W11_TB(x, A=0.1, B=0.28, E0=0.05, C=0.015, D=0.06)[source]
CDTK.Dynamics.Trajectory_SH.dq_W12_TA(x, A=0.01, B=1.6, C=0.005, D=1.0)[source]
CDTK.Dynamics.Trajectory_SH.dq_W12_TB(x, A=0.1, B=0.28, E0=0.05, C=0.015, D=0.06)[source]
CDTK.Dynamics.Trajectory_SH.dq_W22_TA(x, A=0.01, B=1.6, C=0.005, D=1.0)[source]
CDTK.Dynamics.Trajectory_SH.dq_W22_TB(x, A=0.1, B=0.28, E0=0.05, C=0.015, D=0.06)[source]
CDTK.Dynamics.Trajectory_SH.return_TullyA_traj(p=15.0)[source]

Return a trajectory object ready to be run for Tully’s model A

p – initial momentum in the positive direction

Trajectories start at R0 = -5

CDTK.Dynamics.Trajectory_SH.return_TullyB_traj(p=15.0)[source]

Return a trajectory object ready to be run for Tully’s model B

p – initial momentum in the positive direction

Trajectories start at R0 = -5

CDTK.Dynamics.Trajectory_SH.run_TullyA(p, ntraj=10, rseed=None, do_save=False, dt=10.0)[source]

Run a set of trajectories in Tully’s model A

p – incoming momentum (a.u.) ntraj – number of averaged trajectories rseed – int; seed to start random number generator

CDTK.Dynamics.Trajectory_SH.run_TullyA_Fig4(pmin=1.0, pmax=30.0, dp=1.0, ntraj=100, rseed=None, dt=10.0)[source]

Reproduce Fig. 4 in Tully’s 1990 paper Note: 2000 trajectories per momentum were used there

CDTK.Dynamics.Trajectory_SH.run_TullyB(E, ntraj=10, rseed=None, do_save=False, dt=10.0)[source]

Run a set of trajectories in Tully’s model B

E – incoming energy (a.u.) ntraj – number of averaged trajectories rseed – int; seed to start random number generator

CDTK.Dynamics.Trajectory_SH.run_TullyB_Fig5(lemin=-4.0, lemax=1.0, de=0.2, ntraj=2000, rseed=None, dt=10.0)[source]

Reproduce Fig. 5 in Tully’s 1990 paper Note: 2000 trajectories per momentum were used there