IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
GridClosePairsFinder.h
Go to the documentation of this file.
1/**
2 * \file IMP/core/GridClosePairsFinder.h
3 * \brief Use a hierarchy of grids to find close pairs.
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 */
7
8#ifndef IMPCORE_GRID_CLOSE_PAIRS_FINDER_H
9#define IMPCORE_GRID_CLOSE_PAIRS_FINDER_H
10
11#include "ClosePairsFinder.h"
12#include <IMP/object_macros.h>
13#include <IMP/core/core_config.h>
14#include <cereal/access.hpp>
15#include <cereal/types/base_class.hpp>
16
17IMPCORE_BEGIN_NAMESPACE
18
19//! Find all nearby pairs by testing all pairs
20/**
21 \see container::ClosePairContainer
22 */
23class IMPCOREEXPORT GridClosePairsFinder : public ClosePairsFinder {
24 friend class cereal::access;
25 template<class Archive> void serialize(Archive &ar) {
26 ar(cereal::base_class<ClosePairsFinder>(this));
27 }
28 IMP_OBJECT_SERIALIZE_DECL(GridClosePairsFinder);
29 public:
30 GridClosePairsFinder();
31 virtual IntPairs get_close_pairs(const algebra::BoundingBox3Ds &bbs) const
32 override;
33 virtual IntPairs get_close_pairs(const algebra::BoundingBox3Ds &bas,
34 const algebra::BoundingBox3Ds &bbs) const
35 override;
37 Model *m, const ParticleIndexes &pc) const override;
39 Model *m, const ParticleIndexes &pca,
40 const ParticleIndexes &pcb) const override;
42 Model *m, const ParticleIndexes &pis) const override;
43
44 IMP_OBJECT_METHODS(GridClosePairsFinder);
45};
46
47IMPCORE_END_NAMESPACE
48
49#endif /* IMPCORE_GRID_CLOSE_PAIRS_FINDER_H */
A base class for algorithms to detect proximities.
Class for storing model, its restraints, constraints, and particles.
Definition Model.h:111
virtual ParticleIndexPairs get_close_pairs(Model *m, const ParticleIndexes &pca, const ParticleIndexes &pcb) const override
return all close pairs among pc in model m
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const override
Overload this method to specify the inputs.
virtual ParticleIndexPairs get_close_pairs(Model *m, const ParticleIndexes &pc) const override
return all close pairs among pc in model m
IMP::Vector< BoundingBox3D > BoundingBox3Ds
IMP::Vector< ParticleIndexPair, std::allocator< ParticleIndexPair > > ParticleIndexPairs
Definition base_types.h:208
IMP::Vector< IntPair > IntPairs
Definition types.h:40
Vector< ParticleIndex, std::allocator< ParticleIndex > > ParticleIndexes
A list of particles, each identified by its ParticleIndex.
Definition base_types.h:199
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition base_types.h:122
Helper macros for implementing IMP Objects.
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.