InitialConditions

ThermalMonteCarlo

NQCDynamics.InitialConditions.ThermalMonteCarlo.run_advancedmh_samplingMethod
run_advancedmh_sampling(sim, r, steps, σ; movement_ratio=nothing, movement_ratio_internal=nothing, kwargs...)

Sample the configuration space for the simulation sim starting from r.

Total number of steps is given by steps and σ is the dictionary of step sizes for each species.

movement_ratio denotes the fraction of system moved each step. internal_ratio works as for movement_ratio but for the internal modes of the ring polymer. For movement_ratio = 0, every degree of freedom is moved at each step, if movement_ratio = 1, then nothing will happen.

If neither arguments are defined, default behaviour is to move one atom (and one ring polymer normal mode) per step on average.

Further kwargs are passed to AdvancedMH.sample to allow for extra functionality.

source

QuantisedDiatomic

NQCDynamics.InitialConditions.QuantisedDiatomicModule
QuantisedDiatomic

This module exports two user facing functions:

  • generate_configurations Creates a set of velocities and positions for diatomic molecule with specified vibrational ν and rotational J quantum numbers.

  • quantise_diatomic Obtains vibrational ν and rotational J quantum numbers for a diatomic molecule with a given set of velocities and positions.

The central concept of this module is the EBK procedure which is nicely detailed here: [4]

Inspired by VENUS96: [28]

source
NQCDynamics.InitialConditions.QuantisedDiatomic.calculate_diatomic_energyMethod
calculate_diatomic_energy(model::AdiabaticModel, bond_length::Real;
    height=10, normal_vector=[0, 0, 1])

Returns potential energy of diatomic with bond_length at height from surface.

Orients molecule parallel to the surface at the specified height, the surface is assumed to intersect the origin. This requires that the model implicitly provides the surface, or works fine without one.

source
NQCDynamics.InitialConditions.QuantisedDiatomic.generate_configurationsMethod
generate_configurations(sim, ν, J; samples=1000, height=10, normal_vector=[0, 0, 1],
    translational_energy=0, direction=[0, 0, -1], position=[0, 0, height])

Generate positions and momenta for given quantum numbers

translational_energy, direction and position specify the kinetic energy in a specific direction with the molecule placed with centre of mass at position.

Keyword arguments height and normal_vector become relevant if the potential requires specific placement of the molecule. These allow the molecule to be placed at a distance height in the direction normal_vector when performing potential evaluations.

source
NQCDynamics.InitialConditions.QuantisedDiatomic.quantise_diatomicMethod
quantise_diatomic(sim::Simulation, v::Matrix, r::Matrix, binding_curve::BindingCurve;
show_timer=false, reset_timer=false,
height=10, normal_vector=[0, 0, 1], atom_indices=[1,2], max_translation=1) 
)

Quantise the vibrational and rotational degrees of freedom for the specified positions and velocities using the BindingCurve specified. A binding curve will be automatically generated if you do not supply one.

If the potential can be evaluated for the diatomic only, independent of position, supplying a Simulation for just the diatomic will speed up evaluation.

When evaluating the potential, the molecule is moved to height in direction normal_vector. If the potential is independent of centre of mass position, this has no effect. Otherwise, be sure to modify these parameters to give the intended behaviour.

If a Simulation with a PeriodicCell is supplied, periodic copies of the diatomic atoms will be used if positions are close to cell boundaries. Set max_translation to the radius of surrounding unit cells to search. (e.g. 1 if positions are already wrapped around cell boundaries)

source
NQCDynamics.InitialConditions.QuantisedDiatomic.quantise_diatomicMethod
quantise_diatomic(sim::Simulation, v::Matrix, r::Matrix; 
bond_lengths=0.5:0.01:5.0, 
height=10.0, 
surface_normal=[0, 0, 1.0], 
atom_indices=[1, 2], 
max_translation=1,
show_timer=false, reset_timer=false
)

Quantise the vibrational and rotational degrees of freedom for the specified positions and velocities.

If the potential can be evaluated for the diatomic only, independent of position, supplying a Simulation for just the diatomic will speed up evaluation.

When evaluating the potential, the molecule is moved to height in direction normal_vector. If the potential is independent of centre of mass position, this has no effect. Otherwise, be sure to modify these parameters to give the intended behaviour.

If a Simulation with a PeriodicCell is supplied, periodic copies of the diatomic atoms will be used if positions are close to cell boundaries. Set max_translation to the radius of surrounding unit cells to search. (e.g. 1 if positions are already wrapped around cell boundaries)

source
NQCDynamics.InitialConditions.QuantisedDiatomic.quantise_diatomicMethod
quantise_diatomic(sim::Simulation, v::Vector{Matrix}, r::Vector{Matrix};
bond_lengths=0.5:0.01:5.0, 
height=10.0, 
surface_normal=[0, 0, 1.0], 
atom_indices=[1, 2], 
show_timer=false, reset_timer=false
)

Quantise the vibrational and rotational degrees of freedom of multiple atomic configurations given as a vector of velocity matrices and a vector of position matrices.

If the potential can be evaluated for the diatomic only, independent of position, supplying a Simulation for just the diatomic will speed up evaluation.

When evaluating the potential, the molecule is moved to height in direction normal_vector. If the potential is independent of centre of mass position, this has no effect. Otherwise, be sure to modify these parameters to give the intended behaviour.

If a Simulation with a PeriodicCell is supplied, periodic copies of the diatomic atoms will be used if positions are close to cell boundaries. Set max_translation to the radius of surrounding unit cells to search. (e.g. 1 if positions are already wrapped around cell boundaries)

Specify show_timer=true for performance timings of the EBK quantisation process and reset_timer=true to see timings for each individual quantisation.

source

MetropolisHastings

NQCDynamics.InitialConditions.MetropolisHastingsModule
MetropolisHastings

Sampling of the initial conditions using the Metropolis-Hastings Markov chain Monte Carlo method.

Included within is the ability to sample the canonical distribution for adiabatic classical and ring polymer systems.

Usage involves creating an instance of an AbstractSystem{MonteCarlo} and calling run_monte_carlo_sampling.

source