/
domino_filters.h
67 lines (56 loc) · 2.08 KB
/
domino_filters.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/**
* \file IMP/em2d/domino_filters.h
* \brief SubsetFilter for checking overlap between projections and images
*
* Copyright 2007-2022 IMP Inventors. All rights reserved.
*
*/
#ifndef IMPEM2D_DOMINO_FILTERS_H
#define IMPEM2D_DOMINO_FILTERS_H
#include "IMP/em2d/image_processing.h"
#include "IMP/em2d/domino_particle_states.h"
#include "IMP/algebra/Vector3D.h"
#include "IMP/domino/subset_filters.h"
#include "IMP/domino/Assignment.h"
#include "IMP/Pointer.h"
#include "IMP/base_types.h"
#include "IMP/log.h"
#include <iostream>
IMPEM2D_BEGIN_NAMESPACE
//! SubsetFilter for checking overlap between projections and images
class IMPEM2DEXPORT DistanceFilter : public domino::SubsetFilter {
protected:
domino::Subset subset_acting_on_;
domino::Subset subset_restrained_;
Pointer<domino::ParticleStatesTable> ps_table_;
double max_distance_;
public:
/*! Filter action on the distance between two particles. To be used with
DOMINO
\param[in] subset_to_act_on A subset that is going to be filtered.
\param[in] subset_to_restrain A subset of 2 particles that need to be
within a given distance
\param[in] ps_table table containing the states for subset_to_act_on and
subset_to_restraint
\param[in] max_distance The maximum distance between the particles in
subset_to_restrain
*/
DistanceFilter(const domino::Subset &subset_to_act_on,
const domino::Subset &subset_to_restrain,
domino::ParticleStatesTable *ps_table, double max_distance)
: subset_acting_on_(subset_to_act_on),
subset_restrained_(subset_to_restrain),
ps_table_(ps_table),
max_distance_(max_distance) {
IMP_LOG_TERSE("DistanceFilter created" << std::endl);
}
void show(std::ostream &out = std::cout) const {
out << "DistanceFilter" << std::endl;
}
virtual bool get_is_ok(const IMP::domino::Assignment &assignment) const
override;
IMP_OBJECT_METHODS(DistanceFilter);
};
IMP_OBJECTS(DistanceFilter, DistanceFilters);
IMPEM2D_END_NAMESPACE
#endif /* IMPEM2D_DOMINO_FILTERS_H */