IMP  2.1.1
The Integrative Modeling Platform
DensityFillingRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/em/DensityFillingRestraint.h
3  * \brief Score how well the particles fill the density
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPEM_DENSITY_FILLING_RESTRAINT_H
10 #define IMPEM_DENSITY_FILLING_RESTRAINT_H
11 
12 #include <IMP/em/em_config.h>
13 #include "DensityMap.h"
14 #include <IMP/atom/Hierarchy.h>
15 #include <IMP/atom/Atom.h>
16 #include <IMP/atom/Mass.h>
17 #include <IMP/core/XYZR.h>
18 #include <IMP/kernel/Model.h>
19 #include <IMP/kernel/Restraint.h>
20 #include <IMP/Refiner.h>
21 
22 IMPEM_BEGIN_NAMESPACE
23 
24 //! Calculate score based on fit to EM map
25 /** \ingroup exp_restraint
26 
27  */
28 class IMPEMEXPORT DensityFillingRestraint : public kernel::Restraint
29 {
30 public:
31  //! Constructor
32  /**
33  \param[in] ps The particles participating in the fitting score
34  \param[in] em_map The density map used in the fitting score
35  \param[in] threshold
36  \note kernel::Particles that are rigid-bodies are interpolated and
37  not resampled. This significantly reduces the running time but is
38  less accurate. If the user prefers to get more accurate results,
39  provide its members as input particles and not the rigid body.
40  \todo we currently assume rigid bodies are also molecular hierarchies.
41  */
43  DensityMap *em_map,Float threshold);
44 
45  virtual double
46  unprotected_evaluate(IMP::kernel::DerivativeAccumulator *accum)
47  const IMP_OVERRIDE;
48  virtual IMP::kernel::ModelObjectsTemp do_get_inputs() const IMP_OVERRIDE;
50 
51  IMP_LIST(private, Particle, particle, kernel::Particle*, kernel::Particles);
52 private:
53  IMP::base::PointerMember<DensityMap> target_dens_map_;
54  algebra::BoundingBoxD<3> target_bounding_box_;
55  // reference to the IMP environment
56  IMP::core::XYZs xyz_;
58  Float threshold_;
59 };
60 
61 IMPEM_END_NAMESPACE
62 
63 #endif /* IMPEM_DENSITY_FILLING_RESTRAINT_H */
A decorator for particles with mass.
Class for adding derivatives from restraints to the model.
Calculate score based on fit to EM map.
A smart pointer to a ref-counted Object that is a class memeber.
Definition: base/Pointer.h:147
Simple atom decorator.
Class for handling density maps.
Decorator for helping deal with a hierarchy of molecules.
Class for handling density maps.
Definition: DensityMap.h:98
Abstract base class for all restraints.
Import IMP/kernel/Refiner.h in the namespace.
A restraint is a term in an IMP ScoringFunction.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Class to handle individual model particles.
Storage of a model, its restraints, constraints and particles.
virtual ModelObjectsTemp do_get_inputs() const =0
double Float
Basic floating-point value (could be float, double...)
Definition: base/types.h:20
#define IMP_LIST(protection, Ucname, lcname, Data, PluralData)
A macro to provide a uniform interface for storing lists of objects.
Decorator for a sphere-like particle.