IMP  2.3.0
The Integrative Modeling Platform
SingletonConstraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/SingletonConstraint.h
3  * \brief Use a SingletonModifier applied to a kernel::ParticlesTemp 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-2014 IMP Inventors. All rights reserved.
10  */
11 
12 #ifndef IMPCORE_SINGLETON_CONSTRAINT_H
13 #define IMPCORE_SINGLETON_CONSTRAINT_H
14 
15 #include <IMP/core/core_config.h>
16 #include <IMP/kernel/internal/TupleConstraint.h>
17 #include <IMP/SingletonModifier.h>
19 
20 IMPCORE_BEGIN_NAMESPACE
21 //! Apply a SingletonFunction to a Singleton
22 /** The score state is passed up to two SingletonModifiers, one to
23  apply before evaluation and the other after. The one after
24  should take a DerivativeAccumulator as its last argument for
25  SingletonModifier::apply() and will only be called if
26  the score was computed with derivatives.
27 
28  \see container::SingletonsConstraint
29  */
31 #if defined(IMP_DOXYGEN) || defined(SWIG)
32  public Constraint
33 #else
34  public IMP::kernel::internal::TupleConstraint<SingletonModifier,
35  SingletonDerivativeModifier>
36 #endif
37  {
38  public:
39  /** \deprecated_at{2.1} Use the model/index constructor.
40  */
41  IMPCORE_DEPRECATED_METHOD_DECL(2.1)
43  SingletonDerivativeModifier *after, kernel::Particle* vt,
44  std::string name = "SingletonConstraint %1%")
45  : IMP::kernel::internal::TupleConstraint<
46  SingletonModifier, SingletonDerivativeModifier>(before, after, vt,
47  name) {
48  IMPCORE_DEPRECATED_METHOD_DEF(2.1, "Use the model/index constructor.");
49  }
50 
52  SingletonDerivativeModifier *after, kernel::Model *m,
54  std::string name = "SingletonConstraint %1%")
55  : IMP::kernel::internal::TupleConstraint<
56  SingletonModifier, SingletonDerivativeModifier>(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_SINGLETON_CONSTRAINT_H */
Import IMP/kernel/SingletonModifier.h in the namespace.
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
Apply a SingletonFunction to a Singleton.
A base class for modifiers of kernel::ParticlesTemp.
Import IMP/kernel/SingletonDerivativeModifier.h in the namespace.
Class to handle individual model particles.
Implement a constraint on the Model.
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:73