IMP  2.1.1
The Integrative Modeling Platform
DistanceRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/DistanceRestraint.h
3  * \brief Distance restraint between two particles.
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPCORE_DISTANCE_RESTRAINT_H
10 #define IMPCORE_DISTANCE_RESTRAINT_H
11 
12 #include <IMP/core/core_config.h>
13 #include "DistancePairScore.h"
14 #include "XYZ.h"
15 #include <IMP/generic.h>
16 
17 #include <IMP/kernel/Restraint.h>
18 
19 #include <iostream>
20 
21 IMPCORE_BEGIN_NAMESPACE
22 
23 //! Distance restraint between two particles
24 /**
25  \note If the particles are closer than a certain distance, then
26  the contributions to the derivatives are set to 0.
27 
28  \see PairRestraint
29  \see DistancePairScore
30  \see SphereDistancePairScore
31  */
32 class IMPCOREEXPORT DistanceRestraint :
33 #if defined(SWIG) || defined(IMP_DOXYGEN)
34  public kernel::Restraint
35 #else
36  public IMP::internal::TupleRestraint<DistancePairScore>
37 #endif
38  {
39  public:
40  //! Create the distance restraint.
41  /** \param[in] score_func Scoring function for the restraint.
42  \param[in] a Pointer to first particle in distance restraint.
43  \param[in] b Pointer to second particle in distance restraint.
44  */
46  kernel::Particle *b);
47 
48 #ifdef SWIG
49  protected:
50  double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const;
53 #endif
54 };
55 
56 IMPCORE_END_NAMESPACE
57 
58 #endif /* IMPCORE_DISTANCE_RESTRAINT_H */
Class for adding derivatives from restraints to the model.
Abstract single variable functor class for score functions.
Distance restraint between two particles.
Simple xyz decorator.
Abstract base class for all restraints.
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.
A Score on the distance between a pair of particles.
virtual ModelObjectsTemp do_get_inputs() const =0
Import IMP/kernel/generic.h in the namespace.