IMP  2.2.0
The Integrative Modeling Platform
TripletConstraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/TripletConstraint.h
3  * \brief Use a TripletModifier applied to a kernel::ParticleTripletsTemp 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_TRIPLET_CONSTRAINT_H
13 #define IMPCORE_TRIPLET_CONSTRAINT_H
14 
15 #include <IMP/core/core_config.h>
16 #include <IMP/kernel/internal/TupleConstraint.h>
17 #include <IMP/TripletModifier.h>
19 
20 IMPCORE_BEGIN_NAMESPACE
21 //! Apply a TripletFunction to a Triplet
22 /** The score state is passed up to two TripletModifiers, one to
23  apply before evaluation and the other after. The one after
24  should take a DerivativeAccumulator as its last argument for
25  TripletModifier::apply() and will only be called if
26  the score was computed with derivatives.
27 
28  \see container::TripletsConstraint
29  */
31 #if defined(IMP_DOXYGEN) || defined(SWIG)
32  public Constraint
33 #else
34  public IMP::kernel::internal::TupleConstraint<TripletModifier,
35  TripletDerivativeModifier>
36 #endif
37  {
38  public:
39  /** \deprecated_at{2.1} Use the model/index constructor.
40  */
41  IMPCORE_DEPRECATED_METHOD_DECL(2.1)
43  TripletDerivativeModifier *after, const kernel::ParticleTriplet& vt,
44  std::string name = "TripletConstraint %1%")
45  : IMP::kernel::internal::TupleConstraint<
46  TripletModifier, TripletDerivativeModifier>(before, after, vt,
47  name) {
48  IMPCORE_DEPRECATED_METHOD_DEF(2.1, "Use the model/index constructor.");
49  }
50 
52  TripletDerivativeModifier *after, kernel::Model *m,
54  std::string name = "TripletConstraint %1%")
55  : IMP::kernel::internal::TupleConstraint<
56  TripletModifier, TripletDerivativeModifier>(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_TRIPLET_CONSTRAINT_H */
Class for adding derivatives from restraints to the model.
A base class for modifiers of kernel::ParticleTripletsTemp.
A class to store an fixed array of same-typed values.
Definition: base/Array.h:33
Import IMP/kernel/TripletDerivativeModifier.h in the namespace.
Apply a TripletFunction to a Triplet.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Implement a constraint on the Model.
Import IMP/kernel/TripletModifier.h in the namespace.
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:72