RASPA3 3.0.12
A molecular simulation code for computing adsorption and diffusion in nanoporous materials
Loading...
Searching...
No Matches
MoveStatistics< T > Struct Template Referenceexport

Collects and manages statistical data for move operations. More...

Public Member Functions

bool operator== (MoveStatistics< T > const &) const =default
 
void clear ()
 Resets the statistical counters.
 
void optimizeAcceptance ()
 Optimizes the acceptance rate of moves.
 
template<class U >
MoveStatisticsoperator+= (const MoveStatistics< U > &b)
 

Public Attributes

std::uint64_t versionNumber {2}
 Version number for serialization purposes.
 
counts {}
 Number of move attempts.
 
constructed {}
 Number of moves constructed.
 
accepted {}
 Number of moves accepted.
 
std::size_t allCounts {}
 Total number of counts across all types.
 
totalCounts {}
 Total move attempts across all simulations.
 
totalConstructed {}
 Total moves constructed across all simulations.
 
totalAccepted {}
 Total moves accepted across all simulations.
 
maxChange {}
 Maximum allowed change in move parameters.
 
targetAcceptance {0.5}
 Target acceptance rate for moves.
 
lowerLimit {}
 
upperLimit {}
 
bool optimize {true}
 

Friends

template<class U >
Archive< std::ofstream > & operator<< (Archive< std::ofstream > &archive, const MoveStatistics< U > &m)
 
template<class U >
Archive< std::ifstream > & operator>> (Archive< std::ifstream > &archive, MoveStatistics< U > &m)
 

Detailed Description

template<typename T>
struct MoveStatistics< T >

Collects and manages statistical data for move operations.

The MoveStatistics struct accumulates statistics related to move operations in simulations. It keeps track of counts, acceptance rates, and allows for optimization of move parameters based on these statistics.

Template Parameters
TThe numeric type used for counting and statistical calculations (e.g., double).

Member Function Documentation

◆ clear()

template<typename T >
void MoveStatistics< T >::clear ( )
inline

Resets the statistical counters.

Clears all the counts and statistics to start fresh.

◆ optimizeAcceptance()

template<typename T >
void MoveStatistics< T >::optimizeAcceptance ( )
inline

Optimizes the acceptance rate of moves.

Adjusts the maximum change allowed in move parameters based on the acceptance rate to approach the target acceptance rate.


The documentation for this struct was generated from the following file: