home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.6.2
The Integrative Modeling Platform
IMP Manual
Reference Guide
Modules
Classes
Examples
include
IMP
SingletonModifier.h
Go to the documentation of this file.
1
// Autogenerated by ../../../../tmp/nightly-build-86896/imp-2.6.2/tools/build/make_containers.py
2
// from ../../../../tmp/nightly-build-86896/imp-2.6.2/tools/build/container_templates/kernel/ClassnameModifier.h
3
// Do not edit - any changes will be lost!
4
5
/**
6
* \file IMP/SingletonModifier.h
7
* \brief A Modifier on ParticlesTemp
8
*
9
* Copyright 2007-2016 IMP Inventors. All rights reserved.
10
*/
11
12
#ifndef IMPKERNEL_SINGLETON_MODIFIER_H
13
#define IMPKERNEL_SINGLETON_MODIFIER_H
14
15
#include <IMP/kernel_config.h>
16
#include "
DerivativeAccumulator.h
"
17
#include "
base_types.h
"
18
#include "internal/container_helpers.h"
19
#include "
model_object_helpers.h
"
20
21
IMPKERNEL_BEGIN_NAMESPACE
22
23
//! A base class for modifiers of ParticlesTemp
24
/** The primary function of such a class is to change
25
the passed particles.
26
27
\see IMP::SingletonPredicate
28
29
Implementers should see IMP_SINGLETON_MODIFIER(). Also see
30
SingletonDerivativeModifier.
31
*/
32
class
IMPKERNELEXPORT
SingletonModifier
:
public
ParticleInputs
,
33
public
ParticleOutputs
,
34
public
Object
{
35
public
:
36
typedef
Particle
*
Argument
;
37
typedef
ParticleIndex
IndexArgument
;
38
SingletonModifier
(std::string name =
"SingletonModifier %1%"
);
39
40
/** Apply the function to a single value*/
41
virtual
void
apply_index(
Model
*m,
ParticleIndex
v)
const
= 0;
42
43
/** Apply the function to a collection of ParticlesTemp */
44
/** If bounds are passed, only apply to ones between the upper and
45
lower bounds.*/
46
virtual
void
apply_indexes
(
Model
*m,
const
ParticleIndexes
&o,
47
unsigned
int
lower_bound,
48
unsigned
int
upper_bound)
const
{
49
for
(
unsigned
int
i = lower_bound; i < upper_bound; ++i) {
50
apply_index(m, o[i]);
51
}
52
}
53
};
54
55
IMPKERNEL_END_NAMESPACE
56
57
#endif
/* IMPKERNEL_SINGLETON_MODIFIER_H */
IMP::SingletonModifier
A base class for modifiers of ParticlesTemp.
Definition:
SingletonModifier.h:32
base_types.h
Basic types used by IMP.
IMP::ParticleOutputs
Definition:
model_object_helpers.h:34
DerivativeAccumulator.h
Class for adding derivatives from restraints to the model.
IMP::Index< ParticleIndexTag >
IMP::ParticleInputs
Definition:
model_object_helpers.h:18
IMP::Vector< ParticleIndex >
IMP::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
Model.h:72
IMP::Object
Common base class for heavy weight IMP objects.
Definition:
Object.h:106
model_object_helpers.h
Single variable function.
IMP::SingletonModifier::apply_indexes
virtual void apply_indexes(Model *m, const ParticleIndexes &o, unsigned int lower_bound, unsigned int upper_bound) const
Definition:
SingletonModifier.h:46
IMP::Particle
Class to handle individual model particles.
Definition:
Particle.h:37