IMP Reference Guide
2.22.0
The Integrative Modeling Platform
|
Statistics and order parameters about the simulations. More...
#include <IMP/npctransport/Statistics.h>
Statistics and order parameters about the simulations.
Definition at line 63 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 () |
Model * | get_model () |
Model * | get_model () const |
std::string | get_output_file_name () const |
SimulationData * | get_sd () |
SimulationData const * | get_sd () const |
virtual std::string | get_type_name () const override |
virtual ::IMP::VersionInfo | get_version_info () const override |
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 IMP::internal::SimpleTimer &timer, unsigned int nf_new=1, bool force_full_output=false) |
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 () |
IMP::npctransport::Statistics::Statistics | ( | SimulationData * | sd, |
unsigned int | statistics_interval_frames, | ||
std::string | output_file_name | ||
) |
sd | the sd that owns and uses this statistics object |
statistics_interval_frames | the interval of simulation frames for gathering statistics |
output_file_name | name of output file to which to dump statistics (or update if it already exists) when calling update() |
void IMP::npctransport::Statistics::add_fg_chain_stats | ( | FGChain * | fg_chain | ) |
add statistics about an FG chain
add statistics about an FG chains
fg_chain | the chain |
void IMP::npctransport::Statistics::add_floater_stats | ( | IMP::Particle * | p | ) |
add statistics about a floater particle
add statistics about a floater particle
p | the 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)
type0 | type of first interacting particles |
type1 | type of other interacting particles |
OptimizerStates IMP::npctransport::Statistics::add_optimizer_states | ( | Optimizer * | o = nullptr | ) |
add all statistics-related optimizer states to o
o | optimizer to which optimizer states are added, use get_sd()->get_bd() if nullptr |
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 270 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 264 of file npctransport/Statistics.h.
SimulationData const* IMP::npctransport::Statistics::get_sd | ( | ) | const |
return the SimulationData object that owns this ScoringFunction
Definition at line 276 of file npctransport/Statistics.h.
|
overridevirtual |
Get information about the module and version of the object.
Reimplemented from IMP::Object.
Definition at line 359 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()
pt | the 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 IMP::internal::SimpleTimer & | timer, |
unsigned int | nf_new = 1 , |
||
bool | force_full_output = false |
||
) |
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().
UsageException | If add_optimizer_states() was not called yet (= get_is_activated() is false) |
timer | the timer that was used to measure the time that has elapsed for statistics |
nf_new | the number of frames by which the statistics file should be advanced. This is used to weight the contribution of average statistics over time. |
force_full_output | if true, then full statistics are dumped to the output file, even if the number of calls to update does not divide by the value of full_output_statistics_interval_factor |
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