DynamicsMethods

NQCDynamics.DynamicsMethodsModule

This module contains functions and types necessary for performing nonadiabatic molecular dynamics.

Dynamics is performed using DifferentialEquations.jl. As such, this module is centered around the implementation of the functions necessary to integrate the dynamics.

For deterministic Hamiltonian methods, the central function is DynamicsMethods.motion!, which is the inplace form of the function to be integrated by DifferentialEquations.jl.

Further, methods that have discontinuities, such as surface hopping, use the callback interface provided by DifferentialEquations.jl.

source
NQCDynamics.DynamicsMethods.DynamicsVariablesMethod
DynamicsVariables(::AbstractSimulation, args...)

For each dynamics method this function is implemented to provide the variables for the dynamics in the appropriate format.

By default, DynamicsVariables is set up for the classical case and takes sim, v, r as arguments and returns a ComponentVector(v=v, r=r) which is used as a container for the velocities and positions during classical dynamics.

source
NQCDynamics.DynamicsMethods.motion!Function
motion!(du, u, sim, t)

As per DifferentialEquations.jl, this function is implemented for each method and defines the time derivatives of the DynamicalVariables.

We require that each implementation ensures du and u are subtypes of DynamicalVariables and sim subtypes AbstractSimulation.

source

ClassicalMethods

NQCDynamics.DynamicsMethods.ClassicalMethods.ClassicalType
Classical <: DynamicsMethods.Method

Type for performing classical molecular dynamics.

sim = Simulation{Classical}(Atoms(:H), Harmonic())

# output

Simulation{Classical}:
  Atoms{Float64}([:H], [1], [1837.4715941070515])
  Harmonic{Float64, Float64, Float64}
  m: Float64 1.0
  ω: Float64 1.0
  r₀: Float64 0.0
  dofs: Int64 1
source
NQCDynamics.DynamicsMethods.ClassicalMethods.LangevinType

Type for performing Langevin molecular dynamics.

using Unitful
sim = Simulation{Langevin}(Atoms(:H), Free(); γ=2.5, temperature=100u"K")

# output

Simulation{Langevin{Float64}}:
  Atoms{Float64}([:H], [1], [1837.4715941070515])
  Free(1)
source
NQCDynamics.DynamicsMethods.ClassicalMethods.MDEFType

\[dr = v dt\\ dv = -\Delta U/M dt - \Gamma v dt + \sigma \sqrt{2\Gamma} dW\]

$\Gamma$ is the friction tensor with units of inverse time. For thermal dynamics we set $\sigma = \sqrt{kT / M}$, where $T$ is the electronic temperature.

This is integrated using the BAOAB algorithm where the friction "O" step is performed in the tensor's eigenbasis. See src/dynamics/mdef_baoab.jl for details.

source
NQCDynamics.DynamicsMethods.ClassicalMethods.ThermalLangevinType

Type for performing Langevin ring polymer molecular dynamics.

Currently there are separate types for classical and ring polymer versions of Langevin dynamics but they should be combined. The reason they are not at the moment is that they use different integration algorithms and require slightly different fields.

using Unitful
RingPolymerSimulation{ThermalLangevin}(Atoms(:H), Free(), 10; γ=0.1, temperature=25u"K")

# output

RingPolymerSimulation{ThermalLangevin{Float64}}:
 
  Atoms{Float64}([:H], [1], [1837.4715941070515])
 
  Free(1)
  with 10 beads.
source

MappingVariableMethods

NQCDynamics.DynamicsMethods.MappingVariableMethods.NRPMDType
NRPMD{T} <: DynamicsMethods.Method

Nonadiabatic ring polymer molecular dynamics Uses Meyer-Miller-Stock-Thoss mapping variables for electronic degrees of freedom and ring polymer formalism for nuclear degrees of freedom.

RingPolymerSimulation{NRPMD}(Atoms(:H), DoubleWell(), 10)

# output

RingPolymerSimulation{NRPMD{Float64}}:
 
  Atoms{Float64}([:H], [1], [1837.4715941070515])
 
  DoubleWell{Int64, Int64, Int64, Int64}
  mass: Int64 1
  ω: Int64 1
  γ: Int64 1
  Δ: Int64 1
 
  with 10 beads.
source

SurfaceHoppingMethods

NQCDynamics.DynamicsMethods.SurfaceHoppingMethods.BCMEType
BCME{T} <: ClassicalMasterEquation

Extension to CME that incorporates broadening in the potential energy surfaces.

Note that we do not rescale the velocity as this is not mentioned only in the 2016 paper, not any of the later ones, so I presume they later decided not to do it and instead keep it the same as the original CME.

  • Dou, Subotnik, J. Chem. Phys. 144, 024116 (2016)
  • Dou, Subotnik, J. Phys. Chem. A, 24, 757-771 (2020)
source
NQCDynamics.DynamicsMethods.SurfaceHoppingMethods.SurfaceHoppingType

Abstract type for all surface hopping methods.

Surface hopping methods follow the structure set out in this file. The nuclear and electronic variables are propagated by the motion! function. The surface hopping procedure is handled by the HoppingCallback which uses the functions check_hop! and execute_hop! as its condition and affect!.

To add a new surface hopping scheme, you must create a new struct and define methods for evaluate_hopping_probability!, select_new_state, and rescale_velocity!.

See fssh.jl for an example implementation.

source
NQCDynamics.DynamicsUtils.set_quantum_derivative!Method

Propagation of electronic wave function happens according to Eq. (14) in the Shenvi, Tully paper (JCP 2009)

In IESH each electron is independent so we can loop through electrons and set the derivative one at a time, in the standard way for FSSH.

source

EhrenfestMethods

NQCDynamics.DynamicsMethods.EhrenfestMethods.EhrenfestType
Ehrenfest{T} <: AbstractEhrenfest

Ehrenfest molecular dynamics. Classical molecular dynamics where the force is derived by averaging contributions from multiple electronic states.

Simulation{Ehrenfest}(Atoms(:H), DoubleWell())

# output

Simulation{Ehrenfest{Float64}}:
  Atoms{Float64}([:H], [1], [1837.4715941070515])
  DoubleWell{Int64, Int64, Int64, Int64}
  mass: Int64 1
  ω: Int64 1
  γ: Int64 1
  Δ: Int64 1
source

IntegrationAlgorithms