10 #ifndef IMPNPCTRANSPORT_STATISTICS_H
11 #define IMPNPCTRANSPORT_STATISTICS_H
14 #include "npctransport_config.h"
30 #include <RMF/HDF5/File.h>
41 #include <boost/timer.hpp>
42 #include "boost/tuple/tuple.hpp"
43 #include <boost/utility/value_init.hpp>
44 #include <boost/unordered_map.hpp>
45 #include <boost/unordered_set.hpp>
56 IMPNPCTRANSPORT_BEGIN_NAMESPACE
69 Parameter<int> statistics_interval_frames_;
72 std::string output_file_name_;
77 typedef std::vector< BodyStatisticsOptimizerStates >
79 typedef IMP_KERNEL_LARGE_UNORDERED_MAP<core::ParticleType, FGsBodyStatisticsOSs>
80 FGsBodyStatisticsOSsMap;
81 FGsBodyStatisticsOSsMap fgs_bodies_stats_map_;
84 typedef IMP_KERNEL_LARGE_UNORDERED_MAP<core::ParticleType, BodyStatisticsOptimizerStates>
86 BodyStatisticsOSsMap floaters_stats_map_;
91 ParticleTransportStatisticsOSsMap;
92 ParticleTransportStatisticsOSsMap floaters_transport_stats_map_;
97 std::vector< std::vector<int> > >
98 ParticleTypeZRDistributionMap;
99 ParticleTypeZRDistributionMap particle_type_zr_distribution_map_;
103 boost::value_initialized<unsigned int> > > >
108 ParticleTypeXYZDistributionMap;
109 ParticleTypeXYZDistributionMap particle_type_xyz_distribution_map_;
110 struct t_size_3d_matrix{
115 t_size_3d_matrix xyz_distribution_sizes_;
119 typedef IMP_KERNEL_LARGE_UNORDERED_MAP<core::ParticleType, ChainStatisticsOptimizerStates>
120 ChainStatisticsOSsMap;
121 ChainStatisticsOSsMap chains_stats_map_;
126 BipartitePairsStatisticsOSMap;
127 BipartitePairsStatisticsOSMap interaction_stats_map_;
131 mutable bool is_stats_reset_;
153 unsigned int statistics_interval_frames,
154 std::string output_file_name);
161 void add_fg_chain_stats(
FGChain* fg_chain);
177 void add_interaction_stats
198 void update_particle_type_zr_distribution_map(
Particle* p);
207 void update_particle_type_xyz_distribution_map(
Particle* p);
229 void update(
const boost::timer &timer,
230 unsigned int nf_new = 1);
234 void reset_statistics_optimizer_states();
237 void set_interrupted(
bool tf);
248 Model* get_model()
const;
259 return is_activated_;
269 std::string get_output_file_name()
const{
270 return output_file_name_;
277 bool update_xyz_distribution_to_hdf5
278 (RMF::HDF5::Group hdf5_group,
284 void update_fg_stats( ::npctransport_proto::Statistics* pStats,
286 unsigned int zr_hist[4][3],
287 RMF::HDF5::File hdf5_file);
302 boost::tuple<double, double, double, double> get_interactions_and_interacting
306 double get_z_distribution_top()
const;
309 double get_r_distribution_max()
const;
321 boost::tuple<int, int, int, int>
332 void fill_in_zr_hist(
unsigned int zr_hist[4][3],
342 inline IMPNPCTRANSPORTEXPORT boost::timer create_boost_timer() {
343 return boost::timer();
346 IMPNPCTRANSPORT_END_NAMESPACE
Apply a PairScore to each Pair in a list.
std::pair< IMP::core::ParticleType, IMP::core::ParticleType > InteractionType
an interaction that involves particles of two types
Simple Brownian dynamics optimizer.
scoring associated with a SimulationData object
Store a list of ParticleIndexes.
SimulationData * get_sd()
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Store a set of PairContainers.
Storage of a model, its restraints, constraints and particles.
Score particles based on a bounding box.
Dump the state of all associated objects into the RMF file.
Key< 34897493 > ParticleType
An IMP::Key object for identifying types of particles by strings.
Statistics and order parameters about the simulations.
A weak pointer to an Object or RefCountedObject.
A more IMP-like version of the std::vector.
Implement geometry for the basic shapes from IMP.algebra.
A particle with a user-defined type.
Macros to choose the best set or map for different purposes.
Class for storing model, its restraints, constraints, and particles.
Decorator for helping deal with a hierarchy of molecules.
Common base class for heavy weight IMP objects.
Return all pairs from a SingletonContainer.
Base class for all optimizers.
A smart pointer to a ref-counted Object that is a class member.
SimulationData const * get_sd() const
Store all parameters for a simulation.
A nullptr-initialized pointer to an IMP Object.
Class to handle individual particles of a Model object.
#define IMP_KERNEL_LARGE_UNORDERED_MAP
Macro to support platform independent declaration of a large unordered map.