IMP  2.0.0
The Integrative Modeling Platform
SingletonsRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/container/SingletonsRestraint.h
3  * \brief Apply a SingletonScore to each Singleton in a list.
4  *
5  * WARNING This file was generated from SingletonsRestraint.h
6  * in /tmp/nightly-build-5687/imp-2.0.0/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_SINGLETONS_RESTRAINT_H
14 #define IMPCONTAINER_SINGLETONS_RESTRAINT_H
15 
16 #include <IMP/container/container_config.h>
17 
18 #include <IMP/internal/InternalSingletonsRestraint.h>
19 
20 #include <iostream>
21 
22 IMPCONTAINER_BEGIN_NAMESPACE
23 
24 //! Applies a SingletonScore to each Singleton in a list.
25 /** This restraint stores the used particles in a ParticlesTemp.
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 ListSingletonContainer is used and the
29  {add_, set_, clear_}particle{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::SingletonRestraint
36  */
38 #if defined(SWIG) || defined(IMP_DOXYGEN)
39 public Restraint
40 #else
41 public IMP::kernel::internal::InternalSingletonsRestraint
42 #endif
43 {
44  typedef IMP::kernel::internal::InternalSingletonsRestraint 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  SingletonContainerAdaptor pc,
55  std::string name="SingletonsRestraint %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(SingletonsRestraint,SingletonsRestraints);
67 
68 IMPCONTAINER_END_NAMESPACE
69 
70 #endif /* IMPCONTAINER_SINGLETONS_RESTRAINT_H */