IMP  2.2.0
The Integrative Modeling Platform
QuadsConstraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/container/QuadsConstraint.h
3  * \brief Use a QuadModifier applied to a kernel::ParticleQuadsTemp to
4  * maintain an invariant
5  *
6  * WARNING This file was generated from QuadsConstraint.h
7  * in /tmp/nightly-build-28832/imp-2.2.0/tools/build/container_templates/container
8  * by tools/maintenance/setup_containers.py.
9  *
10  * Copyright 2007-2014 IMP Inventors. All rights reserved.
11  */
12 
13 #ifndef IMPCONTAINER_QUADS_CONSTRAINT_H
14 #define IMPCONTAINER_QUADS_CONSTRAINT_H
15 
16 #include <IMP/container/container_config.h>
17 #include <IMP/QuadContainer.h>
18 #include <IMP/QuadModifier.h>
19 #include <IMP/Constraint.h>
20 #include <IMP/base/object_macros.h>
21 #include <IMP/kernel/internal/ContainerConstraint.h>
22 
23 IMPKERNEL_BEGIN_NAMESPACE
24 // for swig
25 class QuadContainer;
26 class QuadModifier;
27 IMPKERNEL_END_NAMESPACE
28 
29 IMPCONTAINER_BEGIN_NAMESPACE
30 //! Apply a QuadFunction to a QuadContainer to maintain an invariant
31 /** The score state is passed up to two QuadModifiers, one to
32  apply before evaluation and the other after. The one after
33  should take a DerivativeAccumulator as its last argument for
34  QuadModifier::apply() and will only be called if
35  the score was computed with derivatives.
36 
37  \see core::QuadConstraint
38  */
40 #if defined(SWIG) || defined(IMP_DOXYGEN)
41  public Constraint
42 #else
43  public IMP::kernel::internal::ContainerConstraint<
44  QuadModifier, QuadModifier, QuadContainer>
45 #endif
46  {
47  typedef IMP::kernel::internal::ContainerConstraint<
49 
50  public:
51  /** \param[in] c The Container to hold the elements to process
52  \param[in] before The QuadModifier to apply to all elements
53  before evaluate.
54  \param[in] after The QuadModifier to apply to all elements
55  after evaluate.
56  \param[in] name The object name
57  */
59  QuadContainerAdaptor c,
60  std::string name = "QuadConstraint %1%")
61  : P(before, after, c, name) {}
62 #if defined(IMP_DOXYGEN) || defined(SWIG)
63  protected:
64  void do_update_attributes();
65  void do_update_derivatives(DerivativeAccumulator *da);
66  virtual kernel::ModelObjectsTemp do_get_inputs() const;
67  virtual kernel::ModelObjectsTemp do_get_outputs() const;
69 #endif
70 };
71 
73 
74 IMPCONTAINER_END_NAMESPACE
75 
76 #endif /* IMPCONTAINER_QUADS_CONSTRAINT_H */
Class for adding derivatives from restraints to the model.
A shared container for Quads.
IMP::kernel::QuadContainer QuadContainer
Import IMP/kernel/QuadContainer.h in the namespace.
IMP::kernel::QuadModifier QuadModifier
Import IMP/kernel/QuadModifier.h in the namespace.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Import IMP/kernel/Constraint.h in the namespace.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Apply a QuadFunction to a QuadContainer to maintain an invariant.
QuadsConstraint(QuadModifier *before, QuadModifier *after, QuadContainerAdaptor c, std::string name="QuadConstraint %1%")
Various general useful macros for IMP.
Implement a constraint on the Model.
A base class for modifiers of kernel::ParticleQuadsTemp.