IMP
2.0.0
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
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/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
Restraint
30
{
31
base::Pointer<Particle>
p_;
32
double
k_;
33
public
:
34
//! Create the restraint.
35
/** Restraints should store the particles they are to act on,
36
preferably in a Singleton or PairContainer as appropriate.
37
*/
38
ExampleRestraint
(
Particle
*p,
double
k);
39
void
do_add_score_and_derivatives
(
IMP::ScoreAccumulator
sa)
40
const
IMP_OVERRIDE;
41
IMP::ModelObjectsTemp
do_get_inputs
()
const
;
42
IMP_OBJECT_METHODS
(
ExampleRestraint
);
43
};
44
45
IMPEXAMPLE_END_NAMESPACE
46
47
#endif
/* IMPEXAMPLE_EXAMPLE_RESTRAINT_H */