IMP  2.1.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/kernel/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 {
26  algebra::Vector3Ds last_;
27  double max_move_;
28  std::string max_mover_;
29  double max_average_;
30  double total_move_;
31  double total_movers_;
32  bool init_;
33 
34  public:
36  void show_statistics(std::ostream& out = std::cout) const;
37  void reset();
38  virtual void do_before_evaluate() IMP_OVERRIDE;
39  virtual void do_after_evaluate(DerivativeAccumulator* da) IMP_OVERRIDE;
43 };
44 
45 IMPCORE_END_NAMESPACE
46 
47 #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/score_state_macros.h in the namespace.
virtual ModelObjectsTemp do_get_inputs() const =0
Simple 3D vector class.
Import IMP/kernel/OptimizerState.h in the namespace.
virtual ModelObjectsTemp do_get_outputs() const =0