DynamicsOutputs
Here are all the functions that you can specify in the output tuple when using run_dynamics
. To add more, simply add a new function in the DynamicsOutputs
module.
NQCDynamics.DynamicsOutputs
— ModuleDynamicsOutputs
Defines a set of functions that can be used to calculate outputs for dynamics simulations.
NQCDynamics.DynamicsOutputs.OutputDesorptionAngle
— TypeOutputs the desorption angle in degrees (relative to the surface normal) if a desorption event is detected.
NQCDynamics.DynamicsOutputs.OutputDesorptionAngle
— Method(output::OutputDesorptionAngle)(sol, i)
Outputs the desorption angle in degrees (relative to the surface normal) if a desorption event was detected.
NQCDynamics.DynamicsOutputs.OutputDesorptionAngle
— MethodOutputDesorptionAngle(indices; surface_normal=[0, 0, 1], surface_distance_threshold=austrip(5.0u"Å"))
Outputs the desorption angle in degrees (relative to the surface normal) if a desorption event is detected. Use surface_normal
to define the direction "away" from the surface. Most commonly, this would be in positive z direction.
A desorption is detected if the centre of mass of the molecule defined with indices
is above surface_distance_threshold
from the closest surface atom. This is calculated with respect to surface_normal
and will take into account periodic boundary conditions.
NQCDynamics.DynamicsOutputs.OutputDesorptionSnapshot
— Method(output::OutputDesorptionTrajectory)(sol, i)
Only output trajectory snapshot where desorption begins. (Centre of mass velocity projected onto surface normal changes sign)
NQCDynamics.DynamicsOutputs.OutputDesorptionSnapshot
— MethodOutputDesorptionSnapshot(indices; surface_normal=[0, 0, 1], surface_distance_threshold=austrip(5.0u"Å"))
Save DynamicsVariables where desorption starts. (Same conditions as for OutputDesorptionTrajectory)
Use surface_normal
to define the direction "away" from the surface. Most commonly, this would be in positive z direction.
Use extra_frames
to save additional steps before the desorption event begins.
A desorption is detected if the centre of mass of the molecule defined with indices
is above surface_distance_threshold
from the closest surface atom. This is calculated with respect to surface_normal
and will take into account periodic boundary conditions.
NQCDynamics.DynamicsOutputs.OutputDesorptionTrajectory
— Method(output::OutputDesorptionTrajectory)(sol, i)
Only output parts of the trajectory where desorption is occurring.
NQCDynamics.DynamicsOutputs.OutputDesorptionTrajectory
— MethodOutputDesorptionTrajectory(indices; surface_normal=[0, 0, 1], surface_distance_threshold=austrip(5.0u"Å"), extra_frames=0)
Like OutputDynamicsVariables, but only saves parts of the trajectory where desorption is occurring.
Use surface_normal
to define the direction "away" from the surface. Most commonly, this would be in positive z direction.
Use extra_frames
to save additional steps before the desorption event begins.
A desorption is detected if the centre of mass of the molecule defined with indices
is above surface_distance_threshold
from the closest surface atom. This is calculated with respect to surface_normal
and will take into account periodic boundary conditions.
NQCDynamics.DynamicsOutputs.OutputDissociation
— TypeOutput a 1 if the molecule has dissociated, 0 otherwise.
NQCDynamics.DynamicsOutputs.OutputFinalSubsetKineticEnergy
— TypeEvaluate the classical kinetic energy of a subset of the entire system at the end of the simulation.
The subset is defined by OutputSubsetKineticEnergy(indices)
.
NQCDynamics.DynamicsOutputs.OutputKineticTemperature
— TypeOutputs the instantaneous temperature of the selected atoms in K in the system at every save point.
Invoke with OutputKineticTemperature(:)
for the entire system, or with OutputKineticTemperature([1,2,3...])
for a subset of atoms.
NQCDynamics.DynamicsOutputs.OutputQuantisedDiatomic
— TypeOutput the vibrational and rotational quantum numbers of the final image.
NQCDynamics.DynamicsOutputs.OutputStateResolvedScattering1D
— TypeOutput a ComponentVector
with fields reflection
and transmission
containing the probability of the outcome. Each index in the arrays refers to the adiabatic state.
NQCDynamics.DynamicsOutputs.OutputSubsetKineticEnergy
— TypeOutputSubsetKineticEnergy(sol, i)
Evaluate the classical kinetic energy of a subset of the entire system at each save step.
The subset is defined by OutputSubsetKineticEnergy(indices)
.
NQCDynamics.DynamicsOutputs.OutputSurfaceDesorption
— TypeOutputs a 1 if the molecule has moved a certain distance from all atoms in the surface, 0 otherwise.
Distance is defined by the projected distance from the highest non-adsorbate atom along the surface normal.
NQCDynamics.DynamicsOutputs.OutputAdiabaticPopulation
— MethodOutputAdiabaticPopulation(sol, i)
Output the adiabatic population at each timestep during the trajectory.
NQCDynamics.DynamicsOutputs.OutputCentroidPosition
— MethodOutputCentroidPosition(sol, i)
Output the position of the ring polymer centroid at each timestep during the trajectory.
NQCDynamics.DynamicsOutputs.OutputCentroidVelocity
— MethodOutputCentroidVelocity(sol, i)
Output the velocity of the ring polymer centroid at each timestep during the trajectory.
NQCDynamics.DynamicsOutputs.OutputDiabaticPopulation
— MethodOutputDiabaticPopulation(sol, i)
Output the diabatic population at each timestep during the trajectory.
NQCDynamics.DynamicsOutputs.OutputDiscreteState
— MethodOutputDiscreteState(sol, i)
Output the discrete state variable at each timestep during the trajectory. This is used for surface hopping simulations and returns the variable that determines the currently occupied adiabatic state.
Requires that the dynamics variable has a field state
.
Use OutputDiabaticPopulation
or OutputAdiabaticPopulation
to get the population estimators.
NQCDynamics.DynamicsOutputs.OutputDynamicsVariables
— MethodOutputDynamicsVariables(sol, i)
Output all of the dynamics variables at each timestep during the trajectory.
NQCDynamics.DynamicsOutputs.OutputEverything
— MethodOutputEverything(sol,i)
Outputs the full DifferentialEquations solution object.
Storing this to disk is inefficient, but allows for full post-processing with any of the functions defined in this module.
NQCDynamics.DynamicsOutputs.OutputFinal
— MethodOutput the end point of each trajectory.
NQCDynamics.DynamicsOutputs.OutputFinalTime
— MethodOutputs the final time point of a trajectory. This is useful if simulations are terminated by a callback.
NQCDynamics.DynamicsOutputs.OutputInitial
— MethodOutput the first point of each trajectory in DynamicsVariables format. (Useful when using distributions for initial conditions.)
NQCDynamics.DynamicsOutputs.OutputKineticEnergy
— MethodOutputKineticEnergy(sol, i)
Evaluate the classical kinetic energy at each timestep during the trajectory.
NQCDynamics.DynamicsOutputs.OutputMappingMomentum
— MethodOutputMappingMomentum(sol, i)
Output the momentum mapping variable at each timestep during the trajectory.
NQCDynamics.DynamicsOutputs.OutputMappingPosition
— MethodOutputMappingPosition(sol, i)
Output the position mapping variables at each timestep during the trajectory.
NQCDynamics.DynamicsOutputs.OutputNoise
— MethodOutputNoise(sol, i)
Outputs the noise generated by the integrator at each time step in the trajectory.
Note: This requires using the run_dynamics
command with save_noise=true
, otherwise noise won't be accessible to this output function.
NQCDynamics.DynamicsOutputs.OutputPosition
— MethodOutputPosition(sol, i)
Output the position at each timestep during the trajectory.
NQCDynamics.DynamicsOutputs.OutputPotentialEnergy
— MethodOutputPotentialEnergy(sol, i)
Output the adiabatic potential energy at each timestep during the trajectory.
NQCDynamics.DynamicsOutputs.OutputQuantumSubsystem
— MethodOutputQuantumSubsystem(sol, i)
Output the quantum subsystem at each timestep during the trajectory. Usually this will refer to a wavefunction or density matrix but will depend on the particular dynamics method.
NQCDynamics.DynamicsOutputs.OutputSurfaceHops
— MethodOutput the total number of surface hops during the trajectory
NQCDynamics.DynamicsOutputs.OutputTotalAdiabaticPopulation
— MethodOutputTotalAdiabaticPopulation(sol, i)
Output the total adiabatic population at each timestep during the trajectory.
NQCDynamics.DynamicsOutputs.OutputTotalDiabaticPopulation
— MethodOutputTotalDiabaticPopulation(sol, i)
Output the total diabatic population at eah timestep during the trajectory.
NQCDynamics.DynamicsOutputs.OutputTotalEnergy
— MethodOutputTotalEnergy(sol, i)
Evaluate the classical Hamiltonian at each timestep during the trajectory.
NQCDynamics.DynamicsOutputs.OutputVelocity
— MethodOutputVelocity(sol, i)
Output the velocity at each timestep during the trajectory.