IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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
16IMPNPCTRANSPORT_BEGIN_NAMESPACE
17//TODO: add tester
18class 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*/
22class 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
52IMPNPCTRANSPORT_END_NAMESPACE
53
54#endif /* IMPNPCTRANSPORT_GLOBAL_STATISTICS_OPTIMIZER_STATE_H */
Shared optimizer state.
OptimizerState(Model *m, std::string name)
Constructor.
void reset() override
Reset counters, as if at the start of an optimize run.
GlobalStatisticsOptimizerState(IMP::npctransport::Statistics *statistics_manager=nullptr, unsigned int periodicity=1)
virtual void do_update(unsigned int call_num) override
Statistics and order parameters about the simulations.
Definition Statistics.h:63
IMP::Vector< IMP::Pointer< GlobalStatisticsOptimizerState > > GlobalStatisticsOptimizerStates
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Smart pointer to Object-derived classes that does not refcount.
Definition WeakPointer.h:78
description