Solvents
For methods that simulate the solvent exactly using classical trajectories, we have a generic infrastructure developed that can be automatically leveraged.
API
A generic solvent is encoded in the Solvents submodule:
QuantumDynamics.Solvents — Module
General description of different types of solvent.
The Solvents submodule defines a general Solvent type and an associated PhaseSpace type.
QuantumDynamics.Solvents.Solvent — Type
Abstract type for every solvent. Every solvent needs to implement Base.iterate, which returns the next sample of the phase-space, and a propagate_trajectory method which propagates a given phasespace point using classical mechanics.
QuantumDynamics.Solvents.PhaseSpace — Type
Abstract type for all phase spaces. Each Solvent has an associated phase-space.
Every solvent allows a phase-space point to be propagated under the internal forces that are present within the solvent and some external force (presumably coming from the system state) using
QuantumDynamics.Solvents.propagate_forced_bath — Function
propagate_forced_bath(bath::HarmonicBath, bps::HarmonicPhaseSpace,
f::Vector{Vector{Float64}}, dt::Real, ntimes::Integer)Propagate the bath subject to constant force f from the system.
This assumes the Hamiltonian of the oscillator is of the form $H = \frac{p^2}{2} + \frac{\omega^2 q^2}{2} - f q.$
propagate_forced_bath(bath::Solvent, state::PhaseSpace,
f::Vector{Vector{Float64}}, dt::Real,
ntimes::Integer)Propagate bath subject to constant force f from the system.
The Hamiltonian for a single bath is assumed to be of the form $H = \sum_i \frac{p_i^2}{2} + V(\{q_i\}) - f_i q_i$ where V(\{q_i\}) is the state-independent potential of the bath.
The time step of the propagation is given by dt, and the number of Verlet steps by ntimes.
The internal forces of the solvent itself can be calculated using
QuantumDynamics.Solvents.bath_force — Function
bath_force(bath::Solvent, state::PhaseSpace, n::Integer)Return the nth bath's (self-)force at the phase space point given by state.