IMP  2.0.0
The Integrative Modeling Platform
MoveStatisticsScoreState.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/MoveStatisticsScoreState.h
3  * \brief Write geometry to a file during optimization
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPCORE_MOVE_STATISTICS_SCORE_STATE_H
9 #define IMPCORE_MOVE_STATISTICS_SCORE_STATE_H
10 
11 #include <IMP/core/core_config.h>
12 #include <IMP/OptimizerState.h>
13 #include <IMP/internal/utility.h>
14 #include <IMP/algebra/Vector3D.h>
15 #include <IMP/score_state_macros.h>
16 #include <IMP/io.h>
17 
18 IMPCORE_BEGIN_NAMESPACE
19 
20 //! Keep track of statistics about how particles move.
21 /** Keep track of average and maximum moves for a set
22  of particles during optimization.
23  */
24 class IMPCOREEXPORT MoveStatisticsScoreState: public ScoreState
25 {
26  Particles ps_;
27  algebra::Vector3Ds last_;
28  double max_move_;
29  std::string max_mover_;
30  double max_average_;
31  double total_move_;
32  double total_movers_;
33  bool init_;
34 public:
35  MoveStatisticsScoreState(const ParticlesTemp& ps);
36  void show_statistics(std::ostream &out=std::cout) const;
37  void reset();
39 };
40 
41 
42 IMPCORE_END_NAMESPACE
43 
44 #endif /* IMPCORE_MOVE_STATISTICS_SCORE_STATE_H */