QuantumModels

NQCModels.QuantumModels — Module
QuantumModels

Models defined within this module subtype the QuantumModel and provide potentials as Hermitian matrices and derivatives as arrays of Hermitian matrices.

source
NQCModels.QuantumModels.AndersonHaldane — Type
struct AndersonHaldane{T<:AbstractFloat} <: QuantumModel

1D two-state diabatic system capable of modelling a Hydrogen atom scattering on a Ge(111) surface.

This model is inspired by ErpenbeckThoss model at J. Chem. Phys. 151, 191101 (2019).

References

  • J. Chem. Phys. 151, 191101 (2019)
source
NQCModels.QuantumModels.AndersonHolstein — Type

Newns-Anderson model

The Anderson Impurity Model (AIM) describes a localized impurity state interacting with a continuous band of bath states. AIM is a foundamental model in condensed matter physics and quantum chemistry, introduced by P.W. Anderson in 1961. The Newns-Anderson model is a generalization of the AIM, which includes the possibility of multiple impurity states and a more complex interaction with the bath. A key advantage of using the AIM lies in its ability to yield analytical solutions for the energy level distribution and the hybridization (coupling) density, making it a powerful tool for theoretical analysis.

source
NQCModels.QuantumModels.BosonBath — Type
BosonBath(density::SpectralDensity, N::Integer)

Bosonic bath with given spectral density.

Useful for sampling the bath uncoupled from the spin for spin-boson dynamics.

source
NQCModels.QuantumModels.ErpenbeckThoss — Type
struct ErpenbeckThoss{T<:AbstractFloat} <: QuantumModel

1D two-state Quantum system capable of modelling a molecule adsorbed on a metal surface or a single-molecule junction.

In the two references, all of the parameters are identical except for the particle mass m and the vertical shift c applied to the ϵ₀ state. Both references modify the shift to ensure the quantum ground-state has an energy of 0 eV. Note that the mass m is specified in atomic mass units (amu) not atomic units. If a value for the vertical offset c is not explicitly provided whne constructing the model, it is automatically determined in the constructor from the Morse potential zero-point energy.

References

  • PHYSICAL REVIEW B 97, 235452 (2018)
  • J. Chem. Phys. 151, 191101 (2019)
source
NQCModels.QuantumModels.MiaoSubotnik — Type
MiaoSubotnik{T<:AbstractFloat} <: QuantumModel

Double well model with parameters matching those of Miao and Subotnik in the reference. This model should be paired with the AndersonHolstein model to couple to the bath of metallic states.

References

  • J. Chem. Phys. 150, 041711 (2019)
source
NQCModels.QuantumModels.QuantumFrictionModel — Type
QuantumFrictionModel <: QuantumModel

These models are defined identically to a typical QuantumModel but allocate extra temporary arrays when used with NQCDynamics.jl.

This allows for the calculation of electronic friction internally from the diabatic potential after diagonalisation and calculation of nonadiabatic couplings.

When a molecular dynamics with electronic friction simulation is set up in NQCDynamics, the QuantumFrictionModel is paired with a FrictionEvaluationMethod in order to calculate the electronic friction from the potential and derivative matrices.

source
NQCModels.QuantumModels.QuantumModel — Type
QuantumModel <: Model

QuantumModels are used when a system has multiple electronic states and the dynamics of the system are propagated by a Hamiltonian in the diabatic representation. This is the case for the majority of model systems.

Implementation

R is always a dimensions * atoms shaped AbstractMatrix, potential(model, R) always returns a single nstates * nstates Hermitian matrix (the sum of every atom's independent contribution), and derivative(model, R)/derivative!(model, D, R) always return/fill a dimensions * atoms shaped Matrix of nstates * nstates Hermitian matrices, one per (degree of freedom, atom) pair.

Every model must implement:

  • potential!(model, V::Hermitian, R::AbstractMatrix): fill V with the potential for every atom (column) in R. Must fully overwrite V.data (e.g. zero it, then accumulate per atom) — never rely on V already being zero, since callers reuse the same array across calls.
  • derivative!(model, D::AbstractMatrix{<:Hermitian}, R::AbstractMatrix): fill D in place with the derivative for every (degree of freedom, atom) pair in R.
  • nstates(model)
  • ndofs(model)

There is no automatic per-atom fallback: if every atom experiences the model independently (the common case, with ndofs(model) == 1), the implementation should say so explicitly, typically by looping over R/axes(R, 2) internally and accumulating each atom's contribution. Models with ndofs(model) > 1 (like GatesHollowayElbow), or that explicitly implement an interaction between different atoms (like SpinBoson), are written the same way — there is only one method to implement, not a separate "independent atoms" special case.

The only automatic convenience is at the Model level: for models where ndofs(model) == 1, the position of a single 1D atom may be passed directly as a plain number rather than a 1×1 matrix.

Example

In this example we create a simple 2 state, 1 dimensional quantum model MyModel, where every atom contributes independently, then evaluate it for a single atom.

using LinearAlgebra: Hermitian

struct MyModel <: NQCModels.QuantumModels.QuantumModel end

NQCModels.nstates(::MyModel) = 2
NQCModels.ndofs(::MyModel) = 1

function NQCModels.potential!(::MyModel, V::Hermitian, R::AbstractMatrix)
    V.data .= [sum(R) length(R); length(R) -sum(R)]
end

function NQCModels.derivative!(::MyModel, D::AbstractMatrix{<:Hermitian}, R::AbstractMatrix)
    for atom in axes(R, 2)
        D[1,atom].data .= [1 0; 0 1]
    end
end

model = MyModel()
NQCModels.potential(model, hcat(10))

# output

2×2 Hermitian{Int64, Matrix{Int64}}:
 10    1
  1  -10
source
NQCModels.QuantumModels.Scattering1D — Type

1D scattering model with a single molecule state and a set of metal states. The molecule state is coupled to the metal states, which are coupled to each other. The molecule state has a Morse potential, and the metal states have a constant energy. The coupling between the molecule and metal states is a Gaussian function of the distance between the molecule and the metal states.

source
NQCModels.QuantumModels.WideBandBath — Type
struct: WideBandBath <: QuantumFrictionModel

An explicit impurity-bath model which couples a quantum model to a discritised bath. The bath density of states is explicitly given by the wide-band approximation and the bath is discretised using the trapezoidal rule.

It is recommended that this is the explicit bath model used in conjuction with MDEF and the friction evaluators defined in NQCCalculators.jl. For the modelling of explicit bathstate dynamics (i.e. using dynamics methods such as IESH) it is recommended that the user use the Anderson-Holstein model alongside the Shenvi-Gauss Legendre discretisation scheme.

source
NQCModels.derivative! — Method
function NQCModels.derivative!(model::AndersonHolstein, D::AbstractMatrix{<:Hermitian}, R::AbstractMatrix)
    output: nothing

Updates the derivative of the Anderson-Holstein Hamiltonian with respect to all spatial degrees of freedom to have the correct values for a given position R.

This function is multiple dispatched over the shape of derivative(model.impurity_model) as these impurities may be defined over different numbers of spatial degrees of freedom.

source
NQCModels.derivative! — Method
function NQCModels.derivative!(model::WideBandBath, D::AbstractMatrix{<:Hermitian}, R::AbstractMatrix)
    output: nothing

Updates the derivative of the Anderson-Holstein Hamiltonian with respect to all spatial degrees of freedom to have the correct values for a given position R.

This fucntion is multiple dispatched over the shape of derivative(model.impurity_model) as these sub-models may be defined over different numbers of spatial degrees of freedom.

source