IMP  2.1.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 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-2013 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 #include <IMP/score_state_macros.h>
20 
21 IMPCORE_BEGIN_NAMESPACE
22 //! Apply a TripletFunction to a Triplet
23 /** The score state is passed up to two TripletModifiers, one to
24  apply before evaluation and the other after. The one after
25  should take a DerivativeAccumulator as its last argument for
26  TripletModifier::apply() and will only be called if
27  the score was computed with derivatives.
28 
29  \see container::TripletsConstraint
30  */
32 #if defined(IMP_DOXYGEN) || defined(SWIG)
33  public Constraint
34 #else
35  public IMP::kernel::internal::TupleConstraint<TripletModifier,
36  TripletDerivativeModifier>
37 #endif
38  {
39  public:
40  /** \deprecated_at{2.1} Use the model/index constructor.
41  */
42  IMPCORE_DEPRECATED_METHOD_DECL(2.1)
44  TripletDerivativeModifier *after, const ParticleTriplet& vt,
45  std::string name = "TripletConstraint %1%")
46  : IMP::kernel::internal::TupleConstraint<
47  TripletModifier, TripletDerivativeModifier>(before, after, vt,
48  name) {
49  IMPCORE_DEPRECATED_METHOD_DEF(2.1, "Use the model/index constructor.");
50  }
51 
53  TripletDerivativeModifier *after, kernel::Model *m,
54  const ParticleIndexTriplet& vt,
55  std::string name = "TripletConstraint %1%")
56  : IMP::kernel::internal::TupleConstraint<
57  TripletModifier, TripletDerivativeModifier>(before, after, m,
58  vt, name) {
59  }
60 
61 #if defined(IMP_DOXYGEN) || defined(SWIG)
62  protected:
63  void do_update_attributes();
64  void do_update_derivatives(DerivativeAccumulator *da);
65  virtual kernel::ModelObjectsTemp do_get_inputs() const;
66  virtual kernel::ModelObjectsTemp do_get_outputs() const;
68 #endif
69 };
70 
71 IMPCORE_END_NAMESPACE
72 
73 #endif /* IMPCORE_TRIPLET_CONSTRAINT_H */
Class for adding derivatives from restraints to the model.
A base class for modifiers of 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.
Import IMP/kernel/score_state_macros.h in the namespace.
Implement a constraint on the Model.
Import IMP/kernel/TripletModifier.h in the namespace.
Class for storing model, its restraints, constraints, and particles.