IMP logo
IMP Reference Guide  2.16.0
The Integrative Modeling Platform
domino_filters.h
Go to the documentation of this file.
1 /**
2  * \file IMP/em2d/domino_filters.h
3  * \brief SubsetFilter for checking overlap between projections and images
4  *
5  * Copyright 2007-2021 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPEM2D_DOMINO_FILTERS_H
10 #define IMPEM2D_DOMINO_FILTERS_H
11 
14 #include "IMP/algebra/Vector3D.h"
16 #include "IMP/domino/Assignment.h"
17 #include "IMP/Pointer.h"
18 #include "IMP/base_types.h"
19 #include "IMP/log.h"
20 #include <iostream>
21 
22 IMPEM2D_BEGIN_NAMESPACE
23 
24 //! SubsetFilter for checking overlap between projections and images
25 class IMPEM2DEXPORT DistanceFilter : public domino::SubsetFilter {
26 
27  protected:
28  domino::Subset subset_acting_on_;
29  domino::Subset subset_restrained_;
31  double max_distance_;
32 
33  public:
34  /*! Filter action on the distance between two particles. To be used with
35  DOMINO
36  \param[in] subset_to_act_on A subset that is going to be filtered.
37  \param[in] subset_to_restrain A subset of 2 particles that need to be
38  within a given distance
39  \param[in] ps_table table containing the states for subset_to_act_on and
40  subset_to_restraint
41  \param[in] max_distance The maximum distance between the particles in
42  subset_to_restrain
43  */
44  DistanceFilter(const domino::Subset &subset_to_act_on,
45  const domino::Subset &subset_to_restrain,
46  domino::ParticleStatesTable *ps_table, double max_distance)
47  : subset_acting_on_(subset_to_act_on),
48  subset_restrained_(subset_to_restrain),
49  ps_table_(ps_table),
50  max_distance_(max_distance) {
51  IMP_LOG_TERSE("DistanceFilter created" << std::endl);
52  }
53  void show(std::ostream &out = std::cout) const {
54  out << "DistanceFilter" << std::endl;
55  }
56 
57  virtual bool get_is_ok(const IMP::domino::Assignment &assignment) const
59 
61 };
62 
64 
65 IMPEM2D_END_NAMESPACE
66 
67 #endif /* IMPEM2D_DOMINO_FILTERS_H */
Image processing functions.
Basic types used by IMP.
A Bayesian inference-based sampler.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
A Bayesian inference-based sampler.
Represent a subset of the particles being optimized.
Definition: Subset.h:33
virtual bool get_is_ok(const Assignment &state) const =0
Particles states for a rigid body that is going to be projected.
A more IMP-like version of the std::vector.
Definition: Vector.h:40
#define IMP_LOG_TERSE(expr)
Definition: log_macros.h:72
std::ostream & show(Hierarchy h, std::ostream &out=std::cout)
Print the hierarchy using a given decorator to display each node.
SubsetFilter for checking overlap between projections and images.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
Definition: object_macros.h:44
A nullptr-initialized pointer to an IMP Object.
Store a configuration of a subset.
Definition: Assignment.h:32
Simple 3D vector class.
DistanceFilter(const domino::Subset &subset_to_act_on, const domino::Subset &subset_to_restrain, domino::ParticleStatesTable *ps_table, double max_distance)
Logging and error reporting support.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.