NQCModels
NQCModels.NQCModels
— ModuleNQCModels define the potentials and derivatives that govern the dynamics of the particles. These can exist as analytic models or as interfaces to other codes.
NQCModels.CompositeModel
— TypeCompositeModel(Subsystems...)
A CompositeModel is composed of multiple Subsystems, creating an effective model which evaluates each Subsystem for its respective indices.
NQCModels.CompositeModel
— MethodCompositeModel(subsystems::Subsystem...)
Combine multiple Subsystems into a single model to be handled by NQCDynamics.jl in simulations. Any calls made to potential
, derivative
and friction
will apply each subsystem's model to the respective atoms while ignoring any other atoms.
Some checks are made to ensure each atom is affected by a model and that each model is applied over the same degrees of freedom, but no other sanity checks are made.
NQCModels.Model
— TypeTop-level type for models.
Implementation
When adding new models, this should not be directly subtyped. Instead, depending on the intended functionality of the model, one of the child abstract types should be subtyped. If an appropriate type is not already available, a new abstract subtype should be created.
NQCModels.Subsystem
— TypeSubsystem(M, indices)
A subsystem is a Model which only applies to a subset of the degrees of freedom of the original model.
When combined in a CompositeModel, potential()
, derivative!()
and friction!()
will be sourced from the respective Subsystems.
Calling potential()
, derivative!()
, or friction!()
on a subsystem directly will output the respective values for the entire system.
The Model specified will be supplied with the positions of the entire system for evaluation.
NQCModels.check_models
— MethodSubsystem combination logic - We only want to allow combination of subsystems:
? 1. with the same number of degrees of freedom
- without overlapping indices (Build a different type of CompositeModel) to handle these cases separately.
NQCModels.derivative!
— Methodderivative!(model::Model, D, R::AbstractMatrix)
Fill D
with the derivative of the electronic potential as a function of the positions R
.
This must be implemented for all models.
NQCModels.derivative
— Methodderivative(model::Model, R)
Allocating version of derivative!
, this definition should be suitable for all models.
Implement zero_derivative
to allocate an appropriate array then implement derivative!
to fill the array.
NQCModels.ndofs
— Methodndofs(::Model)
Get the number of degrees of freedom for every atom in the model. Usually 1 or 3.
NQCModels.nstates
— Methodnstates(::Model)
Get the number of electronic states in the model.
NQCModels.potential!
— Methodpotential!(model::Model, V, R::AbstractMatrix)
In-place version of potential
, used only when mutable arrays are preferred.
Currently used only for LargeDiabaticModels
, see diabatic/DiabaticModels.jl
.
NQCModels.potential
— Methodpotential(model::Model, R::AbstractMatrix)
Evaluate the potential at position R
for the given model
.
NQCModels.zero_derivative
— Functionzero_derivative(model::Model, R)
Create an zeroed array of the right size to match the derivative.