IMP logo
ClosePairContainer.h
Go to the documentation of this file.
1 /**
2  * \file ClosePairContainer.h
3  * \brief Return all pairs from a SingletonContainer
4  *
5  * This file is generated by a script (core/tools/make-container).
6  * Do not edit directly.
7  *
8  * Copyright 2007-2012 IMP Inventors. Close rights reserved.
9  */
10 
11 #ifndef IMPCONTAINER_CLOSE_PAIR_CONTAINER_H
12 #define IMPCONTAINER_CLOSE_PAIR_CONTAINER_H
13 
14 #include "container_config.h"
15 #include <IMP/core/internal/CoreClosePairContainer.h>
16 #include <IMP/Optimizer.h>
17 
18 IMPCONTAINER_BEGIN_NAMESPACE
19 
20 /** \brief Return all close unordered pairs of particles taken from
21  the SingletonContainer
22 
23  This maintains a list of particles whose inter-sphere distance is
24  smaller than the distance parameter.
25 
26  In order to do this efficiently the class actually computes all
27  pairs within distance+slack of one another. As long as the
28  particles don't move more than the slack amount, the list is still
29  valid and doesn't need to be recomputed. The container keeps track
30  internally of how far the particles have moved using a score
31  state, and is also updated via a score state.
32 
33  \usesconstraint
34 
35  Here is a simple example of using this for a nonbonded list
36  \verbinclude nonbonded_interactions.py
37 
38  \note This class uses the IMP::core::BoxSweepClosePairsFinder by
39  default if \ref cgal "CGAL" is available.
40 
41  \ingroup CGAL
42  \see CloseBipartitePairContainer
43  \see ClosePairsFinder
44 
45  */
46 class IMPCONTAINEREXPORT ClosePairContainer :
47 #if defined(IMP_DOXYGEN) || defined(SWIG)
48 public PairContainer
49 #else
50 public core::internal::CoreClosePairContainer
51 #endif
52 {
53  typedef core::internal::CoreClosePairContainer P;
54 public:
55  //! Get the individual particles from the passed SingletonContainer
57  double slack=1);
58 
59  //! Get the individual particles from the passed SingletonContainer
62  double slack=1);
63 
64 #if defined(SWIG) || defined(IMP_DOXYGEN)
65  /** @name Methods to control the set of filters
66 
67  PairPredicate objects can be used as filters to prevent
68  the addition of pairs to the containeroutput list. Pairs
69  for which the predicates evaluate to a non-zero value are
70  excluded from the list.
71  */
72  /**@{*/
73  IMP_LIST(public, PairPredicate, pair_filter,
74  PairPredicate*, PairPredicates);
75  /**@}*/
76  void set_slack(double s);
77  double get_slack() const;
79 #else
81 #endif
82 };
83 
84 IMP_OBJECTS(ClosePairContainer,ClosePairContainers);
85 
86 
87 /** Estimate the proper slack based on
88  - the time taken to evaluate the passed restraints for a given
89  number of particles in the non-bonded list
90  - the number of pairs in the list as a function of slack size
91  - the amount the particles are moved by the optimizer
92  - the time taken to compute the close pairs as a function
93  of slack size
94 
95  For best results, make the particles start in a
96  that is "typical" for the optimization.
97 */
98 IMPCONTAINEREXPORT double
100  double upper_bound,
101  double step,
102  const RestraintsTemp &restraints,
103  bool derivatives,
104  Optimizer *opt,
105  ClosePairContainer *cpc);
106 
107 
108 IMPCONTAINER_END_NAMESPACE
109 
110 #endif /* IMPCONTAINER_CLOSE_PAIR_CONTAINER_H */

Generated on Tue May 22 2012 23:33:12 for IMP by doxygen 1.8.1