home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.22.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
npctransport
version 2.22.0
ChainStatisticsOptimizerState.h
Go to the documentation of this file.
1
/**
2
* \file npctransport/ChainStatisticsOptimizerState.h
3
* \brief description
4
*
5
* Copyright 2007-2022 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/optimizer_state_macros.h>
15
#include <
IMP/core/PeriodicOptimizerState.h
>
16
#include <
IMP/npctransport/typedefs.h
>
17
#include <deque>
18
19
IMPNPCTRANSPORT_BEGIN_NAMESPACE
20
21
/** Compute various statistics of a chain.*/
22
class
IMPNPCTRANSPORTEXPORT
ChainStatisticsOptimizerState
23
:
public
core::PeriodicOptimizerState
{
24
private
:
25
typedef
core::PeriodicOptimizerState
P
;
26
27
// particles in the chain:
28
ParticlesTemp
ps_;
29
30
// time series of the positions of particles in the chain:
31
std::deque<algebra::Vector3Ds> positions_;
32
std::deque<double> times_fs_;
33
34
// mean radius-of-gyration and its square since last reset
35
double
mean_rgyr_;
36
double
mean_rgyr2_;
37
38
// mean end-to-end length and its square since last reset
39
double
mean_end_to_end_;
40
double
mean_end_to_end2_;
41
42
// mean bond distance and its square since last reset
43
double
mean_bond_distance_;
44
double
mean_bond_distance2_;
45
46
// number of samples over which means are computed
47
int
n_;
48
49
double
get_dt()
const
;
50
51
public
:
52
/**
53
@param ps the particles being wrapped
54
@param periodicity frame interval for statistics, equiv. to set_period(1)
55
*/
56
ChainStatisticsOptimizerState
57
(
const
ParticlesTemp
&ps,
58
unsigned
int
periodicity = 1);
59
60
double
get_correlation_time()
const
;
61
62
//! returns a vector of diffusion coefficients
63
//! for each particle in the chain, computed in the local
64
//! reference frame of the chain (by locally aligning
65
//! the chain)
66
Floats
get_local_diffusion_coefficients()
const
;
67
68
//! get an estimate of the diffusion coefficient
69
//! of the entire chain in A^2/fs units
70
double
get_diffusion_coefficient
()
const
;
71
72
//! returns the mean Rgyr of this chain
73
double
get_mean_radius_of_gyration
()
const
{
74
return
mean_rgyr_;
75
}
76
77
//! returns the mean Rgyr^2, which can be used to compute
78
//! std-dev (but recorded separately so it could be averaged with
79
//! other chains)
80
double
get_mean_square_radius_of_gyration
()
const
{
81
return
mean_rgyr2_;
82
}
83
84
//! returns the mean end-to-end distance of this chain
85
double
get_mean_end_to_end_distance
()
const
{
86
return
mean_end_to_end_;
87
}
88
89
//! returns the mean square end-to-end distance, which can be used to compute
90
//! std-dev (but recorded separately so it could be averaged with
91
//! other chains)
92
double
get_mean_square_end_to_end_distance
()
const
{
93
return
mean_end_to_end2_;
94
}
95
96
//! returns the mean bond distance of this chain
97
double
get_mean_bond_distance
()
const
{
98
return
mean_bond_distance_;
99
}
100
101
//! returns the mean square bond distance, which can be used to compute
102
//! std-dev (but recorded separately so it could be averaged with
103
//! other chains)
104
double
get_mean_square_bond_distance
()
const
{
105
return
mean_bond_distance2_;
106
}
107
108
/**
109
Resets all the statistics about that chain
110
*/
111
void
reset
()
override
;
112
virtual
void
do_update
(
unsigned
int
call_num)
override
;
113
IMP_OBJECT_METHODS
(
ChainStatisticsOptimizerState
);
114
};
115
IMP_OBJECTS
(
ChainStatisticsOptimizerState
,
ChainStatisticsOptimizerStates
);
116
117
IMPNPCTRANSPORT_END_NAMESPACE
118
119
#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:22
PeriodicOptimizerState.h
Angle restraint between three particles.
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:92
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:85
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:73
IMP::npctransport::ChainStatisticsOptimizerState::get_mean_bond_distance
double get_mean_bond_distance() const
returns the mean bond distance of this chain
Definition:
ChainStatisticsOptimizerState.h:97
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:80
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:104
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)