10 #ifndef IMPNPCTRANSPORT_STATISTICS_H
11 #define IMPNPCTRANSPORT_STATISTICS_H
14 #include "npctransport_config.h"
30 #include <RMF/HDF5/File.h>
41 #include <IMP/internal/SimpleTimer.h>
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>
52 struct SimpleTimer {};
58 IMPNPCTRANSPORT_BEGIN_NAMESPACE
71 Parameter<int> statistics_interval_frames_;
74 std::string output_file_name_;
79 typedef std::vector< BodyStatisticsOptimizerStates >
81 typedef IMP_KERNEL_LARGE_UNORDERED_MAP<core::ParticleType, FGsBodyStatisticsOSs>
82 FGsBodyStatisticsOSsMap;
83 FGsBodyStatisticsOSsMap fgs_bodies_stats_map_;
86 typedef IMP_KERNEL_LARGE_UNORDERED_MAP<core::ParticleType, BodyStatisticsOptimizerStates>
88 BodyStatisticsOSsMap floaters_stats_map_;
93 ParticleTransportStatisticsOSsMap;
94 ParticleTransportStatisticsOSsMap floaters_transport_stats_map_;
96 int update_calls_ = 0;
101 std::vector< std::vector<int> > >
102 ParticleTypeZRDistributionMap;
103 ParticleTypeZRDistributionMap particle_type_zr_distribution_map_;
107 boost::value_initialized<unsigned int> > > >
111 ParticleTypeXYZDistributionMap;
112 ParticleTypeXYZDistributionMap particle_type_xyz_distribution_map_;
113 struct t_size_3d_matrix{
118 t_size_3d_matrix xyz_distribution_sizes_;
122 typedef IMP_KERNEL_LARGE_UNORDERED_MAP<core::ParticleType, ChainStatisticsOptimizerStates>
123 ChainStatisticsOSsMap;
124 ChainStatisticsOSsMap chains_stats_map_;
129 BipartitePairsStatisticsOSMap;
130 BipartitePairsStatisticsOSMap interaction_stats_map_;
134 mutable bool is_stats_reset_;
156 unsigned int statistics_interval_frames,
157 std::string output_file_name);
164 void add_fg_chain_stats(
FGChain* fg_chain);
180 void add_interaction_stats
201 void update_particle_type_zr_distribution_map(
Particle* p);
210 void update_particle_type_xyz_distribution_map(
Particle* p);
240 void update(
const IMP::internal::SimpleTimer &timer,
241 unsigned int nf_new = 1,
242 bool force_full_output =
false);
246 void reset_statistics_optimizer_states();
249 void set_interrupted(
bool tf);
260 Model* get_model()
const;
271 return is_activated_;
281 std::string get_output_file_name()
const{
282 return output_file_name_;
289 bool update_xyz_distribution_to_hdf5
290 (RMF::HDF5::Group hdf5_group,
297 void update_fg_stats( ::npctransport_proto::Statistics* pStats,
299 unsigned int zr_hist[4][3]);
306 std::map<IMP::core::ParticleType, double> update_floater_stats( ::npctransport_proto::Statistics* pStats,
307 unsigned int nf_new);
322 boost::tuple<double, double, double, double> get_interactions_and_interacting
326 double get_z_distribution_top()
const;
329 double get_r_distribution_max()
const;
341 boost::tuple<int, int, int, int>
352 void fill_in_zr_hist(
unsigned int zr_hist[4][3],
355 void update_hdf5_statistics();
364 inline IMPNPCTRANSPORTEXPORT IMP::internal::SimpleTimer create_boost_timer() {
365 return IMP::internal::SimpleTimer();
368 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.
Track the rotational correlation time of a rigid body particle.
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.