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
ExampleSingletonModifier.h
Go to the documentation of this file.
1
/**
2
* \file IMP/example/ExampleSingletonModifier.h
3
* \brief A singleton modifier which wraps an attribute into a
4
* given range.
5
*
6
* Copyright 2007-2013 IMP Inventors. All rights reserved.
7
*/
8
9
#ifndef IMPEXAMPLE_EXAMPLE_SINGLETON_MODIFIER_H
10
#define IMPEXAMPLE_EXAMPLE_SINGLETON_MODIFIER_H
11
12
#include <IMP/example/example_config.h>
13
#include <
IMP/SingletonModifier.h
>
14
#include <
IMP/algebra/BoundingBoxD.h
>
15
#include <
IMP/singleton_macros.h
>
16
17
IMPEXAMPLE_BEGIN_NAMESPACE
18
19
//! An example singleton modifer
20
/** A simple singleton modifier which restrains the x,y,z
21
coordinates to a box by wrapping them.
22
23
Such a class could be coupled with an IMP::core::SingletonRestraint
24
or IMP::core::SingletonsRestraint to keep a set of particles
25
in a box.
26
27
\include range_restriction.py
28
29
The source code is as follows:
30
\include ExampleRestraint.h
31
\include ExampleRestraint.cpp
32
*/
33
class
IMPEXAMPLEEXPORT
ExampleSingletonModifier
:
public
SingletonModifier
{
34
algebra::BoundingBoxD<3>
bb_;
35
36
public
:
37
ExampleSingletonModifier
(
const
algebra::BoundingBoxD<3>
&bb);
38
39
// note, Doxygen wants a semicolon at the end of macro lines
40
virtual
void
apply_index
(
kernel::Model
*m,
kernel::ParticleIndex
p)
const
IMP_OVERRIDE;
41
virtual
kernel::ModelObjectsTemp
do_get_inputs
(
kernel::Model
*m,
42
const
kernel::ParticleIndexes
&pis)
43
const
IMP_OVERRIDE;
44
virtual
kernel::ModelObjectsTemp
do_get_outputs
(
kernel::Model
*m,
45
const
kernel::ParticleIndexes
&pis)
46
const
IMP_OVERRIDE;
47
IMP_SINGLETON_MODIFIER_METHODS
(
ExampleSingletonModifier
);
48
IMP_OBJECT_METHODS
(
ExampleSingletonModifier
);
49
};
50
51
IMPEXAMPLE_END_NAMESPACE
52
53
#endif
/* IMPEXAMPLE_EXAMPLE_SINGLETON_MODIFIER_H */
SingletonModifier.h
Import IMP/kernel/SingletonModifier.h in the namespace.
singleton_macros.h
Import IMP/kernel/singleton_macros.h in the namespace.
IMP::base::Vector
Definition:
base/Vector.h:37
IMP::kernel::SingletonModifier
A base class for modifiers of ParticlesTemp.
Definition:
kernel/SingletonModifier.h:33
IMP::example::ExampleSingletonModifier
An example singleton modifer.
Definition:
ExampleSingletonModifier.h:33
IMP::kernel::ParticleInputs::do_get_inputs
virtual ModelObjectsTemp do_get_inputs(kernel::Model *m, const ParticleIndexes &pis) const
BoundingBoxD.h
A bounding box in D dimensions.
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
base/object_macros.h:25
IMP::base::Index< ParticleIndexTag >
IMP::algebra::BoundingBoxD< 3 >
IMP::kernel::ParticleOutputs::do_get_outputs
virtual ModelObjectsTemp do_get_outputs(kernel::Model *m, const ParticleIndexes &pis) const
IMP_SINGLETON_MODIFIER_METHODS
#define IMP_SINGLETON_MODIFIER_METHODS(Name)
Definition:
kernel/singleton_macros.h:338
IMP::kernel::SingletonModifier::apply_index
virtual void apply_index(kernel::Model *m, ParticleIndex v) const
IMP::kernel::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
kernel/declare_Model.h:72