IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
BodyStatisticsOptimizerState.h
Go to the documentation of this file.
1/**
2 * \file npctransport/BodyStatisticsOptimizerState.h
3 * \brief Track the rotational correlation time of a rigid body particle
4 *
5 * Copyright 2007-2026 IMP Inventors. All rights reserved.
6 */
7
8#ifndef IMPNPCTRANSPORT_BODY_STATISTICS_OPTIMIZER_STATE_H
9#define IMPNPCTRANSPORT_BODY_STATISTICS_OPTIMIZER_STATE_H
10
11#include "npctransport_config.h"
12#include <IMP/Particle.h>
14#include <IMP/OptimizerState.h>
16#include <deque>
17
18IMPNPCTRANSPORT_BEGIN_NAMESPACE
19
20class 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*/
24class IMPNPCTRANSPORTEXPORT BodyStatisticsOptimizerState
25 : public OptimizerState {
26 private:
27 typedef OptimizerState P;
28 Particle *p_;
30
31 // time series of the positions of particles in the chain:
32 std::deque<algebra::Transformation3D> positions_;
33 std::deque<double> times_fs_;
34
35 Particle *get_particle() const { return p_; }
36
37 void add_orientation(algebra::Rotation3D rot) { positions_.push_back(rot); }
38
39 double get_dt() const;
40
41 public:
42 /**
43 @param p the particle being wrapped
44 @param statistics_manager an optional statistical manager to which statistical updates are sent
45 (of e.g. zr-distribution that are collectively gathered)
46 @param periodicity frame interval for statistics, equiv. to set_period(1)
47 */
49 (Particle *p,
50 IMP::npctransport::Statistics* statistics_manager = nullptr,
51 unsigned int periodicity=1);
52
53 double get_correlation_time() const;
54
55 double get_diffusion_coefficient() const;
56
57 void reset() override;
58
59 /** updates the z-r distribution table in owner's statistics
60 for this particle type (distribution of z coordinates and r coordinates)
61 */
63
64 virtual void do_update(unsigned int call_num) override;
65
67};
69
70IMPNPCTRANSPORT_END_NAMESPACE
71
72#endif /* IMPNPCTRANSPORT_BODY_STATISTICS_OPTIMIZER_STATE_H */
Shared optimizer state.
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
Simple 3D transformation class.
OptimizerState(Model *m, std::string name)
Constructor.
Class to handle individual particles of a Model object.
Definition Particle.h:45
3D rotation class.
Definition Rotation3D.h:52
virtual void do_update(unsigned int call_num) override
BodyStatisticsOptimizerState(Particle *p, IMP::npctransport::Statistics *statistics_manager=nullptr, unsigned int periodicity=1)
void reset() override
Reset counters, as if at the start of an optimize run.
Statistics and order parameters about the simulations.
Definition Statistics.h:63
IMP::Vector< IMP::Pointer< BodyStatisticsOptimizerState > > BodyStatisticsOptimizerStates
#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