IMP logo
IMP Reference Guide  2.18.0
The Integrative Modeling Platform
GlobalStatisticsOptimizerState.h
Go to the documentation of this file.
1 /**
2  * \file npctransport/GlobalStatisticsOptimizerState.h
3  * \brief description
4  *
5  * Copyright 2007-2022 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPNPCTRANSPORT_GLOBAL_STATISTICS_OPTIMIZER_STATE_H
9 #define IMPNPCTRANSPORT_GLOBAL_STATISTICS_OPTIMIZER_STATE_H
10 
11 #include "npctransport_config.h"
12 #include <IMP/OptimizerState.h>
13 //#include <IMP/optimizer_state_macros.h>
16 #include <deque>
17 
18 IMPNPCTRANSPORT_BEGIN_NAMESPACE
19 //TODO: add tester
20 class Statistics;
21 
22 /** Track the rotational correlation time of a rigid body particle*/
23 /** The correlation with at most the last 100 updates is tracked*/
24 class IMPNPCTRANSPORTEXPORT GlobalStatisticsOptimizerState
26  private:
29  double mean_energy_;
30  int n_;
31 
32  public:
33  /**
34  @param statistics_manager an optional statistical manager to which statistical updates are sent
35  (of e.g. zr-distribution that are collectively gathered)
36  @param periodicity frame interval for statistics, equiv. to set_period(1)
37  */
39  (IMP::npctransport::Statistics* statistics_manager = nullptr,
40  unsigned int periodicity=1);
41 
42  void reset() override;
43 
44  virtual void do_update(unsigned int call_num) override;
45 
46  double get_mean_energy() {
47  return mean_energy_;
48  }
49 
51 };
53 
54 IMPNPCTRANSPORT_END_NAMESPACE
55 
56 #endif /* IMPNPCTRANSPORT_GLOBAL_STATISTICS_OPTIMIZER_STATE_H */
Smart pointer to Object-derived classes that does not refcount.
Definition: WeakPointer.h:76
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Angle restraint between three particles.
virtual void do_update(unsigned int)
Statistics and order parameters about the simulations.
A more IMP-like version of the std::vector.
Definition: Vector.h:42
virtual void reset()
Reset counters, as if at the start of an optimize run.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
Definition: object_macros.h:44
Shared optimizer state that is invoked upon commitment of new coordinates.
description
Shared optimizer state.