IMP  2.1.0
The Integrative Modeling Platform
proteomics_em_alignment_atomic.h
Go to the documentation of this file.
1 /**
2  * \file multifit/proteomics_em_alignment_atomic.h
3  * \brief align proteomics graph to em density map
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPMULTIFIT_PROTEOMICS_EM_ALIGNMENT_ATOMIC_H
10 #define IMPMULTIFIT_PROTEOMICS_EM_ALIGNMENT_ATOMIC_H
11 
15 #include "AlignmentParams.h"
16 #include <IMP/core/LeavesRefiner.h>
21 #include <IMP/em/DensityMap.h>
22 #include <IMP/multifit/multifit_config.h>
23 #include <algorithm>
24 #include <boost/scoped_ptr.hpp>
25 
26 IMPMULTIFIT_BEGIN_NAMESPACE
27 
28 //! Align proteomics graph to EM density map
29 /** The alignment is from the em anchors to the proteomics graph
30  */
31 class IMPMULTIFITEXPORT ProteomicsEMAlignmentAtomic : public base::Object {
32 public:
34  const ProteinsAnchorsSamplingSpace &mapping_data,
35  multifit::SettingsData *asmb_data,
36  const AlignmentParams &align_param);
37  void align();
38  void add_all_restraints();
39  void add_states_and_filters();
40  void show_domino_merge_tree() const;
41  domino::Assignments get_combinations(bool uniques=false) const;
42  void set_density_map(em::DensityMap *dmap,float threshold) {
43  dmap_=dmap;threshold_=threshold;
44  }
45  atom::Hierarchies get_molecules() const {return mhs_;}
46  core::RigidBodies get_rigid_bodies() const {return rbs_;}
47  /* float load_configuration(int i) {
48  cg_->load_configuration(cg_sorted_[i].first);
49  return cg_sorted_[i].second;
50  }*/
51  //! load combination of states
52  //!The order of the states should be the order
53  void load_combination_of_states(const Ints &state4particles);
54  void show_scores_header(std::ostream& ous=std::cout) const;
55  /* void show_scores(const domino::Assignment &a,
56  std::ostream& out=std::cout) const;
57  */
58  kernel::Model * get_model() {return mdl_;}
59  //! If set to fast EV is calculated as penetration score and Fit
60  //! restraint is decomposed
61  void set_fast_scoring(bool state) {
62  fast_scoring_=state;
63  }
64 
66 
67 protected:
68  kernel::RestraintsTemp get_alignment_restraints() const;
70  bool fast_scoring_;
72  set_particle_states_table(domino::SubsetFilterTables &filters);
73  void load_atomic_molecules();
74  // void sort_configurations();
75  ProteinsAnchorsSamplingSpace mapping_data_;
78  double threshold_;
79  atom::Hierarchies mhs_;
80  core::RigidBodies rbs_;
82  AlignmentParams params_;
83  IntsLists sampled_solutions_;//instead of cg
84  domino::Assignments sampled_assignments_;//instead of sampled_solutions
85  //configurations sorted by score
86  std::vector<std::pair<int,float> >cg_sorted_;
88  base::Pointer<kernel::RestraintSet> conn_rs_with_filter_;
90  base::Pointer<kernel::RestraintSet> xlink_rs_with_filter_;
95  // base::Pointer<kernel::RestraintSet> ev_pruned_rs_;
96  // base::Pointer<kernel::RestraintSet> rog_rs_;
97  //Pointer<kernel::RestraintSet> other_rs_;//the other restraints
98  //Pointer<kernel::RestraintSet> fit_rs_;//the other restraints
100  IntKey fit_state_key_,order_key_;
101  bool restraints_set_,states_set_,filters_set_;
104  multifit::SettingsData *asmb_data_;
105  IntPairs post_sampling_ev_pairs_;
106  float ev_thr_;
107 };
109 
110 IMPMULTIFIT_END_NAMESPACE
111 
112 #endif /* IMPMULTIFIT_PROTEOMICS_EM_ALIGNMENT_ATOMIC_H */
A base class for Keys.
Definition: kernel/Key.h:46
handles reading of proteomics data
A smart pointer to a ref-counted Object that is a class memeber.
Definition: base/Pointer.h:146
stores the anchors sampling space for each protein
handles reading matches between a protein and its anchors
Return the hierarchy children of a particle.
stored multifit settings data
Calculate weighted excluded volume between rigid bodies.
Align proteomics graph to EM density map.
Class for handling density maps.
Class for handling density maps.
Definition: DensityMap.h:98
stored a multifit fitting solution
Holds header data for optimization.
Definition: SettingsData.h:132
Parameters for alignments.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Common base class for heavy weight IMP objects.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
A beyesian infererence-based sampler.
handles reading of anchors data
Class for storing model, its restraints, constraints, and particles.