IMP  2.0.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-36540/imp-2.0.1/tools/build/container_templates/container
7  * by tools/maintenance/setup_containers.py.
8  *
9  * Copyright 2007-2013 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 
18 #include <IMP/internal/InternalPairsRestraint.h>
19 
20 #include <iostream>
21 
22 IMPCONTAINER_BEGIN_NAMESPACE
23 
24 //! Applies a PairScore to each Pair in a list.
25 /** This restraint stores the used particles in a ParticlePairsTemp.
26  The container used can be set so that the list can be shared
27  with other containers (or a nonbonded list can be used). By default
28  a ListPairContainer is used and the
29  {add_, set_, clear_}particle_pair{s} methods can be used.
30 
31  Examples using various multiplicity containers:
32  \pythonexample{restrain_in_sphere}
33  \pythonexample{nonbonded_interactions}
34 
35  \see IMP::core::PairRestraint
36  */
38 #if defined(SWIG) || defined(IMP_DOXYGEN)
39 public Restraint
40 #else
41 public IMP::kernel::internal::InternalPairsRestraint
42 #endif
43 {
44  typedef IMP::kernel::internal::InternalPairsRestraint P;
45 public:
46 
47  //! Create the restraint with a shared container
48  /** \param[in] ss The function to apply to each particle.
49  \param[in] pc The container containing the stored particles. This
50  container is not copied.
51  \param[in] name The object name
52  */
54  PairContainerAdaptor pc,
55  std::string name="PairsRestraint %1%"):
56  P(ss, pc, name)
57  {}
58 
59 #if defined(IMP_DOXYGEN) || defined(SWIG)
60  double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const;
61  IMP::ModelObjectsTemp do_get_inputs() const;
63 #endif
64 };
65 
66 IMP_OBJECTS(PairsRestraint,PairsRestraints);
67 
68 IMPCONTAINER_END_NAMESPACE
69 
70 #endif /* IMPCONTAINER_PAIRS_RESTRAINT_H */