STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::mm::DynamicsControls Class Reference

Object to encapsulate molecular dynamics control information. Like other namelist encapsualtors, this object can take input file data as part of its construction, or by a series of setters. Validation of each piece of data is handled as it appears either in the contructor or via setters. Getter functions dispense the internal information to any application using STORMM libraries. More...

#include <nml_dynamics.h>

Public Member Functions

int getStepCount () const
 Get the total number of dynamics steps.
 
int getDiagnosticPrintFrequency () const
 Get the printing frequency for energies and other state variables of the system or collection of systems.
 
int getTrajectoryPrintFrequency () const
 Get the printing frequency for trajectory snapshots.
 
int getCenterOfMassMotionPurgeFrequency () const
 Get the frequency for purging motion of the system's center of mass.
 
double getTimeStep () const
 Get the simulation time step.
 
double getElectrostaticCutoff () const
 Get the electrostatic pairwise cutoff in periodic simulations.
 
double getVanDerWaalsCutoff () const
 Get the van-der Waals pairwise cutoff in periodic simulations.
 
VdwSumMethod getVdwSummation () const
 Get the method for computing van-der Waals interactions between particles.
 
double getCoulombConstant () const
 Get the value of Coulomb's constant.
 
double getElec14Screening () const
 Get the electrostatic 1:4 screening value.
 
double getVdw14Screening () const
 Get the van-der Waals 1:4 screening value.
 
bool coulombSetByUser () const
 Report whether the value of Coulomb's constant was set explicitly or left at the default value.
 
bool elec14SetByUser () const
 Report whether the electrostatic 1:4 scaling was set explicitly or left at its default value.
 
bool vdw14SetByUser () const
 Report whether the van-der Waals 1:4 scaling was set explicitly or left at its default value.
 
ApplyConstraints constrainGeometry () const
 Indicate whether general geometric constraints (RATTLE for hub-and-spoke bonded groups, SETTLE for rigid water molecules) are to be implemented.
 
ApplyConstraints useShake () const
 Indicate whether SHAKE (and, by extension, RATTLE in the velocity-Verlet integrator) should be implemented.
 
ApplyConstraints useSettle () const
 Indicate whether SHAKE (and, by extension, RATTLE in the velocity-Verlet integrator) should be implemented.
 
double getRattleTolerance () const
 Get the RATTLE tolerance.
 
int getRattleIterations () const
 Get the maximum number of RATTLE iterations.
 
RattleMethod getCpuRattleMethod () const
 Get the CPU-based method of implementing RATTLE for multiple constrained bonds connected to one central atom. This determines the order in which the position of the central atom is updated with each iteration.
 
ThermostatKind getThermostatKind () const
 Get the thermostat kind.
 
int getThermostatEvolutionStart () const
 Get the starting step for temperature evolution from the initial temperature profile to the final temperature profile across all atoms and all systems.
 
int getThermostatEvolutionEnd () const
 Get the final step for temperature evolution from the initial temperature profile to the final temperature profile across all atoms and all systems.
 
int getThermostatCacheDepth () const
 Get the depth of the thermostat's random number cache.
 
int getThermostatSeed () const
 Get the random seed to be used in the thermostat's random number generators.
 
