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_;
99 std::vector< std::vector<int> > >
100 ParticleTypeZRDistributionMap;
101 ParticleTypeZRDistributionMap particle_type_zr_distribution_map_;
105 boost::value_initialized<unsigned int> > > >
110 ParticleTypeXYZDistributionMap;
111 ParticleTypeXYZDistributionMap particle_type_xyz_distribution_map_;
112 struct t_size_3d_matrix{
117 t_size_3d_matrix xyz_distribution_sizes_;
121 typedef IMP_KERNEL_LARGE_UNORDERED_MAP<core::ParticleType, ChainStatisticsOptimizerStates>
122 ChainStatisticsOSsMap;
123 ChainStatisticsOSsMap chains_stats_map_;
128 BipartitePairsStatisticsOSMap;
129 BipartitePairsStatisticsOSMap interaction_stats_map_;
133 mutable bool is_stats_reset_;
155 unsigned int statistics_interval_frames,
156 std::string output_file_name);
163 void add_fg_chain_stats(
FGChain* fg_chain);
179 void add_interaction_stats
200 void update_particle_type_zr_distribution_map(
Particle* p);
209 void update_particle_type_xyz_distribution_map(
Particle* p);
231 void update(
const IMP::internal::SimpleTimer &timer,
232 unsigned int nf_new = 1);
236 void reset_statistics_optimizer_states();
239 void set_interrupted(
bool tf);
250 Model* get_model()
const;
261 return is_activated_;
271 std::string get_output_file_name()
const{
272 return output_file_name_;
279 bool update_xyz_distribution_to_hdf5
280 (RMF::HDF5::Group hdf5_group,
286 void update_fg_stats( ::npctransport_proto::Statistics* pStats,
288 unsigned int zr_hist[4][3],
289 RMF::HDF5::File hdf5_file);
304 boost::tuple<double, double, double, double> get_interactions_and_interacting
308 double get_z_distribution_top()
const;
311 double get_r_distribution_max()
const;
323 boost::tuple<int, int, int, int>
334 void fill_in_zr_hist(
unsigned int zr_hist[4][3],
344 inline IMPNPCTRANSPORTEXPORT IMP::internal::SimpleTimer create_boost_timer() {
345 return IMP::internal::SimpleTimer();
348 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.