home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
develop.34c5cf4f65,2026/02/03
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
npctransport
version 20260203.develop.34c5cf4f65
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
>
13
#include <
IMP/algebra/Transformation3D.h
>
14
#include <
IMP/OptimizerState.h
>
15
#include <
IMP/npctransport/typedefs.h
>
16
#include <deque>
17
18
IMPNPCTRANSPORT_BEGIN_NAMESPACE
19
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
BodyStatisticsOptimizerState
25
:
public
OptimizerState
{
26
private
:
27
typedef
OptimizerState
P
;
28
Particle
*p_;
29
WeakPointer<IMP::npctransport::Statistics>
statistics_manager_;
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
*/
48
BodyStatisticsOptimizerState
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 distriubution table in owner's statistics
60
for this particle type (distribution of z coordinates and r coordinates)
61
*/
62
void
update_particle_type_zr_distribution_map();
63
64
virtual
void
do_update
(
unsigned
int
call_num)
override
;
65
66
IMP_OBJECT_METHODS
(
BodyStatisticsOptimizerState
);
67
};
68
IMP_OBJECTS
(
BodyStatisticsOptimizerState
,
BodyStatisticsOptimizerStates
);
69
70
IMPNPCTRANSPORT_END_NAMESPACE
71
72
#endif
/* IMPNPCTRANSPORT_BODY_STATISTICS_OPTIMIZER_STATE_H */
IMP::WeakPointer
Smart pointer to Object-derived classes that does not refcount.
Definition:
WeakPointer.h:77
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::OptimizerState::do_update
virtual void do_update(unsigned int)
Definition:
OptimizerState.h:133
IMP::npctransport::Statistics
Statistics and order parameters about the simulations.
Definition:
npctransport/Statistics.h:63
IMP::Vector
A more IMP-like version of the std::vector.
Definition:
Vector.h:50
IMP::OptimizerState::reset
virtual void reset()
Reset counters, as if at the start of an optimize run.
Transformation3D.h
Simple 3D transformation class.
IMP::algebra::Rotation3D
3D rotation class.
Definition:
Rotation3D.h:52
Particle.h
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
IMP_OBJECTS
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
Definition:
object_macros.h:44
IMP::OptimizerState
Shared optimizer state that is invoked upon commitment of new coordinates.
Definition:
OptimizerState.h:45
typedefs.h
description
IMP::Particle
Class to handle individual particles of a Model object.
Definition:
Particle.h:45
OptimizerState.h
Shared optimizer state.
IMP::atom::get_diffusion_coefficient
double get_diffusion_coefficient(const algebra::Vector3Ds &displacements, double dt)
IMP::npctransport::BodyStatisticsOptimizerState
Definition:
BodyStatisticsOptimizerState.h:24