IMP logo
IMP Reference Guide  2.5.0
The Integrative Modeling Platform
PairModifier.h
Go to the documentation of this file.
1 // Autogenerated by ../../../../tmp/nightly-build-6636/imp-2.5.0/tools/build/make_containers.py
2 // from ../../../../tmp/nightly-build-6636/imp-2.5.0/tools/build/container_templates/kernel/ClassnameModifier.h
3 // Do not edit - any changes will be lost!
4 
5 /**
6  * \file IMP/PairModifier.h
7  * \brief A Modifier on ParticlePairsTemp
8  *
9  * Copyright 2007-2015 IMP Inventors. All rights reserved.
10  */
11 
12 #ifndef IMPKERNEL_PAIR_MODIFIER_H
13 #define IMPKERNEL_PAIR_MODIFIER_H
14 
15 #include <IMP/kernel_config.h>
16 #include "DerivativeAccumulator.h"
17 #include "base_types.h"
18 #include "ParticleTuple.h"
19 #include "internal/container_helpers.h"
20 #include "model_object_helpers.h"
21 
22 IMPKERNEL_BEGIN_NAMESPACE
23 
24 //! A base class for modifiers of ParticlePairsTemp
25 /** The primary function of such a class is to change
26  the passed particles.
27 
28  \see IMP::PairFunctor
29 
30  Implementors should see IMP_PAIR_MODIFIER(). Also see
31  PairDerivativeModifier.
32  */
33 class IMPKERNELEXPORT PairModifier : public ParticleInputs,
34  public ParticleOutputs,
35  public Object {
36  public:
37  typedef ParticlePair Argument;
39  PairModifier(std::string name = "PairModifier %1%");
40 
41  /** \deprecated_at{2.1} use the index version instead*/
42  IMPKERNEL_DEPRECATED_METHOD_DECL(2.1)
43  virtual void apply(const ParticlePair& vt) const;
44 
45  /** Apply the function to a single value*/
46  virtual void apply_index(Model *m, const ParticleIndexPair& v) const;
47 
48  /** Apply the function to a collection of ParticlePairsTemp */
49  /** If bounds are passed, only apply to ones between the upper and
50  lower bounds.*/
51  virtual void apply_indexes(Model *m, const ParticleIndexPairs &o,
52  unsigned int lower_bound,
53  unsigned int upper_bound) const {
54  for (unsigned int i = lower_bound; i < upper_bound; ++i) {
55  apply_index(m, o[i]);
56  }
57  }
58 };
59 
60 IMPKERNEL_END_NAMESPACE
61 
62 #endif /* IMPKERNEL_PAIR_MODIFIER_H */
A class to store an fixed array of same-typed values.
Definition: Array.h:33
Classes to handle individual model particles.
A base class for modifiers of ParticlePairsTemp.
Definition: PairModifier.h:33
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
Common base class for heavy weight IMP objects.
Definition: Object.h:106
Single variable function.
virtual void apply_indexes(Model *m, const ParticleIndexPairs &o, unsigned int lower_bound, unsigned int upper_bound) const
Definition: PairModifier.h:51