IMP  2.0.1
The Integrative Modeling Platform
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/Restraint.h>
16 #include <IMP/restraint_macros.h>
18 #include <IMP/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 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(Particles ps,int num_residues,Float scale=1.);
38  //! Set the predicted radius of gyration used in the restraint
40  predicted_rog_=r;
41  hub_=new core::HarmonicUpperBound(predicted_rog_*scale_,1);}
42  //! Get the predicted radius of gyration used in the restraint
43  inline Float get_radius_of_gyration() {return predicted_rog_;}
44 
45 #ifndef SWIG
46  IMP_LIST(private, Particle, particle, Particle*, Particles);
47 #endif
48  protected:
49  Model *mdl_;
50  Float predicted_rog_;
51  Float scale_;
52  Pointer<core::HarmonicUpperBound> hub_;
53 };
54 
55 IMPMULTIFITEXPORT
56 float get_approximated_radius_of_gyration(int len);
57 IMPMULTIFITEXPORT
58 float get_actual_radius_of_gyration(ParticlesTemp ps);
59 IMPMULTIFITEXPORT
60 float get_approximated_radius(int len);
61 IMPMULTIFIT_END_NAMESPACE
62 
63 #endif /* IMPMULTIFIT_RADIUS_OF_GYRATION_RESTRAINT_H */