IMP  2.1.0
The Integrative Modeling Platform
ExampleRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/example/ExampleRestraint.h
3  * \brief A restraint on a list of particle pairs.
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPEXAMPLE_EXAMPLE_RESTRAINT_H
10 #define IMPEXAMPLE_EXAMPLE_RESTRAINT_H
11 
12 #include <IMP/example/example_config.h>
13 #include <IMP/SingletonScore.h>
14 #include <IMP/kernel/Restraint.h>
15 #include <IMP/PairContainer.h>
16 #include <IMP/PairScore.h>
17 #include <IMP/restraint_macros.h>
18 
19 IMPEXAMPLE_BEGIN_NAMESPACE
20 
21 //! Restrain a particle to be in the x,y plane
22 /** \note Be sure to check out the swig wrapper file and how it
23  wraps this class.
24 
25  The source code is as follows:
26  \include ExampleRestraint.h
27  \include ExampleRestraint.cpp
28 */
29 class IMPEXAMPLEEXPORT ExampleRestraint : public kernel::Restraint {
31  double k_;
32 
33  public:
34  //! Create the restraint.
35  /** kernel::Restraints should store the particles they are to act on,
36  preferably in a Singleton or PairContainer as appropriate.
37  */
38  ExampleRestraint(kernel::Particle *p, double k);
40  IMP_OVERRIDE;
43 };
44 
45 IMPEXAMPLE_END_NAMESPACE
46 
47 #endif /* IMPEXAMPLE_EXAMPLE_RESTRAINT_H */
A smart pointer to a reference counted object.
Definition: base/Pointer.h:87
virtual void do_add_score_and_derivatives(ScoreAccumulator sa) const
Import IMP/kernel/restraint_macros.h in the namespace.
Import IMP/kernel/PairContainer.h in the namespace.
Abstract base class for all restraints.
Import IMP/kernel/PairScore.h in the namespace.
Class for adding up scores during ScoringFunction evaluation.
A restraint is a term in an IMP ScoringFunction.
Restrain a particle to be in the x,y plane.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Class to handle individual model particles.
Import IMP/kernel/SingletonScore.h in the namespace.
virtual ModelObjectsTemp do_get_inputs() const =0