IMP logo
IMP Reference Guide  2.6.1
The Integrative Modeling Platform
proteomics_em_alignment_atomic.h
Go to the documentation of this file.
1 /**
2  * \file IMP/multifit/proteomics_em_alignment_atomic.h
3  * \brief align proteomics graph to em density map
4  *
5  * Copyright 2007-2016 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 Object {
32  public:
34  multifit::SettingsData *asmb_data,
35  const AlignmentParams &align_param);
36  void align();
37 
38  //! Set up the restraints that will be used in the alignment.
39  /** These restraints are stored internally in a RestraintSet,
40  which can be obtained by calling get_restraint_set().
41  For example, this allows adding extra restraints to the set. */
42  void add_all_restraints();
43 
44  //! Get the restraints set up by add_all_restraints().
45  RestraintSet *get_restraint_set() { return restraint_set_; }
46 
47  void add_states_and_filters();
48  void show_domino_merge_tree() const;
49  domino::Assignments get_combinations(bool uniques = false) const;
50  void set_density_map(em::DensityMap *dmap, float threshold) {
51  dmap_ = dmap;
52  threshold_ = threshold;
53  }
54  atom::Hierarchies get_molecules() const { return mhs_; }
55  core::RigidBodies get_rigid_bodies() const { return rbs_; }
56  /* float load_configuration(int i) {
57  cg_->load_configuration(cg_sorted_[i].first);
58  return cg_sorted_[i].second;
59  }*/
60  //! load combination of states
61  //!The order of the states should be the order
62  void load_combination_of_states(const Ints &state4particles);
63  void show_scores_header(std::ostream &ous = std::cout) const;
64  /* void show_scores(const domino::Assignment &a,
65  std::ostream& out=std::cout) const;
66  */
67  Model *get_model() { return mdl_; }
68  //! If set to fast EV is calculated as penetration score and Fit
69  //! restraint is decomposed
70  void set_fast_scoring(bool state) { fast_scoring_ = state; }
71 
73 
74  protected:
75  RestraintsTemp get_alignment_restraints() const;
77  bool fast_scoring_;
78  domino::ParticleStatesTable *set_particle_states_table(
80  void load_atomic_molecules();
81  // void sort_configurations();
82  ProteinsAnchorsSamplingSpace mapping_data_;
85  double threshold_;
86  atom::Hierarchies mhs_;
87  core::RigidBodies rbs_;
88  Pointer<Model> mdl_;
89  AlignmentParams params_;
90  IntsLists sampled_solutions_; // instead of cg
91  domino::Assignments sampled_assignments_; // instead of sampled_solutions
92  // configurations sorted by score
93  std::vector<std::pair<int, float> > cg_sorted_;
94  Pointer<RestraintSet> conn_rs_;
95  Pointer<RestraintSet> conn_rs_with_filter_;
96  Pointer<RestraintSet> xlink_rs_;
97  Pointer<RestraintSet> xlink_rs_with_filter_;
98  Pointer<RestraintSet> dummy_rs_;
99  Pointer<RestraintSet> em_rs_;
100  Pointer<RestraintSet> ev_rs_;
101  RestraintsTemp jt_rs_;
102  // Pointer<RestraintSet> ev_pruned_rs_;
103  // Pointer<RestraintSet> rog_rs_;
104  // Pointer<RestraintSet> other_rs_;//the other restraints
105  // Pointer<RestraintSet> fit_rs_;//the other restraints
107  IntKey fit_state_key_, order_key_;
108  bool states_set_, filters_set_;
109  Pointer<RestraintSet> restraint_set_;
112  multifit::SettingsData *asmb_data_;
113  IntPairs post_sampling_ev_pairs_;
114  float ev_thr_;
115 };
117 
118 IMPMULTIFIT_END_NAMESPACE
119 
120 #endif /* IMPMULTIFIT_PROTEOMICS_EM_ALIGNMENT_ATOMIC_H */
handles reading of proteomics data
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
stores the anchors sampling space for each protein
handles reading matches between a protein and its anchors
Return the hierarchy leaves under a particle.
RestraintSet * get_restraint_set()
Get the restraints set up by add_all_restraints().
stored multifit settings data
Calculate weighted excluded volume between rigid bodies.
Align proteomics graph to EM density map.
Object used to hold a set of restraints.
Definition: RestraintSet.h:36
Class for handling density maps.
Class for handling density maps.
Definition: DensityMap.h:92
Common base class for heavy weight IMP objects.
Definition: Object.h:106
stored a multifit fitting solution
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:146
Holds header data for optimization.
Definition: SettingsData.h:135
Parameters for alignments.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Definition: object_macros.h:42
IMP::Vector< Int > Ints
Standard way to pass a bunch of Int values.
Definition: types.h:49
Sample best solutions using Domino.
handles reading of anchors data