Analysis

NQCDynamics.Analysis.Diatomic.com_velocity_conditionMethod
com_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.
source
NQCDynamics.Analysis.Diatomic.get_desorption_frameMethod
get_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:

  1. In the trajectory, the diatomic must be surface_distance_threshold or further away from the highest other atom. (In surface_normal direction).

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

source
NQCDynamics.Analysis.Diatomic.surface_distance_conditionMethod
surface_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.
source
NQCDynamics.Analysis.Diatomic.transform_UMethod
transform_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

source
NQCDynamics.Analysis.RigidRotator.harmonic_vibration_energyMethod
harmonic_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 ν.

source
NQCDynamics.Analysis.Postprocess.apply_output_functionsMethod
apply_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.

source
NQCDynamics.Analysis.Postprocess.apply_output_functionsMethod
apply_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.

source