home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.14.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
example
version 2.14.0
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-2020 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 modifier
20
/** A simple singleton modifier which ensures the x,y,z coordinates
21
stay in a box by wrapping them.
22
23
Such a class could be coupled with an IMP::core::SingletonConstraint
24
or IMP::container::SingletonsConstraint 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 ExampleSingletonModifier.h
31
\include ExampleSingletonModifier.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
(
Model
*m,
ParticleIndex
p)
const
41
IMP_OVERRIDE
;
42
virtual
ModelObjectsTemp
do_get_inputs
(
43
Model
*m,
const
ParticleIndexes
&pis)
const
IMP_OVERRIDE
;
44
virtual
ModelObjectsTemp
do_get_outputs
(
45
Model
*m,
const
ParticleIndexes
&pis)
const
IMP_OVERRIDE
;
46
IMP_SINGLETON_MODIFIER_METHODS
(
ExampleSingletonModifier
);
47
IMP_OBJECT_METHODS
(
ExampleSingletonModifier
);
48
};
49
50
IMPEXAMPLE_END_NAMESPACE
51
52
#endif
/* IMPEXAMPLE_EXAMPLE_SINGLETON_MODIFIER_H */
IMP::SingletonModifier
A base class for modifiers of ParticlesTemp.
Definition:
SingletonModifier.h:32
SingletonModifier.h
A Modifier on ParticlesTemp.
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::Index< ParticleIndexTag >
singleton_macros.h
Macros for various classes.
IMP::ParticleOutputs::do_get_outputs
virtual ModelObjectsTemp do_get_outputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the outputs.
IMP::Vector
A more IMP-like version of the std::vector.
Definition:
Vector.h:39
IMP::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
Model.h:72
IMP::example::ExampleSingletonModifier
An example singleton modifier.
Definition:
ExampleSingletonModifier.h:33
IMP_SINGLETON_MODIFIER_METHODS
#define IMP_SINGLETON_MODIFIER_METHODS(Name)
Definition:
singleton_macros.h:93
BoundingBoxD.h
A bounding box in D dimensions.
IMP::ParticleInputs::do_get_inputs
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the inputs.
IMP::algebra::BoundingBoxD< 3 >
IMP::SingletonModifier::apply_index
virtual void apply_index(Model *m, ParticleIndex v) const =0
IMP_OVERRIDE
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Definition:
compiler_macros.h:78