IMP logo
IMP Reference Guide  2.24.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-2026 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>
14 #include <deque>
15 
16 IMPNPCTRANSPORT_BEGIN_NAMESPACE
17 //TODO: add tester
18 class Statistics;
19 
20 /** Track the rotational correlation time of a rigid body particle*/
21 /** The correlation with at most the last 100 updates is tracked*/
22 class IMPNPCTRANSPORTEXPORT GlobalStatisticsOptimizerState
23  : public OptimizerState {
24  private:
25  typedef OptimizerState P;
27  double mean_energy_;
28  int n_;
29 
30  public:
31  /**
32  @param statistics_manager an optional statistical manager to which statistical updates are sent
33  (of e.g. zr-distribution that are collectively gathered)
34  @param periodicity frame interval for statistics, equiv. to set_period(1)
35  */
37  (IMP::npctransport::Statistics* statistics_manager = nullptr,
38  unsigned int periodicity=1);
39 
40  void reset() override;
41 
42  virtual void do_update(unsigned int call_num) override;
43 
44  double get_mean_energy() {
45  return mean_energy_;
46  }
47 
49 };
51 
52 IMPNPCTRANSPORT_END_NAMESPACE
53 
54 #endif /* IMPNPCTRANSPORT_GLOBAL_STATISTICS_OPTIMIZER_STATE_H */
Smart pointer to Object-derived classes that does not refcount.
Definition: WeakPointer.h:77
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
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:50
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.