NQCCalculators

NQCCalculators.NQCCalculatorsModule
NQCCalculators

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.

source
NQCCalculators.quantitiesConstant

Each 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.

source
NQCCalculators.Abstract_CacheType
type: 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.

source
NQCCalculators.Abstract_ClassicalModel_CacheType
type: 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)

source
NQCCalculators.Abstract_CorrelatedQuantumModel_CacheType

type: 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.

source
NQCCalculators.ClassicalFrictionModel_CacheType
struct: 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.

source
NQCCalculators.ClassicalFrictionModel_CacheMethod
function: 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.

source
NQCCalculators.ClassicalModel_CacheType
struct: 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.

source
NQCCalculators.ClassicalModel_CacheMethod
function: 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

source
NQCCalculators.QuantumFrictionModel_CacheType
struct: 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.

source
NQCCalculators.QuantumFrictionModel_CacheMethod
function: 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.

source
NQCCalculators.QuantumModel_CacheType
struct: 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.

source
NQCCalculators.QuantumModel_CacheMethod
function: 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.

source
NQCCalculators.RingPolymer_ClassicalFrictionModel_CacheType
struct: 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.

source
NQCCalculators.RingPolymer_ClassicalFrictionModel_CacheMethod
function: 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.

source
NQCCalculators.RingPolymer_ClassicalModel_CacheType
struct: 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.

source
NQCCalculators.RingPolymer_ClassicalModel_CacheMethod
function: 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.

source
NQCCalculators.RingPolymer_QuantumFrictionModel_CacheType
struct: 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.

source
NQCCalculators.RingPolymer_QuantumFrictionModel_CacheMethod
function: 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.

source
NQCCalculators.RingPolymer_QuantumModel_CacheType
struct: 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.

source
NQCCalculators.RingPolymer_QuantumModel_CacheMethod
function: 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.

source
NQCCalculators.fill_friction_tensor!Method
function: 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 Λ.

source
NQCCalculators.fill_friction_tensor!Method
function: 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 Λ.

source
NQCCalculators.update_cache!Method

updates 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

source
NQCCalculators.update_centroid!Method

updates 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
source