IMP
2.1.1
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
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
{
30
base::Pointer<kernel::Particle>
p_;
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);
39
void
do_add_score_and_derivatives
(
IMP::ScoreAccumulator
sa)
const
40
IMP_OVERRIDE;
41
IMP::kernel::ModelObjectsTemp
do_get_inputs
()
const
;
42
IMP_OBJECT_METHODS
(
ExampleRestraint
);
43
};
44
45
IMPEXAMPLE_END_NAMESPACE
46
47
#endif
/* IMPEXAMPLE_EXAMPLE_RESTRAINT_H */
IMP::base::Pointer
A smart pointer to a reference counted object.
Definition:
base/Pointer.h:87
IMP::kernel::Restraint::do_add_score_and_derivatives
virtual void do_add_score_and_derivatives(ScoreAccumulator sa) const
IMP::base::Vector
Definition:
base/Vector.h:37
restraint_macros.h
Import IMP/kernel/restraint_macros.h in the namespace.
PairContainer.h
Import IMP/kernel/PairContainer.h in the namespace.
Restraint.h
Abstract base class for all restraints.
PairScore.h
Import IMP/kernel/PairScore.h in the namespace.
IMP::kernel::ScoreAccumulator
Class for adding up scores during ScoringFunction evaluation.
Definition:
kernel/ScoreAccumulator.h:46
IMP::kernel::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
kernel/declare_Restraint.h:52
IMP::example::ExampleRestraint
Restrain a particle to be in the x,y plane.
Definition:
ExampleRestraint.h:29
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
base/object_macros.h:25
IMP::kernel::Particle
Class to handle individual model particles.
Definition:
kernel/declare_Particle.h:34
SingletonScore.h
Import IMP/kernel/SingletonScore.h in the namespace.
IMP::kernel::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0