IMP logo
IMP Reference Guide  develop.cb6747d2d1,2024/03/28
The Integrative Modeling Platform
QuadConstraint.h
Go to the documentation of this file.
1 // Autogenerated by ../../../../tmp/nightly-build-61059/imp-20240328.develop.cb6747d2d1/tools/build/make_containers.py
2 // from ../../../../tmp/nightly-build-61059/imp-20240328.develop.cb6747d2d1/tools/build/container_templates/core/ClassnameConstraint.h
3 // Do not edit - any changes will be lost!
4 
5 /**
6  * \file IMP/core/QuadConstraint.h
7  * \brief Use a QuadModifier applied to a ParticleQuadsTemp to
8  * maintain an invariant
9  *
10  * Copyright 2007-2023 IMP Inventors. All rights reserved.
11  */
12 
13 #ifndef IMPCORE_QUAD_CONSTRAINT_H
14 #define IMPCORE_QUAD_CONSTRAINT_H
15 
16 #include <IMP/core/core_config.h>
17 #include <IMP/internal/TupleConstraint.h>
18 #include <IMP/QuadModifier.h>
20 #include <cereal/access.hpp>
21 #include <cereal/types/base_class.hpp>
22 
23 IMPCORE_BEGIN_NAMESPACE
24 //! Apply a QuadFunction to a Quad
25 /** The score state is passed up to two QuadModifiers, one to
26  apply before evaluation and the other after. The one after
27  should take a DerivativeAccumulator as its last argument for
28  QuadModifier::apply() and will only be called if
29  the score was computed with derivatives.
30 
31  \see container::QuadsConstraint
32  */
34 #if defined(IMP_DOXYGEN) || defined(SWIG)
35  public Constraint
36 #else
37  public IMP::internal::TupleConstraint<QuadModifier,
38  QuadDerivativeModifier>
39 #endif
40  {
41 
42  friend class cereal::access;
43  template<class Archive> void serialize(Archive &ar) {
44  ar(cereal::base_class<
45  IMP::internal::TupleConstraint<QuadModifier,
46  QuadDerivativeModifier> >(this));
47  }
49 
50  public:
52  QuadDerivativeModifier *after, Model *m,
53  const ParticleIndexQuad& vt,
54  std::string name = "QuadConstraint %1%",
55  bool can_skip=false)
56  : IMP::internal::TupleConstraint<
57  QuadModifier, QuadDerivativeModifier>(before, after, m,
58  vt, name,
59  can_skip) {}
60 
61  QuadConstraint() {}
62 
63 #if defined(IMP_DOXYGEN) || defined(SWIG)
64  protected:
65  void do_update_attributes();
66  void do_update_derivatives(DerivativeAccumulator *da);
67  virtual ModelObjectsTemp do_get_inputs() const;
68  virtual ModelObjectsTemp do_get_outputs() const;
70 #endif
71 };
72 
73 IMPCORE_END_NAMESPACE
74 
75 #endif /* IMPCORE_QUAD_CONSTRAINT_H */
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
A more IMP-like version of the std::vector.
Definition: Vector.h:50
Implement a constraint on the Model.
Definition: Constraint.h:49
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:86
A Modifier on ParticleQuadsTemp.
Apply a QuadFunction to a Quad.
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
Definition: object_macros.h:95
A base class for modifiers of ParticleQuadsTemp.
Definition: QuadModifier.h:32
A Modifier on ParticleQuadsTemp.
Class for adding derivatives from restraints to the model.