IMP  2.3.1
The Integrative Modeling Platform
PairsRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/container/PairsRestraint.h
3  * \brief Apply a PairScore to each Pair in a list.
4  *
5  * WARNING This file was generated from PairsRestraint.h
6  * in /tmp/nightly-build-29065/imp-2.3.1/tools/build/container_templates/container
7  * by tools/build/make_containers.py.
8  *
9  * Copyright 2007-2014 IMP Inventors. All rights reserved.
10  *
11  */
12 
13 #ifndef IMPCONTAINER_PAIRS_RESTRAINT_H
14 #define IMPCONTAINER_PAIRS_RESTRAINT_H
15 
16 #include <IMP/container/container_config.h>
17 #include <IMP/kernel/internal/ContainerRestraint.h>
19 #include <IMP/kernel/PairScore.h>
20 
21 IMPCONTAINER_BEGIN_NAMESPACE
22 
23 //! Applies a PairScore to each Pair in a list.
24 /** This restraint stores the used particles in a kernel::ParticlePairsTemp.
25  The container used can be set so that the list can be shared
26  with other containers (or a nonbonded list can be used).
27 
28  Examples using various multiplicity containers:
29  \include restrain_in_sphere.py
30  \include nonbonded_interactions.py
31 
32  \see IMP::core::PairRestraint
33  */
35 #if defined(SWIG) || defined(IMP_DOXYGEN)
36  public kernel::Restraint
37 #else
38  public IMP::kernel::internal::ContainerRestraint<kernel::PairScore,
39  kernel::PairContainer>
40 #endif
41  {
42  typedef IMP::kernel::internal::ContainerRestraint<
44 
45  public:
46  //! Create the restraint with a shared container
47  /** \param[in] ss The function to apply to each particle.
48  \param[in] pc The container containing the stored particles. This
49  container is not copied.
50  \param[in] name The object name
51  */
54  std::string name = "PairsRestraint %1%")
55  : P(ss, pc, name) {}
56 
57 #if defined(IMP_DOXYGEN) || defined(SWIG)
58  double unprotected_evaluate(IMP::kernel::DerivativeAccumulator *accum) const;
59  IMP::kernel::ModelObjectsTemp do_get_inputs() const;
61 #endif
62 };
63 
65 
66 IMPCONTAINER_END_NAMESPACE
67 
68 #endif /* IMPCONTAINER_PAIRS_RESTRAINT_H */
Class for adding derivatives from restraints to the model.
IMP::kernel::PairScore PairScore
Define PairScore.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
A shared container for Pairs.
Abstract class for scoring object(s) of type ParticlePair.
A restraint is a term in an IMP ScoringFunction.
A container for Pairs.
PairsRestraint(kernel::PairScore *ss, kernel::PairContainerAdaptor pc, std::string name="PairsRestraint %1%")
Create the restraint with a shared container.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Definition: object_macros.h:52
Applies a PairScore to each Pair in a list.