IMP  2.4.0
The Integrative Modeling Platform
QuadConstraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/QuadConstraint.h
3  * \brief Use a QuadModifier applied to a kernel::ParticleQuadsTemp 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-2015 IMP Inventors. All rights reserved.
10  */
11 
12 #ifndef IMPCORE_QUAD_CONSTRAINT_H
13 #define IMPCORE_QUAD_CONSTRAINT_H
14 
15 #include <IMP/core/core_config.h>
16 #include <IMP/kernel/internal/TupleConstraint.h>
17 #include <IMP/QuadModifier.h>
19 
20 IMPCORE_BEGIN_NAMESPACE
21 //! Apply a QuadFunction to a Quad
22 /** The score state is passed up to two QuadModifiers, one to
23  apply before evaluation and the other after. The one after
24  should take a DerivativeAccumulator as its last argument for
25  QuadModifier::apply() and will only be called if
26  the score was computed with derivatives.
27 
28  \see container::QuadsConstraint
29  */
31 #if defined(IMP_DOXYGEN) || defined(SWIG)
32  public Constraint
33 #else
34  public IMP::kernel::internal::TupleConstraint<QuadModifier,
35  QuadDerivativeModifier>
36 #endif
37  {
38  public:
39  /** \deprecated_at{2.1} Use the model/index constructor.
40  */
41  IMPCORE_DEPRECATED_METHOD_DECL(2.1)
43  QuadDerivativeModifier *after, const kernel::ParticleQuad& vt,
44  std::string name = "QuadConstraint %1%")
45  : IMP::kernel::internal::TupleConstraint<
46  QuadModifier, QuadDerivativeModifier>(before, after, vt,
47  name) {
48  IMPCORE_DEPRECATED_METHOD_DEF(2.1, "Use the model/index constructor.");
49  }
50 
52  QuadDerivativeModifier *after, kernel::Model *m,
53  const kernel::ParticleIndexQuad& vt,
54  std::string name = "QuadConstraint %1%")
55  : IMP::kernel::internal::TupleConstraint<
56  QuadModifier, QuadDerivativeModifier>(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_QUAD_CONSTRAINT_H */
Class for adding derivatives from restraints to the model.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Import IMP/kernel/QuadModifier.h in the namespace.
Apply a QuadFunction to a Quad.
Implement a constraint on the Model.
Import IMP/kernel/QuadDerivativeModifier.h in the namespace.
A base class for modifiers of kernel::ParticleQuadsTemp.
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:73