int getThermostatLayerCount () const
 Get the number of distinct layers to the thermostat, the number of different temperature and system groups that must be parsed (in order) that the temperature profiles at which to maintain all systems of the synthesis are to be maintained. This function also serves as a check on the consistency of array sizes: for each initial temeprature specification, there must be a final temperature specification, a label, a label index, and an atom mask (even if the latter three are "all", -1 (integer code for all), and "@=" (all atoms).
 
int getAndersenFrequency () const
 Get the frequncy of velocity reassignments for a "massive" Andersen thermostat, one in which all velocities are reassigned after a particular number of steps.
 
double getLangevinFrequency () const
 Get the Langevin collison frequency, in units of inverse femtoseconds.
 
PrecisionModel getThermostatCacheConfig () const
 Get the thermostat cache configuration.
 
const std::vector< double > & getInitialTemperatureTargets () const
 Get the vector of initial temperature targets for all groups of atoms and systems.
 
const std::vector< double > & getFinalTemperatureTargets () const
 Get the vector of final temperature targets for all groups of atoms and systems.
 
const std::vector< std::string > & getThermostatLabels () const
 Get the list of label groups within the systems cache to which each thermostated group of atoms belongs.
 
const std::vector< int > & getThermostatLabelIndices () const
 Get the indices of systems within the label groups to which each thermostated group of atoms belongs.
 
const std::vector< std::string > & getThermostatMasks () const
 Get the atom mask strings for each thermostated group of atoms.
 
int getNTWarpMultiplicity () const
 Get the warp multiplicity for non-bonded pairwise calculations.
 
const NamelistEmulator & getTranscript () const
 Get the original namelist emulator object as a transcript of the user input.
 
void setStepCount (int total_step_count_in)
 Set the total number of dynamics steps.
 
void setDiagnosticPrintFrequency (int diagnostic_frequency_in)
 Set the diagnostic printing frequency.
 
void setTrajectoryPrintFrequency (int trajectory_frequency_in)
 Set the trajectory snapshot printing frequency.
 
void setCenterOfMassMotionPurgeFrequency (int com_motion_purge_ferquency_in)
 Set the center of mass motion purge frequency.
 
void setTimeStep (double time_step_in)
 Set the simulation time step.
 
void setElectrostaticCutoff (double cutoff_in)
 Set the short-ranged electrostatic cutoff for the simulation.
 
void setVanDerWaalsCutoff (double cutoff_in)
 Set the short-ranged van-der Waals cutoff for the simulation.
 
void setCutoff (double cutoff_in)
 Set the cutoffs for short-ranged van-der Waals as well as electrostatic interactions in a periodic simulation.
 
void setCoulombConstant (double coulomb_in)
 Set the value of Coulomb's constant.
 
void setElec14Screening (double screening_in)
 Set the screening factor for 1:4 electrostatic interactions.
 
void setVdw14Screening (double screening_in)
 Set the screening factor for 1:4 van-der Waals interactions.
 
void setThermostatEvolutionStart (int thermo_evolution_start_in)
 Set the starting step for temperature evolution from the initial temperature profile to the final temperature profile across all atoms and all systems.
 
void setThermostatEvolutionEnd (int step_number)
 Set the final step for temperature evolution from the initial temperature profile to the final temperature profile across all atoms and all systems.
 
void setThermostatCacheDepth (int depth_in)
 Set the depth of the thermostat's random number cache.
 
void setThermostatSeed (int igseed)
 Set the random seed to be used in the thermostat's random number generators.
 
void setAndersenFrequency (int frequency_in)
 Set the velocity restart frequency for a "massive" Andersen thermostat.
 
void setLangevinFrequency (double frequency_in)
 Set the stochastic collision frequency for a Langevin thermostat.
 
void setThermostatGroup (double initial_target=default_simulation_temperature, double final_target=default_simulation_temperature, const std::string &label=std::string("all"), int label_index=-1, const std::string &mask=std::string("@="))
 Get the vector of initial temperature targets for all groups of atoms and systems.
 
void setNTWarpMultiplicity (int mult_in)
 Get the warp multiplicity for non-bonded pairwise calculations. This applies only to periodic dynamics.
 
 DynamicsControls (ExceptionResponse policy_in=ExceptionResponse::DIE)
 The constructor can prepare an object with default settings or read the corresponding namelist to accept user input.
 
 DynamicsControls (const TextFile &tf, int *start_line, bool *found_nml, ExceptionResponse policy_in=ExceptionResponse::DIE, WrapTextSearch wrap=WrapTextSearch::NO)
 
 DynamicsControls (const DynamicsControls &original)=default
 As with other control objects, copy and move constructors, plus copy and move assignment operators, can all take their default forms.
 
 DynamicsControls (DynamicsControls &&original)=default
 
DynamicsControlsoperator= (const DynamicsControls &original)=default
 
DynamicsControlsoperator= (DynamicsControls &&original)=default
 
void setVdwSummation (const std::string &vdw_method_in)
 Set the strategy for evaluating the tails of van-der Waals (Lennard-Jones) interactions.
 
void setVdwSummation (const VdwSumMethod vdw_method_in)
 
void setGeometricConstraints (const std::string &constrain_geometry_in)
 Stipulate whether geometric constraints will be implemented.
 
void setGeometricConstraints (ApplyConstraints constrain_geometry_in=ApplyConstraints::YES)
 
void setUseShake (const std::string &use_shake_in)
 Stipulate whether bonds to hydrogen atoms will be held rigid at their equilibrium length. Overloading follows from setGeometricConstraints(), above.
 
void setUseShake (ApplyConstraints use_shake_in=ApplyConstraints::YES)
 
void setUseSettle (const std::string &use_settle_in)
 Stipulate whether three-atom isosceles arrangements with two light atoms (e.g. water) will be held rigid at their equilibrium geometries. Overloading follows from setGeometricConstraints(), above.
 
void setUseSettle (ApplyConstraints use_settle_in=ApplyConstraints::YES)
 
void setCpuRattleMethod (const std::string &rattle_protocol_in)
 Set the RATTLE protocol to be used in CPU operations (the GPU will always use the "CENTER_SUM" approach).
 
void setRattleTolerance (double rattle_tolerance_in)
 Set the simulation RATTLE tolerance.
 
void setThermostatKind (const std::string &thermostat_kind_in)
 Get the thermostat kind.
 
void setThermostatKind (ThermostatKind thermostat_kind_in)
 
void setThermostatCacheConfig (const std::string &cache_config_in)
 Set the thermostat cache configuration.
 
void setThermostatCacheConfig (PrecisionModel cache_config_in)
 

Detailed Description

Object to encapsulate molecular dynamics control information. Like other namelist encapsualtors, this object can take input file data as part of its construction, or by a series of setters. Validation of each piece of data is handled as it appears either in the contructor or via setters. Getter functions dispense the internal information to any application using STORMM libraries.

Constructor & Destructor Documentation

◆ DynamicsControls()

stormm::namelist::DynamicsControls::DynamicsControls ( ExceptionResponse policy_in = ExceptionResponse::DIE)

The constructor can prepare an object with default settings or read the corresponding namelist to accept user input.

Parameters
tfInput file translated into RAM
start_lineLine of the input file to begin searching for the &solvent namelist
found_nmlIndicator that the namelist was found in the input file
policy_inRequested error handling behavior
wrapIndicate that the search for a &dynamics namelist should carry on from the beginning of an input file if no such namelist is found starting from the original starting point

Member Function Documentation

◆ setAndersenFrequency()

void stormm::namelist::DynamicsControls::setAndersenFrequency ( int frequency_in)

Set the velocity restart frequency for a "massive" Andersen thermostat.

Parameters
frequency_inThe step frequency to set

◆ setCenterOfMassMotionPurgeFrequency()

void stormm::namelist::DynamicsControls::setCenterOfMassMotionPurgeFrequency ( int com_motion_purge_ferquency_in)

Set the center of mass motion purge frequency.

Parameters
com_motion_purge_ferquency_inThe frequency with which to purge center of mass motion

◆ setCoulombConstant()

void stormm::namelist::DynamicsControls::setCoulombConstant ( double coulomb_in)

Set the value of Coulomb's constant.

Parameters
coulomb_inDefine Coulomb's constant for the simulation

◆ setCpuRattleMethod()

void stormm::namelist::DynamicsControls::setCpuRattleMethod ( const std::string & rattle_protocol_in)

Set the RATTLE protocol to be used in CPU operations (the GPU will always use the "CENTER_SUM" approach).

Overloaded:

  • Provide a string to be translated into the protocol enumeration
  • Provide the enumeration itself
Parameters
rattle_protocol_inThe RATTLE protocol to set

◆ setCutoff()

void stormm::namelist::DynamicsControls::setCutoff ( double cutoff_in)

Set the cutoffs for short-ranged van-der Waals as well as electrostatic interactions in a periodic simulation.

Parameters
cutoff_in

◆ setDiagnosticPrintFrequency()

void stormm::namelist::DynamicsControls::setDiagnosticPrintFrequency ( int diagnostic_frequency_in)

Set the diagnostic printing frequency.

Parameters
diagnostic_frequency_inThe frequency with which to store energy and state variables

◆ setElec14Screening()

void stormm::namelist::DynamicsControls::setElec14Screening ( double screening_in)

Set the screening factor for 1:4 electrostatic interactions.

Parameters
screening_inThe screening factor to set

◆ setElectrostaticCutoff()

void stormm::namelist::DynamicsControls::setElectrostaticCutoff ( double cutoff_in)

Set the short-ranged electrostatic cutoff for the simulation.

Parameters
cutoff_in

◆ setGeometricConstraints()

void stormm::namelist::DynamicsControls::setGeometricConstraints ( const std::string & constrain_geometry_in)

Stipulate whether geometric constraints will be implemented.

Overloaded:

  • Provide a parseable string to indicate the constraint instruction
  • Provide the explicit enumeration
Parameters
constrain_geometry_inIndicate whether to activate RATTLE and SETTLE

◆ setLangevinFrequency()

void stormm::namelist::DynamicsControls::setLangevinFrequency ( double frequency_in)

Set the stochastic collision frequency for a Langevin thermostat.

Parameters
frequency_inThe collision frequency to set, in units of inverse femtoseconds

◆ setNTWarpMultiplicity()

void stormm::namelist::DynamicsControls::setNTWarpMultiplicity ( int mult_in)

Get the warp multiplicity for non-bonded pairwise calculations. This applies only to periodic dynamics.

Parameters
mult_inThe warp multiplicity to set

◆ setRattleTolerance()

void stormm::namelist::DynamicsControls::setRattleTolerance ( double rattle_tolerance_in)

Set the simulation RATTLE tolerance.

Parameters
tol_inThe requested tolerance

◆ setStepCount()

void stormm::namelist::DynamicsControls::setStepCount ( int total_step_count_in)

Set the total number of dynamics steps.

Parameters
total_step_count_inThe number of steps to take

◆ setThermostatCacheConfig()

void stormm::namelist::DynamicsControls::setThermostatCacheConfig ( const std::string & cache_config_in)

Set the thermostat cache configuration.

Overloaded:

  • Provide a parseable string to indicate the configuration
  • Provide the explicit enumeration
Parameters
cache_config_inThe cache configuration to set

◆ setThermostatCacheDepth()

void stormm::namelist::DynamicsControls::setThermostatCacheDepth ( int depth_in)

Set the depth of the thermostat's random number cache.

Parameters
depth_inThe depth that the cache shall take

◆ setThermostatEvolutionEnd()

void stormm::namelist::DynamicsControls::setThermostatEvolutionEnd ( int step_number)

Set the final step for temperature evolution from the initial temperature profile to the final temperature profile across all atoms and all systems.

Parameters
step_numberThe requested step number

◆ setThermostatEvolutionStart()

void stormm::namelist::DynamicsControls::setThermostatEvolutionStart ( int thermo_evolution_start_in)

Set the starting step for temperature evolution from the initial temperature profile to the final temperature profile across all atoms and all systems.

Parameters
step_numberThe requested step number

◆ setThermostatGroup()

void stormm::namelist::DynamicsControls::setThermostatGroup ( double initial_target = default_simulation_temperature,
double final_target = default_simulation_temperature,
const std::string & label = std::string("all"),
int label_index = -1,
const std::string & mask = std::string("@=") )

Get the vector of initial temperature targets for all groups of atoms and systems.

Parameters
initial_targetThe initial target temperature
final_targetThe equilibrium target temperature
labelThe label group from within the cache to which the stated temperatures will be applied
label_indexIndex of the system within the label group to which the stated temperatures apply, e.g. 4 would indicate the fifth system in the named label group. A value
maskString encoding an atom mask for the atoms in the label group and index to which the stated temperatures apply

◆ setThermostatKind()

void stormm::namelist::DynamicsControls::setThermostatKind ( const std::string & thermostat_kind_in)

Get the thermostat kind.

Overloaded:

  • Provide the type by parseable string
  • Provide the explicit enumeration
Parameters
thermostat_kind_inThe type of thermostat requested

◆ setThermostatSeed()

void stormm::namelist::DynamicsControls::setThermostatSeed ( int igseed)

Set the random seed to be used in the thermostat's random number generators.

Parameters
igseedThe seed to set

◆ setTimeStep()

void stormm::namelist::DynamicsControls::setTimeStep ( double time_step_in)

Set the simulation time step.

Parameters
time_step_inThe requested time step

◆ setTrajectoryPrintFrequency()

void stormm::namelist::DynamicsControls::setTrajectoryPrintFrequency ( int trajectory_frequency_in)

Set the trajectory snapshot printing frequency.

Parameters
trajectory_frequency_inThe frequency with which to store energy and state variables

◆ setUseSettle()

void stormm::namelist::DynamicsControls::setUseSettle ( const std::string & use_settle_in)

Stipulate whether three-atom isosceles arrangements with two light atoms (e.g. water) will be held rigid at their equilibrium geometries. Overloading follows from setGeometricConstraints(), above.

Parameters
use_settle_in

◆ setUseShake()

void stormm::namelist::DynamicsControls::setUseShake ( const std::string & use_shake_in)

Stipulate whether bonds to hydrogen atoms will be held rigid at their equilibrium length. Overloading follows from setGeometricConstraints(), above.

Parameters
use_shake_in

◆ setVanDerWaalsCutoff()

void stormm::namelist::DynamicsControls::setVanDerWaalsCutoff ( double cutoff_in)

Set the short-ranged van-der Waals cutoff for the simulation.

Parameters
cutoff_in

◆ setVdw14Screening()

void stormm::namelist::DynamicsControls::setVdw14Screening ( double screening_in)

Set the screening factor for 1:4 van-der Waals interactions.

Parameters
screening_inThe screening factor to set

◆ setVdwSummation()

void stormm::namelist::DynamicsControls::setVdwSummation ( const std::string & vdw_method_in)

Set the strategy for evaluating the tails of van-der Waals (Lennard-Jones) interactions.

Overloaded:

  • Provide a keyword that indicates some value of the enumerator
  • Provide a value of the enumerator itself
Parameters
vdw_method_inThe input determining how van-der Waals interactions will vanish

The documentation for this class was generated from the following files: