IMP  2.0.1
The Integrative Modeling Platform
ConnectingPairContainer.h
Go to the documentation of this file.
1 /**
2  * \file IMP/container/ConnectingPairContainer.h
3  * \brief A container which has pairs which ensure a set is connected
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPCONTAINER_CONNECTING_PAIR_CONTAINER_H
9 #define IMPCONTAINER_CONNECTING_PAIR_CONTAINER_H
10 
11 #include <IMP/container/container_config.h>
12 #include <IMP/core/internal/MovedSingletonContainer.h>
13 #include <IMP/internal/ListLikePairContainer.h>
14 #include <IMP/PairContainer.h>
15 #include <IMP/SingletonContainer.h>
16 #include <IMP/macros.h>
17 #include <IMP/OptimizerState.h>
18 #include <IMP/ScoreState.h>
19 
20 IMPCONTAINER_BEGIN_NAMESPACE
21 
22 //! A container which keeps a set of pairs that connect a set of spheres.
23 /** This container is for implementing connectivity when
24  - there is no ambiguity about the set of particles being connected
25  - the distance score used in the restraint is a monotonic function of the
26  distance between the two particles.
27 
28  The contents of this container are a set of pairs defining a tree over
29  the spheres in the supplied SingletonContainer. This set of edges has
30  the property that
31  - for particles whose balls do not intersect, if there is a path
32  connecting those balls entirely contained in the union of the set of
33  all balls, then there is no edge connecting those two particles.
34 
35 
36  It is significantly more efficient than the ConnectivityRestraint
37  but less flexible.
38  \see {core::ConnectivityRestraint}
39  */
40 class IMPCONTAINEREXPORT ConnectingPairContainer:
41 #if defined(IMP_DOXYGEN) || defined(SWIG)
42 public PairContainer
43 #else
44 public IMP::internal::ListLikePairContainer
45 #endif
46 {
47  IMP::OwnerPointer<SingletonContainer> sc_;
48  IMP::OwnerPointer<core::internal::MovedSingletonContainer> mv_;
49  ParticlePairsTemp data_;
50  double error_bound_;
51  bool mst_;
52  void initialize(SingletonContainer *sc);
53 public:
54  /** For efficiency, the set of edges is only updated occasionally. The
55  error parameter determines how far particles need to move before
56  the set of edges is updated.*/
58 
59 #if defined(IMP_DOXYGEN) || defined(SWIG)
61 #else
62  IMP_LISTLIKE_PAIR_CONTAINER(ConnectingPairContainer);
63  bool get_is_decomposable() const {return false;}
64 #endif
65 };
66 
68 
69 IMPCONTAINER_END_NAMESPACE
70 
71 #endif /* IMPCONTAINER_CONNECTING_PAIR_CONTAINER_H */