Store the parameters for a simulation thermostat. Includes Berendsen, Andersen, and Langevin methods. This class can be assembled like many of the control objects, i.e. MinimizationControls, based on namelists.
More...
|
ThermostatKind | getKind () const |
| Get the kind of thermostat.
|
|
ThermostatPartition | getBathPartitions () const |
| Indicate whether this thermostat applies a common target temperature to all atoms, to individual systems, or to some finer compartmentalization based on individual atoms.
|
|
PrecisionModel | getCacheConfiguration () const |
| Get the random number caching precision.
|
|
int | getAtomCount () const |
| Get the total number of atoms that this thermostat can serve.
|
|
int | getStepNumber () const |
| Get the step number according to this thermostat. The thermostat will serve as an official reference for the official simulation step number.
|
|
int | getRandomSeed () const |
| Get the random seed used to initialize Xoshiro256++ state vectors.
|
|
int | getRandomCacheDepth () const |
| Get the random number cache depth. The quantity of random numbers that will be produced and cached for each atom is three times this setting, as it implies values for random perturbations in the Cartesian X, Y, and Z directions.
|
|
int | getInitialEvolutionStep () const |
| Get the step at which to begin changing the temperature from its initial value T(init) to its final value T(final). This is the last step that the thermostat will pull the system towards a value of T(init). Afterwards, the target will begin to change.
|
|
int | getFinalEvolutionStep () const |
| Get the step at which the temperature evolution is expected to be complete. This is the step when the thermostat will begin pulling the system towards T(final), although the system itself may or may not be there by this time.
|
|
ullint4 | getGeneratorState (int atom_index, HybridTargetLevel tier=HybridTargetLevel::HOST) const |
| Get the generator state for a particular atom. For retrieving large numbers of states, one should used the abstract.
|
|
double | getCachedRandomResult (int atom_index, int cache_row, HybridTargetLevel tier=HybridTargetLevel::HOST) const |
| Get one of the cached random numbers. This function returns the result as a double-precision real, but if a single-precision result is queried it will be converted to double and can then be put back in a float without changing its value. For retrieving large numbers of results, one should used the abstract.
|
|
double | getInitialTemperature (int atom_index=0) const |
| Get the initial target temperature for this thermostat, in units of Kelvin.
|
|
double | getFinalTemperature (int atom_index=0) const |
| Get the end-point target temperature for this thermostat, in units of Kelvin.
|
|
template<typename T> |
std::vector< T > | getTemperatureSpread (int step_number=0) const |
| Get the spread of temperature targets for all segments of the thermostat at a specific time step.
|
|
std::vector< int4 > | getPartitionMap () const |
| Get the partition boundaries between different segments of the thermostat as a vector of integer tuples, with the partition lower and upper boundaries in the "x" and "y" members, the number of constrained degrees of freedom in the "z" member, and the number of unconstrained degrees of freedom in the "w" member of each tuple.
|
|
template<typename Tcalc> |
Tcalc | getAtomTarget (int atom_index=0) const |
| Get the current target temperature for this thermostat, in units of Kelvin, for a specific atom.
|
|
template<typename Tcalc> |
Tcalc | getPartitionTarget (int index=0) const |
| Get the current target temperature for a specific partition within this thermostat, in units of Kelvin.
|
|
int | getPartitionConstrainedDoF (int index=0) const |
| Get the number of constrained degrees of freedom for a particular partition of this thermostat.
|
|
int | getPartitionFreeDoF (int index=0) const |
| Get the number of degrees of freedom for a particular partition of this thermostat, in absence of any constraints.
|
|
int | getAndersenResetFrequency () const |
| Get the Andersen reset frequency.
|
|
double | getLangevinCollisionFrequency () const |
| Get the collision frequency for the Langevin thermostat (in units of femtoseconds).
|
|
double | getLangevinImplicitFactor () const |
| Get the "implicit" Langevin factor, the portion of the velocity update to apply immediately after forces have been computed.
|
|
double | getLangevinExplicitFactor () const |
| Get the "explicit" Langevin factor, the portion of the velocity update to apply on the second half of the update, as new particle positions are being computed.
|
|
double | getTimeStep () const |
| Get the time step, in units of femtoseconds.
|
|
ApplyConstraints | constrainGeometry () const |
| Get the order whether to apply geometric constraints.
|
|
double | getRattleTolerance () const |
| Get the convergence criterion for RATTLE bond length constraints.
|
|
int | getRattleIterations () const |
| Get the number of RATTLE iterations to attempt.
|
|
bool | loadSynthesisForces () const |
| Get an indication of whether extra forces should be loaded from the synthesis in periodic systems.
|
|
const Thermostat * | getSelfPointer () const |
| Get a pointer to the object itself, useful if it has been passed to a function by.
|
|
void | setAtomCount (int atom_count_in, int new_seed=-1, const GpuDetails &gpu=null_gpu) |
| Set the number of atoms for which the thermostat is responsible.
|
|
void | checkCompartments (const AtomGraphSynthesis *poly_ag) |
| Check the compartmentalization if the thermostat regulates a synthesis of systems.
|
|
void | setEvolutionWindow (int init_step_in, int final_step_in) |
| Set the step at which temperature evolution, away from T(init), shall begin.
|
|
void | setCacheConfiguration (PrecisionModel cache_config_in, const GpuDetails &gpu=null_gpu) |
| Set the random number cache configuration.
|
|
void | setRandomCacheDepth (int depth_in, const GpuDetails &gpu=null_gpu) |
| Set the random number cache depth. This value is kept on a tight leash, as it can easily lead to allocating too much memory. A hundred-thousand atom system with cache depth 8 leads to over 13.7MB of memory allocation.
|
|
void | setLangevinCollisionFrequency (double langevin_frequency_in) |
| Set the collision frequency for the Langevin thermostat. This will also set the scaled form of the value.
|
|
void | setAndersenResetFrequency (int andersen_frequency_in) |
| Set the Andersen velocity reassignment frequency. This will be taken from user input.
|
|
void | setTimeStep (double time_step_in) |
| Set the time step. This will also set the scaled form of the value.
|
|
void | incrementStep () |
| Increase the step count by one. This will advance the simulation's official step counter.
|
|
void | decrementStep () |
| Decrease the step count by one. This will cause the simulation's official step counter to backtrack.
|
|
void | setGeometryConstraints (ApplyConstraints cnst_geometry_in) |
| Set the instruction for carrying out geometric constraints during dynamics.
|
|
void | setRattleTolerance (double rattle_tolerance_in) |
| Set the convergence criterion for RATTLE.
|
|
void | setRattleIterations (int rattle_iterations_in) |
| Set the maximum number of iterations to take when attempting to converge RATTLE bond length constraints.
|
|
void | setSynthesisForceLoading (bool load_synthesis_forces_in=true) |
| Set the integrator to take prior force computations residing in the PhaseSpaceSynthesis into account. This will have an effect in the dynamics of periodic systems when particle movement is fused to valence interaction computations. In this situation, by default all prior force computations would be expected to reside in the neighbor list grid (non-bonded forces). For non-periodic calculations, all prior force computations will be expected to accumulate in the PhaseSpaceSynthesis, meaning that this setting will have no effect.
|
|
void | validateTemperature (double temperature_in) |
| Validate the initial or final target temperature.
|
|
void | validateEvolutionWindow () |
| Validate the initial and final steps for applying the temperature evolution.
|
|
void | validateRandomCacheDepth () |
| Validate the random number cache depth. A maxmimum cache depth of 15 (45 total random numbers per atom) is enforced, and tightened in cases of exceptionally large systems.
|
|
void | initializeRandomStates (int new_seed=default_thermostat_random_seed, int scrub_cycles=25, HybridTargetLevel tier=HybridTargetLevel::HOST, const GpuDetails &gpu=null_gpu) |
| Initialize the random state vectors of a thermostat, whether for Langevin or Andersen thermostating. This passes a call on to a general-purpose function for seeding the generators and will recruit the GPU if available to expedite the process.
|
|
void | refresh (size_t index_start, size_t index_end, int refresh_depth=0) |
| Fill or refill the random number cache for a subset of the atoms, advancing the thermostat's random number generators in the process. This CPU-based function is intended to mimic GPU functionality, but the GPU operations are expected to be fused with other kernels.
|
|
|
| Thermostat (ThermostatKind kind_in=ThermostatKind::NONE, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
| Constructors for the Thermostat object. Any information can be added via setter functions after constructing the object.
|
|
| Thermostat (int atom_count_in, ThermostatKind kind_in, double temperature_in, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (int atom_count_in, ThermostatKind kind_in, double init_temperature_in, double final_temperature_in, int initial_evolution_step_in, int final_evolution_step_in, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (int atom_count_in, ThermostatKind kind_in, const std::vector< double > &initial_temperatures_in, const std::vector< double > &final_temperatures_in, const std::vector< int2 > &paritions_in, int initial_evolution_step_in=default_tstat_evo_window_start, int final_evolution_step_in=default_tstat_evo_window_end, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (const AtomGraph *ag, ThermostatKind kind_in, double initial_temperature_in, double final_temperature_in, int initial_evolution_step_in, int final_evolution_step_in, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (const AtomGraph &ag, ThermostatKind kind_in, double initial_temperature_in, double final_temperature_in, int initial_evolution_step_in, int final_evolution_step_in, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (const AtomGraph *ag, ThermostatKind kind_in, double temperature_in=default_simulation_temperature, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (const AtomGraph &ag, ThermostatKind kind_in, double temperature_in=default_simulation_temperature, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (const AtomGraph *ag, ThermostatKind kind_in, const std::vector< double > &initial_temperatures_in, const std::vector< double > &final_temperatures_in, const std::vector< int2 > &paritions_in, int initial_evolution_step_in=default_tstat_evo_window_start, int final_evolution_step_in=default_tstat_evo_window_end, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (const AtomGraph &ag, ThermostatKind kind_in, const std::vector< double > &initial_temperatures_in, const std::vector< double > &final_temperatures_in, const std::vector< int2 > &paritions_in, int initial_evolution_step_in=default_tstat_evo_window_start, int final_evolution_step_in=default_tstat_evo_window_end, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (const AtomGraphSynthesis *poly_ag, ThermostatKind kind_in, double initial_temperature_in, double final_temperature_in, int initial_evolution_step_in, int final_evolution_step_in, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (const AtomGraphSynthesis &poly_ag, ThermostatKind kind_in, double initial_temperature_in, double final_temperature_in, int initial_evolution_step_in, int final_evolution_step_in, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (const AtomGraphSynthesis *poly_ag, ThermostatKind kind_in, double temperature_in=default_simulation_temperature, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (const AtomGraphSynthesis &poly_ag, ThermostatKind kind_in, double temperature_in=default_simulation_temperature, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (const AtomGraphSynthesis *poly_ag, ThermostatKind kind_in, const std::vector< double > &initial_temperatures_in, const std::vector< double > &final_temperatures_in, const std::vector< int2 > &paritions_in, int initial_evolution_step_in=default_tstat_evo_window_start, int final_evolution_step_in=default_tstat_evo_window_end, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (const AtomGraphSynthesis &poly_ag, ThermostatKind kind_in, const std::vector< double > &initial_temperatures_in, const std::vector< double > &final_temperatures_in, const std::vector< int2 > &paritions_in, int initial_evolution_step_in=default_tstat_evo_window_start, int final_evolution_step_in=default_tstat_evo_window_end, PrecisionModel cache_config_in=PrecisionModel::SINGLE, int random_seed_in=default_thermostat_random_seed, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (const AtomGraphSynthesis *poly_ag, const DynamicsControls &dyncon, const SystemCache &sc, const std::vector< int > &sc_origins, const GpuDetails &gpu=null_gpu) |
|
| Thermostat (const AtomGraphSynthesis &poly_ag, const DynamicsControls &dyncon, const SystemCache &sc, const std::vector< int > &sc_origins, const GpuDetails &gpu=null_gpu) |
|
|
| Thermostat (const Thermostat &original)=default |
| The default copy and move constructors and assignment operators are best for this object with no POINTER-kind Hybrid objects.
|
|
| Thermostat (Thermostat &&original)=default |
|
Thermostat & | operator= (const Thermostat &original)=default |
|
Thermostat & | operator= (Thermostat &&original)=default |
|
|
const ThermostatReader< double > | dpData (HybridTargetLevel tier=HybridTargetLevel::HOST) const |
| Get the abstract.
|
|
ThermostatWriter< double > | dpData (HybridTargetLevel tier=HybridTargetLevel::HOST) |
|
const ThermostatReader< float > | spData (HybridTargetLevel tier=HybridTargetLevel::HOST) const |
|
ThermostatWriter< float > | spData (HybridTargetLevel tier=HybridTargetLevel::HOST) |
|
|
void | setTemperature (double initial_temperature_in, double final_temperature_in=-1.0) |
| Set the initial target temperature.
|
|
void | setTemperature (const std::vector< double > &initial_temperatures_in, const std::vector< double > &final_temperatures_in, const std::vector< int2 > &partitions_in) |
|