IMP  2.3.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-2014 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/kernel/Restraint.h>
14 
15 IMPEXAMPLE_BEGIN_NAMESPACE
16 
17 //! Restrain a particle to be in the x,y plane
18 /** \note Be sure to check out the swig wrapper file and how it
19  wraps this class.
20 
21  The source code is as follows:
22  \include ExampleRestraint.h
23  \include ExampleRestraint.cpp
24 */
25 class IMPEXAMPLEEXPORT ExampleRestraint : public kernel::Restraint {
27  double k_;
28 
29  public:
30  //! Create the restraint.
31  /** kernel::Restraints should store the particles they are to act on,
32  preferably in a Singleton or PairContainer as appropriate.
33  */
39 };
40 
41 IMPEXAMPLE_END_NAMESPACE
42 
43 #endif /* IMPEXAMPLE_EXAMPLE_RESTRAINT_H */
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
virtual void do_add_score_and_derivatives(ScoreAccumulator sa) const
Abstract base class for all restraints.
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.
virtual ModelObjectsTemp do_get_inputs() const =0
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:73