IMP.bff
Loading...
Searching...
No Matches
PathMapHeader.h
Go to the documentation of this file.
1
9#ifndef IMPBFF_PATHMAPHEADER_H
10#define IMPBFF_PATHMAPHEADER_H
11
12#include <IMP/bff/bff_config.h>
13
14#include <cmath> /* ceil */
15
16#include <IMP/Particle.h>
17#include <IMP/algebra/Vector3D.h>
18#include <IMP/atom/Atom.h>
19#include <IMP/atom/Hierarchy.h>
20#include <IMP/atom/Selection.h>
21#include <IMP/em/DensityHeader.h>
22
23#include <IMP/bff/internal/json.h>
24#include <IMP/bff/AV.h>
25
26#include <algorithm>
27
28IMPBFF_BEGIN_NAMESPACE
29
30
31class PathMap;
32
33class IMPBFFEXPORT PathMapHeader {
34
35friend class IMP::bff::PathMap;
36
37private:
38
39 double grid_spacing_;
40 double max_path_length_;
41 double neighbor_radius_;
42 double obstacle_threshold_;
43
44 IMP::em::DensityHeader density_header_;
45
46protected:
47
48 IMP::algebra::Vector3D path_origin_;
49
50public:
51
52 ~PathMapHeader() = default;
53
64 double max_path_length = 10.0,
65 double grid_spacing = 1.0,
66 double neighbor_radius = 2,
67 double obstacle_threshold = std::numeric_limits<double>::epsilon()
68 );
69
73
78 void update_map_dimensions(int nx=-1, int ny=-1, int nz=-1);
79
84 void set_path_origin(const IMP::algebra::Vector3D &v);
85
87 IMP::algebra::Vector3D get_path_origin() const {
88 return path_origin_;
89 }
90
96 return max_path_length_;
97 }
98
104
109 void set_obstacle_threshold(double obstacle_threshold);
110
116 return obstacle_threshold_;
117 }
118
123 void set_neighbor_radius(double neighbor_radius);
124
129 double get_neighbor_radius() const{
130 return neighbor_radius_;
131 }
132
138
140 const IMP::em::DensityHeader *get_density_header() const {
141 return &density_header_; }
142
144 IMP::em::DensityHeader *get_density_header_writable() {
145 return &density_header_; }
146
148 IMP::algebra::Vector3D get_origin() const ;
149
155
157 void set_origin(float x, float y, float z);
158
159};
160
161IMP_OBJECTS(PathMapHeader, PathMapHeaders);
162
163IMPBFF_END_NAMESPACE
164
165
166#endif //IMPBFF_PATHMAPHEADER_H
IMP_OBJECTS(PathMapHeader, PathMapHeaders)
Definition PathMapHeader.h:33
double get_grid_edge_length()
Get the edge length of the grid.
const IMP::em::DensityHeader * get_density_header() const
Returns a read-only pointer to the header of the map.
Definition PathMapHeader.h:140
PathMapHeader(double max_path_length=10.0, double grid_spacing=1.0, double neighbor_radius=2, double obstacle_threshold=std::numeric_limits< double >::epsilon())
IMP::algebra::Vector3D path_origin_
Definition PathMapHeader.h:48
IMP::em::DensityHeader * get_density_header_writable()
Returns a pointer to the header of the map in a writable version.
Definition PathMapHeader.h:144
double get_simulation_grid_resolution()
Get the simulation grid resolution.
void set_path_origin(const IMP::algebra::Vector3D &v)
Sets the origin of the path.
void update_map_dimensions(int nx=-1, int ny=-1, int nz=-1)
IMP::algebra::Vector3D get_origin() const
Get origin on the PathMap (the corner of the grid)
void set_origin(float x, float y, float z)
Set origin on the PathMap (the corner of the grid)
IMP::algebra::Vector3D get_path_origin() const
Returns position of the labeling site.
Definition PathMapHeader.h:87
void set_obstacle_threshold(double obstacle_threshold)
Set the obstacle threshold.
double get_obstacle_threshold() const
Get the obstacle threshold.
Definition PathMapHeader.h:115
void set_neighbor_radius(double neighbor_radius)
Set the neighbor radius.
double get_neighbor_radius() const
Get the neighbor radius.
Definition PathMapHeader.h:129
double get_max_path_length()
Get the maximum linker/path length from origin.
Definition PathMapHeader.h:95
int get_neighbor_box_size() const
Get the size of the neighbor box.
~PathMapHeader()=default
Definition PathMap.h:44