IMP logo
IMP Reference Guide  develop.d97d4ead1f,2024/11/21
The Integrative Modeling Platform
CloseBipartitePairContainer.h
Go to the documentation of this file.
1 /**
2  * \file IMP/container/CloseBipartitePairContainer.h
3  * \brief Return all pairs from a SingletonContainer
4  *
5  * Copyright 2007-2023 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPCONTAINER_CLOSE_BIPARTITE_PAIR_CONTAINER_H
9 #define IMPCONTAINER_CLOSE_BIPARTITE_PAIR_CONTAINER_H
10 
11 #include <IMP/container/container_config.h>
13 #include "internal/CloseBipartitePairContainer.h"
14 #include <IMP/core/internal/MovedSingletonContainer.h>
15 #include <IMP/PairContainer.h>
16 #include <IMP/PairPredicate.h>
17 #include <IMP/SingletonContainer.h>
19 #include <IMP/container_macros.h>
20 #include <cereal/access.hpp>
21 #include <cereal/types/base_class.hpp>
22 
23 IMPCONTAINER_BEGIN_NAMESPACE
24 
25 /** \brief Return all spatially-proximal pairs of particles (a,b) from the
26  two SingletonContainers A and B, where a is in A and b is in B.
27 
28  \see ClosePairContainer for a more detailed description. This
29  container lists all close pairs of particles where one particle is
30  taken from each of the input sets.
31 
32  \see also AllPairContainer, ClosePairContainer,
33  AllBipartitePairContainer for variants on the functionality provided.
34  */
35 class IMPCONTAINEREXPORT CloseBipartitePairContainer :
36 #if defined(IMP_DOXYGEN) || defined(SWIG)
37  public PairContainer
38 #else
39  public IMP::container::internal::CloseBipartitePairContainer
40 #endif
41  {
42  typedef IMP::container::internal::CloseBipartitePairContainer P;
43 
44  friend class cereal::access;
45  template<class Archive> void serialize(Archive &ar) {
46  ar(cereal::base_class<
47  IMP::container::internal::CloseBipartitePairContainer>(this));
48  }
50 
51  public:
52  //! Get the individual particles from the passed SingletonContainer
54  SingletonContainerAdaptor b, double distance,
55  double slack = 1,
56  std::string name =
57  "CloseBipartitePairContainer%1%");
58 #ifndef IMP_DOXYGEN
59  //! Get the individual particles from the passed SingletonContainer
61  SingletonContainerAdaptor b, double distance,
62  core::ClosePairsFinder *cpf, double slack = 1,
63  std::string name =
64  "CloseBipartitePairContainer%1%");
65 #endif
67 
68 #if defined(IMP_DOXYGEN) || defined(SWIG)
69 
70  /** @name Methods to control the set of filters
71 
72  PairPredicate objects can be added as filters to prevent
73  the addition of pairs to the container output list. Pairs
74  for which the predicates evaluate to a non-zero value are
75  excluded from the list.
76  */
77  /**@{*/
78  IMP_LIST_ACTION(public, PairPredicate, PairPredicates, pair_filter,
79  pair_filters, PairPredicate *, PairPredicates,
80  obj->set_was_used(true);
81  , , );
82  /**@}*/
86  void do_apply(const PairModifier *sm) const;
88 
89  private:
90  virtual std::size_t do_get_contents_hash() const override;
91 #endif
93 };
94 
95 IMPCONTAINER_END_NAMESPACE
96 
97 #endif /* IMPCONTAINER_CLOSE_BIPARTITE_PAIR_CONTAINER_H */
virtual ParticleIndexPairs get_range_indexes() const =0
A shared container for Pairs.
Definition: PairContainer.h:39
A base class for algorithms to find spatial proximities.
A container for Singletons.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Return all spatially-proximal pairs of particles (a,b) from the two SingletonContainers A and B...
A more IMP-like version of the std::vector.
Definition: Vector.h:50
Macros to define containers of objects.
A base class for modifiers of ParticlePairsTemp.
Definition: PairModifier.h:32
A container for Pairs.
Define PairPredicate.
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
Definition: object_macros.h:95
Store a list of ParticleIndexPairs.
virtual ParticleIndexes get_all_possible_indexes() const =0
Get contained particles.
Abstract predicate function.
Definition: PairPredicate.h:31
A base class for algorithms to detect proximities.
virtual ParticleIndexPairs get_indexes() const =0
virtual ModelObjectsTemp do_get_inputs() const =0