STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::review::Watcher Class Reference

The Watcher class exists to take note of 'significant' events that may occur while propagating a trajectory or during an energy minimization. Various O(N) processes may be recorded without adding significantly to the simulation cost, which could provide valuable information as to why it may be failing or even indicate problems in situations that appear otherwise normal. More...

#include <watcher.h>

Public Member Functions

int getReportCount () const
 Get the maximum number of reports that the object is designed to hold.
 
int getSystemCount () const
 Get the number of systems from the associated coordinate synthesis.
 
float getForceThreshold () const
 Get the threshold at which the object will report large forces on atoms.
 
int getLargeForceCount (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the number of large forces on atoms found throughout the simulation.
 
std::vector< float4getLargeForces (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the list of large forces observed over the course of simulations on a set of systems.
 
std::vector< int > getLargeForceSteps (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the list of step counts at which each large force in the list of all large forces was observed.
 
std::vector< DynamicsStepStage > getLargeForceStages (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the points in the integration cycle at which each of the large forces were observed. The integration cycle is not the coordinate time cycle, rather a more detailed list of the stages within each time step that will help narrow down the source of jarring forces or sudden movement.
 
float getSpeedThreshold () const
 Get the threshold at which the object will report large velocities on atoms.
 
int getHighSpeedCount (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the number of high velocities encountered in the simulation.
 
std::vector< float4getHighSpeeds (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the list of high velocities observed over the course of simulations on a set of systems.
 
std::vector< int > getHighSpeedSteps (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the list of step counts at which each high velocity in the list of all high veloicities was observed.
 
std::vector< DynamicsStepStage > getHighSpeedStages (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the points in the integration cycle at which each high particle velocity was found.
 
int getFailedRattleCount (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the number of times the RATTLE constraint iteration limit was reached (without the requested convergence being achieved).
 
int getFailedShakeCount (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the number of times the SHAKE constraint iteration limit was reached (without the requested convergence being achieved). Descriptions of input parameters follow from getRattleIterationViolations(), above.
 
std::vector< uint2getRattleFailures (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the list of RATTLE violations–group IDs in the "x" member of the tuple (as listed in the associated topology synthesis) and the step number at which the constraint failed to converge in the "y" member.
 
std::vector< uint2getShakeFailures (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the list of SHAKE violations–group IDs in the "x" member of the tuple (as listed in the associated topology synthesis) and the step number at which the constraint failed to converge in the "y" member.
 
std::vector< float > getRattleViolations (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the violation of a constraint which failed to converge, or the maximum violation of any constraint within a group that failed to converge, for each failed RATTLE group reported by getRattleFailures().
 
std::vector< float > getShakeViolations (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the violation of a constraint which failed to converge, or the maximum violation of any constraint within a group that failed to converge, for each failed SHAKE group reported by getRattleFailures().
 
void setForceThreshold (float force_threshold_in)
 Set the threshold at which the object will report large forces.
 
void setSpeedThreshold (float speed_threshold_in)
 Set the threshold at which the object will report high particle speeds.
 
 Watcher (const PhaseSpaceSynthesis *poly_ps, const AtomGraphSynthesis &poly_ag, float force_threshold_in=default_watcher_force_threshold, float speed_threshold_in=default_watcher_speed_threshold, bool track_momentum_purge_in=false, int max_reports_in=default_max_watcher_reports, ExceptionResponse policy_in=ExceptionResponse::WARN)
 The constructor requires a coordinate synthesis in order to allocate the proper amount of space for the number of systems in the calulation.
 
 Watcher (const PhaseSpaceSynthesis &poly_ps, const AtomGraphSynthesis &poly_ag, float force_threshold_in=default_watcher_force_threshold, float speed_threshold_in=default_watcher_speed_threshold, bool track_momentum_purge_in=false, int max_reports_in=default_max_watcher_reports, ExceptionResponse policy_in=ExceptionResponse::WARN)
 
 Watcher (const Watcher &original)
 The presence of POINTER-kind Hybrid objects implies pointers to repair and thus manual coding of copy and move constructors as well as copy and move assignment operators.
 
 Watcher (Watcher &&original)
 
Watcheroperator= (const Watcher &original)
 
Watcheroperator= (Watcher &&original)
 
const WatcherReader data (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the object's abstract.
 
WatcherWriter data (HybridTargetLevel tier=HybridTargetLevel::HOST)
 

Detailed Description

The Watcher class exists to take note of 'significant' events that may occur while propagating a trajectory or during an energy minimization. Various O(N) processes may be recorded without adding significantly to the simulation cost, which could provide valuable information as to why it may be failing or even indicate problems in situations that appear otherwise normal.

Constructor & Destructor Documentation

◆ Watcher()

stormm::review::Watcher::Watcher ( const Watcher & original)

The presence of POINTER-kind Hybrid objects implies pointers to repair and thus manual coding of copy and move constructors as well as copy and move assignment operators.

Parameters
originalThe original object to copy or move
otherAnother object placed on the right-hand-side of the assignment operation

Member Function Documentation

◆ data()

const WatcherReader stormm::review::Watcher::data ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the object's abstract.

Overloaded:

  • Obtain a read-only abstrat from a const object
  • Obtain a mutable abstract from a non-const object
Parameters
tierIndicate whether to target pointers to data on the CPU host or GPU device

◆ getFailedRattleCount()

int stormm::review::Watcher::getFailedRattleCount ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the number of times the RATTLE constraint iteration limit was reached (without the requested convergence being achieved).

Parameters
tierObtain results from the CPU host or GPU device memory

◆ getFailedShakeCount()

int stormm::review::Watcher::getFailedShakeCount ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the number of times the SHAKE constraint iteration limit was reached (without the requested convergence being achieved). Descriptions of input parameters follow from getRattleIterationViolations(), above.

Parameters
tierTake the result from CPU host or GPU device memory

◆ getHighSpeedCount()

int stormm::review::Watcher::getHighSpeedCount ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the number of high velocities encountered in the simulation.

Parameters
tierTake the result from CPU host or GPU device memory

◆ getHighSpeeds()

std::vector< float4 > stormm::review::Watcher::getHighSpeeds ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the list of high velocities observed over the course of simulations on a set of systems.

Parameters
tierTake the result from CPU host or GPU device memory

◆ getHighSpeedStages()

std::vector< DynamicsStepStage > stormm::review::Watcher::getHighSpeedStages ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the points in the integration cycle at which each high particle velocity was found.

Parameters
tierTake the result from CPU host or GPU device memory

◆ getHighSpeedSteps()

std::vector< int > stormm::review::Watcher::getHighSpeedSteps ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the list of step counts at which each high velocity in the list of all high veloicities was observed.

Parameters
tierTake the result from CPU host or GPU device memory

◆ getLargeForceCount()

int stormm::review::Watcher::getLargeForceCount ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the number of large forces on atoms found throughout the simulation.

Parameters
tierTake the result from CPU host or GPU device memory

◆ getLargeForces()

std::vector< float4 > stormm::review::Watcher::getLargeForces ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the list of large forces observed over the course of simulations on a set of systems.

Parameters
tierTake the result from CPU host or GPU device memory

◆ getLargeForceStages()

std::vector< DynamicsStepStage > stormm::review::Watcher::getLargeForceStages ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the points in the integration cycle at which each of the large forces were observed. The integration cycle is not the coordinate time cycle, rather a more detailed list of the stages within each time step that will help narrow down the source of jarring forces or sudden movement.

Parameters
tierTake the result from CPU host or GPU device memory

◆ getLargeForceSteps()

std::vector< int > stormm::review::Watcher::getLargeForceSteps ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the list of step counts at which each large force in the list of all large forces was observed.

Parameters
tierTake the result from CPU host or GPU device memory

◆ getRattleFailures()

std::vector< uint2 > stormm::review::Watcher::getRattleFailures ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the list of RATTLE violations–group IDs in the "x" member of the tuple (as listed in the associated topology synthesis) and the step number at which the constraint failed to converge in the "y" member.

Parameters
tierObtain results from the CPU host or GPU device memory

◆ getRattleViolations()

std::vector< float > stormm::review::Watcher::getRattleViolations ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the violation of a constraint which failed to converge, or the maximum violation of any constraint within a group that failed to converge, for each failed RATTLE group reported by getRattleFailures().

Parameters
tierObtain results from the CPU host or GPU device memory

◆ getShakeFailures()

std::vector< uint2 > stormm::review::Watcher::getShakeFailures ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the list of SHAKE violations–group IDs in the "x" member of the tuple (as listed in the associated topology synthesis) and the step number at which the constraint failed to converge in the "y" member.

Parameters
tierObtain results from the CPU host or GPU device memory

◆ getShakeViolations()

std::vector< float > stormm::review::Watcher::getShakeViolations ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the violation of a constraint which failed to converge, or the maximum violation of any constraint within a group that failed to converge, for each failed SHAKE group reported by getRattleFailures().

Parameters
tierObtain results from the CPU host or GPU device memory

◆ setForceThreshold()

void stormm::review::Watcher::setForceThreshold ( float force_threshold_in)

Set the threshold at which the object will report large forces.

Parameters
force_threshold_inThe magnitude of a force which will be reported as a significant event for subsequent error analysis

◆ setSpeedThreshold()

void stormm::review::Watcher::setSpeedThreshold ( float speed_threshold_in)

Set the threshold at which the object will report high particle speeds.

Parameters
speed_threshold_inThe magnitude of a particle velocity which will be reported as a significant event for subsequent error analysis

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