IMP logo
IMP Reference Guide  develop.36b5e40f34,2024/10/14
The Integrative Modeling Platform
QuadsRestraint.h
Go to the documentation of this file.
1 // Autogenerated by ../../../../tmp/nightly-build-467/imp-20241014.develop.36b5e40f34/tools/build/make_containers.py
2 // from ../../../../tmp/nightly-build-467/imp-20241014.develop.36b5e40f34/tools/build/container_templates/container/ClassnamesRestraint.h
3 // Do not edit - any changes will be lost!
4 
5 /**
6  * \file IMP/container/QuadsRestraint.h
7  * \brief Apply a QuadScore to each Quad in a list.
8  *
9  * Copyright 2007-2023 IMP Inventors. All rights reserved.
10  *
11  */
12 
13 #ifndef IMPCONTAINER_QUADS_RESTRAINT_H
14 #define IMPCONTAINER_QUADS_RESTRAINT_H
15 
16 #include <IMP/container/container_config.h>
17 #include <IMP/internal/ContainerRestraint.h>
18 #include <IMP/QuadContainer.h>
19 #include <IMP/QuadScore.h>
20 #include <cereal/access.hpp>
21 #include <cereal/types/base_class.hpp>
22 
23 IMPCONTAINER_BEGIN_NAMESPACE
24 
25 //! Applies a QuadScore to each Quad in a list.
26 /** This restraint stores the used particle indexes in a ParticleIndexQuads.
27  The container used can be set so that the list can be shared
28  with other containers (or a nonbonded list can be used).
29 
30  Examples using various multiplicity containers:
31  \include restrain_in_sphere.py
32  \include nonbonded_interactions.py
33 
34  \see IMP::core::QuadRestraint
35  */
37 #if defined(SWIG) || defined(IMP_DOXYGEN)
38  public Restraint
39 #else
40  public IMP::internal::ContainerRestraint<QuadScore, QuadContainer>
41 #endif
42  {
43  typedef IMP::internal::ContainerRestraint<
45 
46  friend class cereal::access;
47 
48  template<class Archive> void serialize(Archive &ar) {
49  ar(cereal::base_class<P>(this));
50  }
52 
53  public:
54  //! Create the restraint with a shared container
55  /** \param[in] ss The function to apply to each particle.
56  \param[in] pc The container containing the stored particles. This
57  container is not copied.
58  \param[in] name The object name
59  */
61  std::string name = "QuadsRestraint %1%")
62  : P(ss, pc, name) {}
63 
64  QuadsRestraint() {}
65 
66 #if defined(IMP_DOXYGEN) || defined(SWIG)
67  double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const;
68  IMP::ModelObjectsTemp do_get_inputs() const;
70 #endif
71 };
72 
74 
75 IMPCONTAINER_END_NAMESPACE
76 
77 #endif /* IMPCONTAINER_QUADS_RESTRAINT_H */
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
A container for Quads.
A more IMP-like version of the std::vector.
Definition: Vector.h:50
Abstract class for scoring object(s) of type ParticleIndexQuad.
Definition: QuadScore.h:44
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
Definition: object_macros.h:95
Applies a QuadScore to each Quad in a list.
A shared container for Quads.
Definition: QuadContainer.h:39
Define QuadScore.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
Definition: object_macros.h:44
QuadsRestraint(QuadScore *ss, QuadContainerAdaptor pc, std::string name="QuadsRestraint %1%")
Create the restraint with a shared container.
Class for adding derivatives from restraints to the model.
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:56