IMP  2.2.1
The Integrative Modeling Platform
PairConstraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/PairConstraint.h
3  * \brief Use a PairModifier applied to a kernel::ParticlePairsTemp to
4  * maintain an invariant
5  *
6  * This file is generated by a script (core/tools/make-container).
7  * Do not edit directly.
8  *
9  * Copyright 2007-2014 IMP Inventors. All rights reserved.
10  */
11 
12 #ifndef IMPCORE_PAIR_CONSTRAINT_H
13 #define IMPCORE_PAIR_CONSTRAINT_H
14 
15 #include <IMP/core/core_config.h>
16 #include <IMP/kernel/internal/TupleConstraint.h>
17 #include <IMP/PairModifier.h>
19 
20 IMPCORE_BEGIN_NAMESPACE
21 //! Apply a PairFunction to a Pair
22 /** The score state is passed up to two PairModifiers, one to
23  apply before evaluation and the other after. The one after
24  should take a DerivativeAccumulator as its last argument for
25  PairModifier::apply() and will only be called if
26  the score was computed with derivatives.
27 
28  \see container::PairsConstraint
29  */
31 #if defined(IMP_DOXYGEN) || defined(SWIG)
32  public Constraint
33 #else
34  public IMP::kernel::internal::TupleConstraint<PairModifier,
35  PairDerivativeModifier>
36 #endif
37  {
38  public:
39  /** \deprecated_at{2.1} Use the model/index constructor.
40  */
41  IMPCORE_DEPRECATED_METHOD_DECL(2.1)
43  PairDerivativeModifier *after, const kernel::ParticlePair& vt,
44  std::string name = "PairConstraint %1%")
45  : IMP::kernel::internal::TupleConstraint<
46  PairModifier, PairDerivativeModifier>(before, after, vt,
47  name) {
48  IMPCORE_DEPRECATED_METHOD_DEF(2.1, "Use the model/index constructor.");
49  }
50 
52  PairDerivativeModifier *after, kernel::Model *m,
53  const kernel::ParticleIndexPair& vt,
54  std::string name = "PairConstraint %1%")
55  : IMP::kernel::internal::TupleConstraint<
56  PairModifier, PairDerivativeModifier>(before, after, m,
57  vt, name) {}
58 
59 #if defined(IMP_DOXYGEN) || defined(SWIG)
60  protected:
61  void do_update_attributes();
62  void do_update_derivatives(DerivativeAccumulator *da);
63  virtual kernel::ModelObjectsTemp do_get_inputs() const;
64  virtual kernel::ModelObjectsTemp do_get_outputs() const;
66 #endif
67 };
68 
69 IMPCORE_END_NAMESPACE
70 
71 #endif /* IMPCORE_PAIR_CONSTRAINT_H */
Class for adding derivatives from restraints to the model.
Import IMP/kernel/PairDerivativeModifier.h in the namespace.
Apply a PairFunction to a Pair.
A class to store an fixed array of same-typed values.
Definition: base/Array.h:33
Import IMP/kernel/PairModifier.h in the namespace.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Implement a constraint on the Model.
A base class for modifiers of kernel::ParticlePairsTemp.
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:72