Analysis
NQCDynamics.Analysis
— ModuleAnalysis functions common enough to be included in the main package.
NQCDynamics.Analysis.Diatomic
— ModuleAnalysis functions for surface chemistry of diatomic molecules.
NQCDynamics.Analysis.Diatomic.close_approach_condition
— Methodclose_approach_condition(x::AbstractArray, indices::Vector{Int}, simulation::AbstractSimulation; threshold = 1.5u"Å")
Evaluate true if the diatomic bond length is below `threshold`.
NQCDynamics.Analysis.Diatomic.com_velocity_condition
— Methodcom_velocity_condition(x::AbstractArray, indices::Vector{Int}, simulation::AbstractSimulation; surface_normal::AbstractVector=[0,0,1])
Evaluates true if the centre of mass velocity vector of the diatomic molecule points to the surface.
NQCDynamics.Analysis.Diatomic.get_desorption_frame
— Methodget_desorption_frame(trajectory::AbstractVector, diatomic_indices::Vector{Int}, simulation::AbstractSimulation; surface_normal::Vector=[0, 0, 1], surface_distance_threshold=5.0 * u"Å", fallback_distance_threshold = 1.5u"Å")
Determines the index in a trajectory where surface desorption begins.
This is evaluated using two conditions:
In the trajectory, the diatomic must be
surface_distance_threshold
or further away from the highest other atom. (Insurface_normal
direction).Desorption begins at the turning point of the centre of mass velocity component along
surface_normal
, indicating overall movement away from the surface.
If the second condition is never reached (can happen for particularly quick desorptions), the fallback_distance_threshold
is used to find the last point where the diatomic bond length is above the given value and saves from that point onwards.
NQCDynamics.Analysis.Diatomic.surface_distance_condition
— Methodsurface_distance_condition(x::AbstractArray, indices::Vector{Int}, simulation::AbstractSimulation; surface_distance_threshold=5.0*u"Å")
Checks that the diatomic molecule is at least `surface_distance_threshold` away from the highest substrate atom in the simulation.
NQCDynamics.Analysis.Diatomic.transform_U
— Methodtransform_U(config::Matrix, index1::Int, index2::Int, sim::Simulation)
Builds diatomic Cartesian to internal coordinate transformation matrix as described in the SI of 10.1021/jacsau.0c00066
NQCDynamics.Analysis.RigidRotator.classical_rotation_energy
— Methodclassical_rotation_energy(J::Union{Int, CartesianIndex}, config::Any, ind1::Union{Int, CartesianIndex}, ind2::Union{Int, CartesianIndex}, sim::Simulation)
Classical rotation energy of a rigid diatomic rotor in Hartree
NQCDynamics.Analysis.RigidRotator.classical_translational_energy
— Methodclassical_translational_energy(config::Any, ind1::Union{Int, CartesianIndex}, ind2::Union{Int, CartesianIndex}, sim::Simulation)
Returns the classical translational energy in Hartree
NQCDynamics.Analysis.RigidRotator.harmonic_vibration_energy
— Methodharmonic_vibration_energy(ν::Union{Int, CartesianIndex}, k::Float, ind1::Union{Int, CartesianIndex}=1, ind2::Union{Int, CartesianIndex}=2, sim::Simulation)
Vibrational energy of a harmonic oscillator with the force constant k and vibrational level ν.
NQCDynamics.Analysis.Postprocess.apply_output_functions
— Methodapply_output_functions(sol::FakeSolution, output_functions; savetime::Bool=true)
Evaluates output functions on a DifferentialEquations.jl solution object or fake solution object generated using a defined Simulation and a DynamicsVariables
type.
Basically equivalent to running run_dynamics()
with the same output functions, but without doing the dynamics simulation again.
NQCDynamics.Analysis.Postprocess.apply_output_functions
— Methodapply_output_functions(sim<:AbstractSimulation, u_type::AbstractVector, t_type::AbstractVector, output_functions; savetime::Bool=true)
Evaluates output functions on a defined Simulation, a DynamicsVariables
type output and a time-type output.
Basically equivalent to running run_dynamics()
with the same output functions, but without doing the dynamics simulation again.