9 #ifndef IMPMULTIFIT_FFT_BASED_RIGID_FITTING_H
10 #define IMPMULTIFIT_FFT_BASED_RIGID_FITTING_H
13 #include <IMP/multifit/multifit_config.h>
16 #include <IMP/multifit/internal/FFTWGrid.h>
18 #include <IMP/multifit/internal/FFTWPlan.h>
22 #include <IMP/multifit/internal/fft_fitting_utils.h>
23 #include <boost/scoped_array.hpp>
25 IMPMULTIFIT_BEGIN_NAMESPACE
53 unsigned int nx_, ny_, nz_;
55 unsigned int nx_half_, ny_half_, nz_half_;
57 double origx_, origy_, origz_;
58 internal::FFTWGrid<double> low_map_data_;
61 internal::FFTWGrid<double> sampled_map_data_, fftw_r_grid_mol_;
63 internal::FFTWGrid<double> reversed_fftw_data_;
64 boost::scoped_array<double> kernel_filter_;
65 unsigned int kernel_filter_ext_;
66 boost::scoped_array<double> gauss_kernel_;
67 unsigned int gauss_kernel_ext_;
68 unsigned long gauss_kernel_nvox_;
69 boost::scoped_array<double> filtered_kernel_;
72 unsigned filtered_kernel_ext_;
74 double sampled_norm_, asmb_norm_;
77 unsigned long fftw_nvox_r2c_;
78 unsigned long fftw_nvox_c2r_;
79 internal::FFTWGrid<fftw_complex> fftw_grid_lo_, fftw_grid_hi_;
80 internal::FFTWPlan fftw_plan_forward_lo_, fftw_plan_forward_hi_;
81 internal::FFTWPlan fftw_plan_reverse_hi_;
90 int num_angle_per_voxel_;
91 int num_fits_reported_;
96 double fftw_pad_factor_;
97 unsigned int fftw_zero_padding_extent_[3];
98 unsigned margin_ignored_in_conv_[3];
100 internal::RotScoresVec fits_hash_;
102 internal::FFTScores fft_scores_;
103 unsigned int inside_num_;
104 unsigned int inside_num_flipped_;
105 internal::FFTScores fft_scores_flipped_;
107 multifit::internal::EulerAnglesList rots_;
111 void prepare_kernels();
113 void get_unwrapped_index(
int wx,
int wy,
int wz,
int &ix,
int &iy,
int &iz);
116 void pad_resolution_map();
119 void fftw_translational_search(
const multifit::internal::EulerAngles &rot,
123 const internal::RotScoresVec &rot_scores,
bool cluster_fits,
124 double max_translation,
double max_clustering_trans,
125 double max_clustering_rotation);
128 FFTFitting() : base::Object(
"FFTFitting%1%") {}
148 double angle_sampling_interval_rad,
int num_fits_to_report,
149 double max_clustering_translation,
double max_clustering_angle,
150 bool cluster_fits =
true,
int num_angle_per_voxel = 1,
151 const std::string &angles_filename =
"");
175 double angle_sampling_interval_rad,
double max_angle_sampling_rad,
176 double max_translation,
int num_fits_to_report,
bool cluster_fits,
177 int num_angle_per_voxel,
double max_clustering_translation,
178 double max_clustering_rotation,
const std::string &angles_filename =
"");
191 double angle_sampling_interval_rad);
193 IMPMULTIFIT_END_NAMESPACE
Import IMP/kernel/base_types.h in the namespace.
Calculates and stores gaussian kernel parameters.
Fit a molecule inside its density by local or global FFT.
Class for handling density maps.
Decorator for helping deal with a hierarchy of molecules.
Class for handling density maps.
The standard decorator for manipulating molecular structures.
stored a multifit fitting solution
Storage of the results from an FFT fit.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Common base class for heavy weight IMP objects.
multifit::FittingSolutionRecords fft_based_rigid_fitting(atom::Hierarchy mol2fit, em::DensityMap *dmap, double density_threshold, double angle_sampling_interval_rad)
FFT fit of a molecule in the density.
A decorator for a rigid body.