IMP logo
IMP Reference Guide  2.13.0
The Integrative Modeling Platform
IMP::npctransport::Statistics Class Reference

Statistics and order parameters about the simulations. More...

#include <IMP/npctransport/Statistics.h>

+ Inheritance diagram for IMP::npctransport::Statistics:

Detailed Description

Statistics and order parameters about the simulations.

Definition at line 61 of file npctransport/Statistics.h.

Public Member Functions

 Statistics (SimulationData *sd, unsigned int statistics_interval_frames, std::string output_file_name)
 
void add_fg_chain_stats (FGChain *fg_chain)
 add statistics about an FG chain More...
 
void add_floater_stats (IMP::Particle *p)
 add statistics about a floater particle More...
 
void add_interaction_stats (core::ParticleType type0, core::ParticleType type1)
 add statistics about interactions between particles of type 0 and 1 More...
 
OptimizerStates add_optimizer_states (Optimizer *o=nullptr)
 add all statistics-related optimizer states to o More...
 
bool get_is_activated ()
 
Modelget_model ()
 
Modelget_model () const
 
std::string get_output_file_name () const
 
SimulationDataget_sd ()
 
SimulationData const * get_sd () const
 
virtual std::string get_type_name () const
 
virtual ::IMP::VersionInfo get_version_info () const
 Get information about the module and version of the object. More...
 
void remove_particle_type (core::ParticleType pt)
 Remove all statistics related to particle type pt. More...
 
void reset_statistics_optimizer_states ()
 
void set_interrupted (bool tf)
 Loads the stats file and set the interrupted flag to true. More...
 
void update (const boost::timer &timer, unsigned int nf_new=1)
 
void update_particle_type_xyz_distribution_map (Particle *p)
 
void update_particle_type_zr_distribution_map (Particle *p)
 
- Public Member Functions inherited from IMP::Object
virtual void clear_caches ()
 
CheckLevel get_check_level () const
 
LogLevel get_log_level () const
 
void set_check_level (CheckLevel l)
 
void set_log_level (LogLevel l)
 Set the logging level used in this object. More...
 
void set_was_used (bool tf) const
 
void show (std::ostream &out=std::cout) const
 
const std::string & get_name () const
 
void set_name (std::string name)
 

Additional Inherited Members

- Protected Member Functions inherited from IMP::Object
 Object (std::string name)
 Construct an object with the given name. More...
 
virtual void do_destroy ()
 

Constructor & Destructor Documentation

IMP::npctransport::Statistics::Statistics ( SimulationData sd,
unsigned int  statistics_interval_frames,
std::string  output_file_name 
)
Parameters
sdthe sd that owns and uses this statistics object
statistics_interval_framesthe interval of simulation frames for gathering statistics
output_file_namename of output file to which to dump statistics (or update if it already exists) when calling update()

Member Function Documentation

void IMP::npctransport::Statistics::add_fg_chain_stats ( FGChain fg_chain)

add statistics about an FG chain

add statistics about an FG chains

Parameters
fg_chainthe chain
void IMP::npctransport::Statistics::add_floater_stats ( IMP::Particle p)

add statistics about a floater particle

add statistics about a floater particle

Parameters
pthe particle
void IMP::npctransport::Statistics::add_interaction_stats ( core::ParticleType  type0,
core::ParticleType  type1 
)

add statistics about interactions between particles of type 0 and 1

add statistics about interactions between particles of type 0 and 1 (order does not matter)

Parameters
type0type of first interacting particles
type1type of other interacting particles
OptimizerStates IMP::npctransport::Statistics::add_optimizer_states ( Optimizer o = nullptr)

add all statistics-related optimizer states to o

Parameters
ooptimizer to which optimizer states are added, use get_sd()->get_bd() if nullptr
Returns
the list of optimizer states that were added
Note
If called for more than one optimizer, only the last optimizer will be guaranteed to work well.
bool IMP::npctransport::Statistics::get_is_activated ( )

if true, statistics have been activated, so add_optimizer_states() was called such that statistics are being tracked

Definition at line 258 of file npctransport/Statistics.h.

Model* IMP::npctransport::Statistics::get_model ( )

returns the model associated with the owned SimulationData

Model* IMP::npctransport::Statistics::get_model ( ) const

returns the model associated with the owned SimulationData

SimulationData* IMP::npctransport::Statistics::get_sd ( )

return the SimulationData object that owns this ScoringFunction

Definition at line 252 of file npctransport/Statistics.h.

SimulationData const* IMP::npctransport::Statistics::get_sd ( ) const

return the SimulationData object that owns this ScoringFunction

Definition at line 264 of file npctransport/Statistics.h.

virtual ::IMP::VersionInfo IMP::npctransport::Statistics::get_version_info ( ) const
virtual

Get information about the module and version of the object.

Reimplemented from IMP::Object.

Definition at line 337 of file npctransport/Statistics.h.

void IMP::npctransport::Statistics::remove_particle_type ( core::ParticleType  pt)

Remove all statistics related to particle type pt.

Removes statistics of particle type pt from all internal maps and from the optimizer states of get_sd()->get_bd()

Parameters
ptthe particle type to be removed
void IMP::npctransport::Statistics::reset_statistics_optimizer_states ( )

resets all the counters of any statistics counters, and the simulation time to zero

void IMP::npctransport::Statistics::set_interrupted ( bool  tf)

Loads the stats file and set the interrupted flag to true.

void IMP::npctransport::Statistics::update ( const boost::timer &  timer,
unsigned int  nf_new = 1 
)

opens / creates statistics protobuf file, and update it with appropriate statistics, using statistics file originally specified in the constructor, and based on statistics gathered from the optimizer that was specified by add_optimizer_states().

Exceptions
UsageExceptionIf add_optimizer_states() was not called yet (= get_is_activated() is false)
Parameters
timerthe timer that was used to measure the time that has elapsed for statistics
nf_newthe number of frames by which the statistics file should be advanced. This is used to weight the contribution of average statistics over time.
Note
this method is not const cause it may invoke e.g., energy evaluation though it does not substantially change anything in the state of the object
void IMP::npctransport::Statistics::update_particle_type_xyz_distribution_map ( Particle p)

updates the map of x-y-z distributions of particle coordinates with p's binned position counts (if z-symmetry flag is on, z is absolute vertical location)

Comment: assume a pore geometry, no checks made that it is so

void IMP::npctransport::Statistics::update_particle_type_zr_distribution_map ( Particle p)

updates the map of z-r distributions of particle coordinates with p's binned position counts (if z-symmetry flag is on, z is absolute vertical location; r is distance from pore axis)

Comment: assume a pore geometry, no checks made that it is so


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