IMP
2.1.0
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
multifit/RadiusOfGyrationRestraint.h
Go to the documentation of this file.
1
/**
2
* \file IMP/multifit/RadiusOfGyrationRestraint.h
3
* \brief radius of gyration restraint.
4
*
5
* Restrict max distance between every pair of particle
6
*
7
* Copyright 2007-2013 IMP Inventors. All rights reserved.
8
*
9
*/
10
11
#ifndef IMPMULTIFIT_RADIUS_OF_GYRATION_RESTRAINT_H
12
#define IMPMULTIFIT_RADIUS_OF_GYRATION_RESTRAINT_H
13
14
#include <IMP/multifit/multifit_config.h>
15
#include <
IMP/kernel/Restraint.h
>
16
#include <
IMP/restraint_macros.h
>
17
#include <
IMP/core/HarmonicUpperBound.h
>
18
#include <
IMP/kernel/Particle.h
>
19
IMPMULTIFIT_BEGIN_NAMESPACE
20
21
//! Ensure the radius of gyration of particles fits the predicted one
22
/**
23
/note a harmonic upper bound is applied between
24
the predicted radius and the actual radius
25
*/
26
class
IMPMULTIFITEXPORT
RadiusOfGyrationRestraint
:
public
kernel::Restraint
27
{
28
public
:
29
//! Constructor
30
/**
31
\param[in] ps the particles to work on
32
\param[in] num_residues the number of residues the particles represent
33
\param[in] scale allow the radius of gyration of the particles
34
to be at most scale times the predicted one
35
*/
36
RadiusOfGyrationRestraint
(
kernel::Particles
ps,
int
num_residues,
Float
scale=1.);
37
virtual
double
38
unprotected_evaluate(
IMP::kernel::DerivativeAccumulator
*accum)
39
const
IMP_OVERRIDE;
40
virtual
IMP::kernel::ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE;
41
IMP_OBJECT_METHODS
(
RadiusOfGyrationRestraint
);
42
//! Set the predicted radius of gyration used in the restraint
43
void
set_radius_of_gyration
(
Float
r) {
44
predicted_rog_=r;
45
hub_=
new
core::HarmonicUpperBound
(predicted_rog_*scale_,1);}
46
//! Get the predicted radius of gyration used in the restraint
47
inline
Float
get_radius_of_gyration
() {
return
predicted_rog_;}
48
49
#ifndef SWIG
50
IMP_LIST
(
private
,
Particle
, particle,
kernel::Particle
*,
kernel::Particles
);
51
#endif
52
protected
:
53
kernel::Model
*mdl_;
54
Float
predicted_rog_;
55
Float
scale_;
56
base::Pointer<core::HarmonicUpperBound>
hub_;
57
};
58
59
IMPMULTIFITEXPORT
60
float
get_approximated_radius_of_gyration(
int
len);
61
IMPMULTIFITEXPORT
62
float
get_actual_radius_of_gyration(
kernel::ParticlesTemp
ps);
63
IMPMULTIFITEXPORT
64
float
get_approximated_radius(
int
len);
65
IMPMULTIFIT_END_NAMESPACE
66
67
#endif
/* IMPMULTIFIT_RADIUS_OF_GYRATION_RESTRAINT_H */
IMP::multifit::RadiusOfGyrationRestraint::set_radius_of_gyration
void set_radius_of_gyration(Float r)
Set the predicted radius of gyration used in the restraint.
Definition:
multifit/RadiusOfGyrationRestraint.h:43
IMP::kernel::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
kernel/DerivativeAccumulator.h:25
IMP::core::HarmonicUpperBound
Upper bound harmonic function (non-zero when feature > mean)
Definition:
core/HarmonicUpperBound.h:20
IMP::multifit::RadiusOfGyrationRestraint::get_radius_of_gyration
Float get_radius_of_gyration()
Get the predicted radius of gyration used in the restraint.
Definition:
multifit/RadiusOfGyrationRestraint.h:47
IMP::base::Pointer< core::HarmonicUpperBound >
IMP::base::Vector< base::Pointer< Particle > >
restraint_macros.h
Import IMP/kernel/restraint_macros.h in the namespace.
Restraint.h
Abstract base class for all restraints.
IMP::kernel::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
kernel/declare_Restraint.h:52
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
base/object_macros.h:25
IMP::kernel::Particle
Class to handle individual model particles.
Definition:
kernel/declare_Particle.h:34
Particle.h
Classes to handle individual model particles.
IMP::multifit::RadiusOfGyrationRestraint
Ensure the radius of gyration of particles fits the predicted one.
Definition:
multifit/RadiusOfGyrationRestraint.h:26
IMP::kernel::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP::Float
double Float
Basic floating-point value (could be float, double...)
Definition:
base/types.h:20
IMP_LIST
#define IMP_LIST(protection, Ucname, lcname, Data, PluralData)
A macro to provide a uniform interface for storing lists of objects.
Definition:
kernel/container_macros.h:90
HarmonicUpperBound.h
Harmonic upper bound function.
IMP::kernel::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
kernel/declare_Model.h:72