IMP logo
IMP Reference Guide  2.10.0
The Integrative Modeling Platform
saxs/Restraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/saxs/Restraint.h
3  * \brief Calculate score based on fit to SAXS profile.
4  *
5  * Copyright 2007-2018 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPSAXS_RESTRAINT_H
10 #define IMPSAXS_RESTRAINT_H
11 
12 #include <IMP/saxs/saxs_config.h>
13 
14 #include <IMP/saxs/ProfileFitter.h>
15 #include <IMP/saxs/Profile.h>
17 
19 
20 #include <IMP/Model.h>
21 #include <IMP/Restraint.h>
22 #include <IMP/Object.h>
23 #include <IMP/Pointer.h>
24 
25 IMPSAXS_BEGIN_NAMESPACE
26 
27 //! Calculate score based on fit to SAXS profile
28 /** \ingroup exp_restraint
29 
30  The restraint takes rigid bodies into account, in order
31  to speed up the calculations. Rigid body should be given as single
32  RigidBody Particle. Other, non-rigid body Particles can also be given.
33 
34  The shape of a rigid body is assumed to be defined by the set of
35  atom::Hierarchy leaves of the atom::Hierarchy rooted at the rigid body
36  particle.
37 
38  \par Algorithmic details:
39  The distances between the atoms of rigid body do not change, therefore
40  their contribution to the profile is pre-computed and stored.
41  */
42 class IMPSAXSEXPORT Restraint : public IMP::Restraint {
43  public:
44  //! Constructor
45  /**
46  \param[in] particles The particles participating in the fitting score
47  \param[in] exp_profile The experimental profile used in the fitting score
48  \param[in] ff_type Type of the form factors for profile calculations:
49  ALL_ATOMS - all atoms including hydrogens
50  HEAVY_ATOMS - no hydrogens, all other atoms included
51  CA_ATOMS - residue level, residue represented by CA
52  */
53  Restraint(const Particles& particles, const Profile* exp_profile,
54  FormFactorType ff_type = HEAVY_ATOMS);
55 
56  virtual double unprotected_evaluate(IMP::DerivativeAccumulator* accum)
57  const IMP_OVERRIDE;
58 
60 
62 
63  protected:
65  Pointer<ProfileFitter<ChiScore> > profile_fitter_; // computes profiles
66  // computes derivatives
67  Pointer<DerivativeCalculator> derivative_calculator_;
68 };
69 
70 IMPSAXS_END_NAMESPACE
71 
72 #endif /* IMPSAXS_RESTRAINT_H */
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Calculate score based on fit to SAXS profile.
Storage of a model, its restraints, constraints and particles.
Restraint(Model *m, std::string name)
a class for fitting two profiles
A smart pointer to a reference counted object.
Definition: Pointer.h:87
A nullptr-initialized pointer to an IMP Object.
A shared base class to help in debugging and things.
Abstract base class for all restraints.
FormFactorType
type of the form factors for profile calculations
virtual ModelObjectsTemp do_get_inputs() const =0
A class for computing SAXS derivatives.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for adding derivatives from restraints to the model.
A class for profile storing and computation.
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:54