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
ChainStatisticsOptimizerState.h
Go to the documentation of this file.
1
/**
2
* \file npctransport/ChainStatisticsOptimizerState.h
3
* \brief description
4
*
5
* Copyright 2007-2026 IMP Inventors. All rights reserved.
6
*/
7
8
#ifndef IMPNPCTRANSPORT_CHAIN_STATISTICS_OPTIMIZER_STATE_H
9
#define IMPNPCTRANSPORT_CHAIN_STATISTICS_OPTIMIZER_STATE_H
10
11
#include "npctransport_config.h"
12
#include <
IMP/Particle.h
>
13
#include <
IMP/OptimizerState.h
>
14
#include <
IMP/npctransport/typedefs.h
>
15
#include <deque>
16
17
IMPNPCTRANSPORT_BEGIN_NAMESPACE
18
19
/** Compute various statistics of a chain.*/
20
class
IMPNPCTRANSPORTEXPORT
ChainStatisticsOptimizerState
21
:
public
OptimizerState
{
22
private
:
23
typedef
OptimizerState
P
;
24
25
// particles in the chain:
26
ParticlesTemp
ps_;
27
28
// time series of the positions of particles in the chain:
29
std::deque<algebra::Vector3Ds> positions_;
30
std::deque<double> times_fs_;
31
32
// mean radius-of-gyration and its square since last reset
33
double
mean_rgyr_;
34
double
mean_rgyr2_;
35
36
// mean end-to-end length and its square since last reset
37
double
mean_end_to_end_;
38
double
mean_end_to_end2_;
39
40
// mean bond distance and its square since last reset
41
double
mean_bond_distance_;
42
double
mean_bond_distance2_;
43
44
// number of samples over which means are computed
45
int
n_;
46
47
double
get_dt()
const
;
48
49
public
:
50
/**
51
@param ps the particles being wrapped
52
@param periodicity frame interval for statistics, equiv. to set_period(1)
53
*/
54
ChainStatisticsOptimizerState
55
(
const
ParticlesTemp
&ps,
56
unsigned
int
periodicity = 1);
57
58
double
get_correlation_time()
const
;
59
60
//! returns a vector of diffusion coefficients
61
//! for each particle in the chain, computed in the local
62
//! reference frame of the chain (by locally aligning
63
//! the chain)
64
Floats
get_local_diffusion_coefficients()
const
;
65
66
//! get an estimate of the diffusion coefficient
67
//! of the entire chain in A^2/fs units
68
double
get_diffusion_coefficient
()
const
;
69
70
//! returns the mean Rgyr of this chain
71
double
get_mean_radius_of_gyration
()
const
{
72
return
mean_rgyr_;
73
}
74
75
//! returns the mean Rgyr^2, which can be used to compute
76
//! std-dev (but recorded separately so it could be averaged with
77
//! other chains)
78
double
get_mean_square_radius_of_gyration
()
const
{
79
return
mean_rgyr2_;
80
}
81
82
//! returns the mean end-to-end distance of this chain
83
double
get_mean_end_to_end_distance
()
const
{
84
return
mean_end_to_end_;
85
}
86
87
//! returns the mean square end-to-end distance, which can be used to compute
88
//! std-dev (but recorded separately so it could be averaged with
89
//! other chains)
90
double
get_mean_square_end_to_end_distance
()
const
{
91
return
mean_end_to_end2_;
92
}
93
94
//! returns the mean bond distance of this chain
95
double
get_mean_bond_distance
()
const
{
96
return
mean_bond_distance_;
97
}
98
99
//! returns the mean square bond distance, which can be used to compute
100
//! std-dev (but recorded separately so it could be averaged with
101
//! other chains)
102
double
get_mean_square_bond_distance
()
const
{
103
return
mean_bond_distance2_;
104
}
105
106
/**
107
Resets all the statistics about that chain
108
*/
109
void
reset
()
override
;
110
virtual
void
do_update
(
unsigned
int
call_num)
override
;
111
IMP_OBJECT_METHODS
(
ChainStatisticsOptimizerState
);
112
};
113
IMP_OBJECTS
(
ChainStatisticsOptimizerState
,
ChainStatisticsOptimizerStates
);
114
115
IMPNPCTRANSPORT_END_NAMESPACE
116
117
#endif
/* IMPNPCTRANSPORT_CHAIN_STATISTICS_OPTIMIZER_STATE_H */
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::npctransport::ChainStatisticsOptimizerState
Definition:
ChainStatisticsOptimizerState.h:20
IMP::OptimizerState::do_update
virtual void do_update(unsigned int)
Definition:
OptimizerState.h:133
IMP::Vector< WeakPointer< Particle > >
IMP::npctransport::ChainStatisticsOptimizerState::get_mean_square_end_to_end_distance
double get_mean_square_end_to_end_distance() const
Definition:
ChainStatisticsOptimizerState.h:90
IMP::npctransport::ChainStatisticsOptimizerState::get_mean_end_to_end_distance
double get_mean_end_to_end_distance() const
returns the mean end-to-end distance of this chain
Definition:
ChainStatisticsOptimizerState.h:83
IMP::npctransport::ChainStatisticsOptimizerState::get_mean_radius_of_gyration
double get_mean_radius_of_gyration() const
returns the mean Rgyr of this chain
Definition:
ChainStatisticsOptimizerState.h:71
IMP::npctransport::ChainStatisticsOptimizerState::get_mean_bond_distance
double get_mean_bond_distance() const
returns the mean bond distance of this chain
Definition:
ChainStatisticsOptimizerState.h:95
IMP::OptimizerState::reset
virtual void reset()
Reset counters, as if at the start of an optimize run.
IMP::npctransport::ChainStatisticsOptimizerState::get_mean_square_radius_of_gyration
double get_mean_square_radius_of_gyration() const
Definition:
ChainStatisticsOptimizerState.h:78
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::npctransport::ChainStatisticsOptimizerState::get_mean_square_bond_distance
double get_mean_square_bond_distance() const
Definition:
ChainStatisticsOptimizerState.h:102
IMP::OptimizerState
Shared optimizer state that is invoked upon commitment of new coordinates.
Definition:
OptimizerState.h:45
typedefs.h
description
OptimizerState.h
Shared optimizer state.
IMP::atom::get_diffusion_coefficient
double get_diffusion_coefficient(const algebra::Vector3Ds &displacements, double dt)