IMP  2.2.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-2014 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/ScoreState.h>
13 #include <IMP/kernel/internal/utility.h>
14 #include <IMP/algebra/Vector3D.h>
15 #include <IMP/io.h>
16 
17 IMPCORE_BEGIN_NAMESPACE
18 
19 //! Keep track of statistics about how particles move.
20 /** Keep track of average and maximum moves for a set
21  of particles during optimization.
22  */
23 class IMPCOREEXPORT MoveStatisticsScoreState : public ScoreState {
25  algebra::Vector3Ds last_;
26  double max_move_;
27  std::string max_mover_;
28  double max_average_;
29  double total_move_;
30  double total_movers_;
31  bool init_;
32 
33  public:
35  void show_statistics(std::ostream& out = std::cout) const;
36  void reset();
37  virtual void do_before_evaluate() IMP_OVERRIDE;
38  virtual void do_after_evaluate(DerivativeAccumulator* da) IMP_OVERRIDE;
42 };
43 
44 IMPCORE_END_NAMESPACE
45 
46 #endif /* IMPCORE_MOVE_STATISTICS_SCORE_STATE_H */
Class for adding derivatives from restraints to the model.
Import IMP/kernel/io.h in the namespace.
ScoreStates maintian invariants in the Model.
Keep track of statistics about how particles move.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Import IMP/kernel/ScoreState.h in the namespace.
virtual ModelObjectsTemp do_get_inputs() const =0
Simple 3D vector class.
virtual ModelObjectsTemp do_get_outputs() const =0