NQCCalculators
NQCCalculators.NQCCalculators
— ModuleNQCCalculators
This module exists to bridge the gap between the NQCModels
and the NQCDynamics
.
Here, we provide functions and types for evaluating and storing quantities obtained from the NQCModels
. In addition any further manipulation of those quantities, such as computing eigenvalues, is included here.
Alongside this the module integrates ring polymer and classical dynamics to allow using the same models and functions for both. Specific ring polymer types are provided that have the extra fields and methods needed to evaluate the quantities for each bead.
NQCCalculators.quantities
— ConstantEach of the quantities specified here has functions: get_quantity(cache, r)
evaluate_quantity!(cache, r)
update_quantity!(cache, r)
The user should mostly access the getquantity!() function, or in rare circumstances the evaluatequantity!() fucntion. This will ensure quantities are correctly evaluated and cached accordingly.
The latter is called by the former and is where the details required to calculate the quantity are found.
NQCCalculators.Abstract_Cache
— Typetype: Abstract_Cache{M<:Model}
Top-level type for all caches.
Each concrete cache contains the Model
and the fields to store the quantities obtained from the model.
NQCCalculators.Abstract_ClassicalModel_Cache
— Typetype: Abstract_ClassicalModel_Cache{T, M<:Union{ClassicalModel, CompositeModel}} <: Abstract_Cache{T, M}
Type for storing quantities obtained from models defined by an analytic classical potentials. Examples include the harmonic potential (AdiabticModels.Harmonic), the morse potential (AdiabticModels.Morse) and the Darling-Holloway elbow model (AdiabticModels.DarlingHollowayElbow)
NQCCalculators.Abstract_CorrelatedQuantumModel_Cache
— Typetype: AbstractCorrelatedQuantumModelCache{T, M<:{CorrelatedQuantumModel}} <: Abstract_Cache{T, M}
Type for storing quantities obtained from models defined in terms of quantum Hamiltonians that parameterise a collection of interacting electrons and therefore cannot be solved with exact diagonalisation.
NQCCalculators.Abstract_QuantumModel_Cache
— Typetype: Abstract_QuantumModel_Cache{T, M} <: Abstract_Cache{T, M}
Abstract supertype for all quantum models that can be solved with exact diagonalisation.
NQCCalculators.ClassicalFrictionModel_Cache
— Typestruct: ClassicalFrictionModel_Cache{T,M} <: Abstract_ClassicalModel_Cache{T,M}
model::M
potential::Matrix{T}
derivative::Matrix{T},Matrix{T}}
friction::Matrix{T},Matrix{T}}
Struct of type AbstractClassicalModelCache, used to store quantities (of data type T
) generated by its input model M
.
NQCCalculators.ClassicalFrictionModel_Cache
— Methodfunction: ClassicalFrictionModel_Cache{T}(model::M, atoms::Integer) where {T,M<:Model}
Function which constructs and returns the struct of the same name. Takes as input an adiabatic friction model M
of the users choice and the number of atoms in the simulation.
NQCCalculators.ClassicalModel_Cache
— Typestruct: ClassicalModel_Cache{T,M} <: Abstract_ClassicalModel_Cache{T,M}
model::{ClassicalModel, CompositeModel}
potential::T,Matrix{T}}
derivative::Matrix{T},Matrix{T}}
Struct of type AbstractClassicalModelCache, used to store quantities (of data type T
) generated by its input model M
.
NQCCalculators.ClassicalModel_Cache
— Methodfunction: ClassicalModel_Cache{T}(model::M, atoms::Integer) where {T,M<:Model}
Function which constructs and returns the Struct of the same name. Takes as input an adiabatic model M
of the users choice and the number of atoms in the simulation
NQCCalculators.QuantumFrictionModel_Cache
— Typestruct: QuantumFrictionModel_Cache{T,M} <: Abstract_QuantumModel_Cache{T,M}
model::M
potential::Hermitian{T,Matrix{T}}
derivative::Matrix{Hermitian{T,Matrix{T}}}
eigen::LinearAlgebra.Eigen{T,T,Matrix{T},Vector{T}}
adiabatic_derivative::Matrix{Matrix{T}}
nonadiabatic_coupling::Matrix{Matrix{T}}
Struct of type AbstractQuantumModelCache, used to store quantities (of data types T
, S
and L
) generated by its input model M
.
NQCCalculators.QuantumFrictionModel_Cache
— Methodfunction: QuantumFrictionModel_Cache{T}(model::M, atoms::Integer) where {T,M<:Model}
Function which constructs and returns the Struct of the same name. Takes as input an adiabatic model M
of the users choice and the number of atoms in the simulation.
NQCCalculators.QuantumModel_Cache
— Typestruct: QuantumModel_Cache{T,M} <: Abstract_QuantumModel_Cache{T,M}
model::M
potential::Hermitian{T,Matrix{T}}
derivative::Matrix{Hermitian{T,Matrix{T}}}
eigen::LinearAlgebra.Eigen{T,T,Matrix{T},Vector{T}}
adiabatic_derivative::Matrix{Matrix{T}}
nonadiabatic_coupling::Matrix{Matrix{T}}
Struct of type AbstractQuantumModelCache, used to store quantities (of data types T
, S
and L
) generated by its input model M
.
NQCCalculators.QuantumModel_Cache
— Methodfunction: QuantumModel_Cache{T}(model::M, atoms::Integer) where {T,M<:Model}
Function which constructs and returns the Struct of the same name. Takes as input an adiabatic model M
of the users choice and the number of atoms in the simulation.
NQCCalculators.RingPolymer_ClassicalFrictionModel_Cache
— Typestruct: RingPolymer_ClassicalFrictionModel_Cache{T,M} <: Abstract_ClassicalModel_Cache{T,M}
model::M
potential::Vector{Matrix{T}}
derivative::Matrix{T}
friction::Matrix{T}
centroid::Matrix{T}
centroid_potential::Hermitian{T,Matrix{T}}
centroid_derivative::Matrix{Hermitian{T,Matrix{T}}}
centroid_eigen::LinearAlgebra.Eigen{T,T,Matrix{T},Vector{T}}
centroid_adiabatic_derivative::Matrix{Matrix{T}}
centroid_nonadiabatic_coupling::Matrix{Matrix{T}}
Struct of type AbstractClassicalModelCache, used to store quantities (of data type T
) generated by its input model M
.
NQCCalculators.RingPolymer_ClassicalFrictionModel_Cache
— Methodfunction: RingPolymer_ClassicalFrictionModel_Cache{T}(model::M, atoms::Integer, beads::Integer) where {T,M<:Model}
Function which constructs and returns the struct of the same name. Takes as input an adiabatic model M
of the users choice, the number of atoms in the simulation and the number of beads used in the ring polymer simulation.
NQCCalculators.RingPolymer_ClassicalModel_Cache
— Typestruct: RingPolymer_ClassicalModel_Cache{T,M} <: Abstract_ClassicalModel_Cache{T,M}
model::M
potential::Vector{Matrix{T}}
derivative::Array{T,3}
centroid::Matrix{T}
centroid_potential::Hermitian{T,Matrix{T}}
centroid_derivative::Matrix{Hermitian{T,Matrix{T}}}
Struct of type AbstractClassicalModelCache, used to store quantities (of data type T
) generated by its input model M
.
NQCCalculators.RingPolymer_ClassicalModel_Cache
— Methodfunction: RingPolymer_ClassicalModel_Cache{T}(model::M, atoms::Integer, beads::Integer) where {T,M<:Model}
Function which constructs and returns the Struct of the same name. Takes as input an adiabatic model M
of the users choice, the number of atoms in the simulation and the number of beads used in the ring polymer simulation.
NQCCalculators.RingPolymer_QuantumFrictionModel_Cache
— Typestruct: RingPolymer_QuantumFrictionModel_Cache{T,M,S,L} <: Abstract_QuantumModel_Cache{T,M}
model::M
potential::Hermitian{T,Matrix{T}}
derivative::Matrix{Hermitian{T,Matrix{T}}}
eigen::LinearAlgebra.Eigen{T,T,Matrix{T},Vector{T}}
adiabatic_derivative::Matrix{Matrix{T}}
nonadiabatic_coupling::Matrix{Matrix{T}}
traceless_potential::Vector{Hermitian{T,Matrix{T}}}
V̄::Vector{T}
traceless_derivative::Array{Hermitian{T,Matrix{T}},3}
D̄::Array{T,3}
traceless_adiabatic_derivative::Array{Matrix{T},3}
centroid::Matrix{T}
centroid_potential::Hermitian{T,Matrix{T}}
centroid_derivative::Matrix{Hermitian{T,Matrix{T}}}
centroid_eigen::LinearAlgebra.Eigen{T,T,Matrix{T},Vector{T}}
centroid_adiabatic_derivative::Matrix{Matrix{T}}
centroid_nonadiabatic_coupling::Matrix{Matrix{T}}
Struct of type AbstractQuantumModelCache, used to store quantities (of data types T
, S
and L
) generated by its input model M
.
NQCCalculators.RingPolymer_QuantumFrictionModel_Cache
— Methodfunction: RingPolymer_QuantumModel_Cache{T}(model::M, atoms::Integer, beads::Integer) where {T,M<:Model}
Function which constructs and returns the Struct of the same name. Takes as input an adiabatic model M
of the users choice, the number of atoms in the simulation and the number of beads used in the ring polymer simulation.
NQCCalculators.RingPolymer_QuantumModel_Cache
— Typestruct: RingPolymer_QuantumModel_Cache{T,M,S,L} <: Abstract_QuantumModel_Cache{T,M}
model::M
potential::Hermitian{T,Matrix{T}}
derivative::Matrix{Hermitian{T,Matrix{T}}}
eigen::LinearAlgebra.Eigen{T,T,Matrix{T},Vector{T}}
adiabatic_derivative::Matrix{Matrix{T}}
nonadiabatic_coupling::Matrix{Matrix{T}}
traceless_potential::Vector{Hermitian{T,Matrix{T}}}
V̄::Vector{T}
traceless_derivative::Array{Hermitian{T,Matrix{T}},3}
D̄::Array{T,3}
traceless_adiabatic_derivative::Array{Matrix{T},3}
centroid::Matrix{T}
centroid_potential::Hermitian{T,Matrix{T}}
centroid_derivative::Matrix{Hermitian{T,Matrix{T}}}
centroid_eigen::LinearAlgebra.Eigen{T,T,Matrix{T},Vector{T}}
centroid_adiabatic_derivative::Matrix{Matrix{T}}
centroid_nonadiabatic_coupling::Matrix{Matrix{T}}
Struct of type AbstractQuantumModelCache, used to store quantities (of data types T
, S
and L
) generated by its input model M
.
NQCCalculators.RingPolymer_QuantumModel_Cache
— Methodfunction: RingPolymer_QuantumModel_Cache{T}(model::M, atoms::Integer, beads::Integer) where {T,M<:Model}
Function which constructs and returns the Struct of the same name. Takes as input an adiabatic model M
of the users choice, the number of atoms in the simulation and the number of beads used in the ring polymer simulation.
NQCCalculators.evaluate_nonadiabatic_coupling
— MethodReferences
- HammesSchifferTullyJChemPhys10146571994 Eq. (32)
- SubotnikBellonziAnnuRevPhyschem673872016, section 2.3
NQCCalculators.fill_friction_tensor!
— Methodfunction: fill_friction_tensor!(Λ, friction_method, ∂H, eigen, r, μ)
Λ is a friction tensor that is populated by the function using the friction evaluation method passed into the function. ∂H, eigen, r, μ are variables used by the friction method to evaluate Λ.
NQCCalculators.fill_friction_tensor!
— Methodfunction: fill_friction_tensor!(Λ, friction_method, potential, derivative, r, μ)
Λ is a friction tensor that is populated by the function using the wide-band approximation. ∂H, eigen, r, μ are variables used by the friction method to evaluate Λ.
NQCCalculators.update_cache!
— Methodupdates all model properties stored in the cache for the current position r
.
Properties that may be updated:
Diabatic potential
Diabatic derivative
Eigenvalues and eigenvectors
Adiabatic derivative
Nonadiabatic coupling
Friction tensor
Centroid equivalents of the above
NQCCalculators.update_centroid!
— Methodupdates all model properties stored in the cache for the current centroid position r_centroid
.
Properties that may be updated:
- Diabatic potential
- Diabatic derivative
- Eigenvalues and eigenvectors
- Adiabatic derivative
- Nonadiabatic coupling
- Friction tensor
NQCCalculators.update_nonadiabatic_coupling!
— MethodReferences
- HammesSchifferTullyJChemPhys10146571994 Eq. (32)
- SubotnikBellonziAnnuRevPhyschem673872016, section 2.3