8 #ifndef IMPEM_RIGID_FITTING_H
9 #define IMPEM_RIGID_FITTING_H
20 #include <IMP/em/em_config.h>
36 typedef std::pair<algebra::Transformation3D,Float> FittingSolution;
39 bool operator()(
const FittingSolution &s1,
const FittingSolution & s2)
const
41 return s1.second < s2.second;
55 i<<
") in get_transformation is our of range ("<<
56 fs_.size()<<
")"<<std::endl);
66 i<<
") in get_transformation is out of range ("<<
67 fs_.size()<<
")"<<std::endl);
70 void set_score(
unsigned int i,
Float score) {
72 i<<
") in get_transformation is out of range ("<<
73 fs_.size()<<
")"<<std::endl);
79 void sort(
bool reverse=
false);
83 for(
unsigned int i=0;i<fs_.size();i++) fs_[i].first=fs_[i].first*t;
87 for(
unsigned int i=0;i<fs_.size();i++) all_ts.push_back(fs_[i].first);
90 void show(std::ostream& out=std::cout)
const {
91 for(std::vector<FittingSolution>::const_iterator it = fs_.begin();
92 it != fs_.end(); it++) {
93 out<<
"("<<it->first<<
" , "<<it->second<<
")"<<std::endl;
97 std::vector<FittingSolution> fs_;
134 Int number_of_optimization_runs = 5,
Int number_of_mc_steps = 10,
135 Int number_of_cg_steps=100,
136 Float max_translation=2.,
Float max_rotation=.3,
bool fast=
false);
172 Int number_of_optimization_runs = 5,
Int number_of_mc_steps = 10,
173 Int number_of_cg_steps=100,
174 Float max_translation=2.,
Float max_rotation=.3,
181 p, refiner,weight_key, dmap,
183 number_of_optimization_runs, number_of_mc_steps,
184 number_of_cg_steps, max_translation, max_rotation,fast);
213 Int number_of_optimization_runs = 5,
Int number_of_mc_steps = 10,
214 Int number_of_cg_steps=100,
215 Float max_translation=2.,
Float max_rotation=.3);
239 const ParticlesTemp &ps,
242 Int max_voxels_translation=2,
243 Int translation_step=1,
244 Float max_angle_in_radians = 0.174,
245 Int number_of_rotations = 100);
270 bool fast_version=
false,
bool local_score=
false,
271 const FloatKey &wei_key=atom::Mass::get_mass_key());
289 transformations,
true);
304 FloatKey wei_key=atom::Mass::get_mass_key());