IMP logo
IMP Reference Guide  2.10.1
The Integrative Modeling Platform
PairsConstraint.h
Go to the documentation of this file.
1 // Autogenerated by ../../../../tmp/nightly-build-8954/imp-2.10.1/tools/build/make_containers.py
2 // from ../../../../tmp/nightly-build-8954/imp-2.10.1/tools/build/container_templates/container/ClassnamesConstraint.h
3 // Do not edit - any changes will be lost!
4 
5 /**
6  * \file IMP/container/PairsConstraint.h
7  * \brief Use a PairModifier applied to a ParticlePairsTemp to
8  * maintain an invariant
9  *
10  * Copyright 2007-2018 IMP Inventors. All rights reserved.
11  */
12 
13 #ifndef IMPCONTAINER_PAIRS_CONSTRAINT_H
14 #define IMPCONTAINER_PAIRS_CONSTRAINT_H
15 
16 #include <IMP/container/container_config.h>
17 #include <IMP/PairContainer.h>
18 #include <IMP/PairModifier.h>
19 #include <IMP/Constraint.h>
20 #include <IMP/object_macros.h>
21 #include <IMP/internal/ContainerConstraint.h>
22 
23 IMPKERNEL_BEGIN_NAMESPACE
24 // for swig
25 class PairContainer;
26 class PairModifier;
27 IMPKERNEL_END_NAMESPACE
28 
29 IMPCONTAINER_BEGIN_NAMESPACE
30 //! Apply a PairFunction to a PairContainer to maintain an invariant
31 /** The score state is passed up to two PairModifiers, one to
32  apply before evaluation and the other after. The one after
33  should take a DerivativeAccumulator as its last argument for
34  PairModifier::apply() and will only be called if
35  the score was computed with derivatives.
36 
37  \see core::PairConstraint
38  */
40 #if defined(SWIG) || defined(IMP_DOXYGEN)
41  public Constraint
42 #else
43  public IMP::internal::ContainerConstraint<
44  PairModifier, PairModifier, PairContainer>
45 #endif
46  {
47  typedef IMP::internal::ContainerConstraint<
49 
50  public:
51  /** \param[in] c The Container to hold the elements to process
52  \param[in] before The PairModifier to apply to all elements
53  before evaluate.
54  \param[in] after The PairModifier to apply to all elements
55  after evaluate.
56  \param[in] name The object name
57  */
60  std::string name = "PairsConstraint %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 ModelObjectsTemp do_get_inputs() const;
67  virtual ModelObjectsTemp do_get_outputs() const;
69 #endif
70 };
71 
73 
74 IMPCONTAINER_END_NAMESPACE
75 
76 #endif /* IMPCONTAINER_PAIRS_CONSTRAINT_H */
A shared container for Pairs.
Definition: PairContainer.h:37
Various general useful macros for IMP.
#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:39
A base class for modifiers of ParticlePairsTemp.
Definition: PairModifier.h:32
Implement a constraint on the Model.
Definition: Constraint.h:49
A container for Pairs.
A Modifier on ParticlePairsTemp.
A base class for constraints.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
Definition: object_macros.h:44
PairsConstraint(PairModifier *before, PairModifier *after, PairContainerAdaptor c, std::string name="PairsConstraint %1%")
Apply a PairFunction to a PairContainer to maintain an invariant.
Class for adding derivatives from restraints to the model.