IMP logo
IMP Reference Guide  2.10.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-2018 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"
20 #include <IMP/em/DensityMap.h>
21 #include <IMP/multifit/multifit_config.h>
22 #include <algorithm>
23 #include <boost/scoped_ptr.hpp>
24 
25 IMPMULTIFIT_BEGIN_NAMESPACE
26 
27 //! Align proteomics graph to EM density map
28 /** The alignment is from the em anchors to the proteomics graph
29  */
30 class IMPMULTIFITEXPORT ProteomicsEMAlignmentAtomic : public Object {
31  public:
33  multifit::SettingsData *asmb_data,
34  const AlignmentParams &align_param);
35  void align();
36 
37  //! Set up the restraints that will be used in the alignment.
38  /** These restraints are stored internally in a RestraintSet,
39  which can be obtained by calling get_restraint_set().
40  For example, this allows adding extra restraints to the set. */
41  void add_all_restraints();
42 
43  //! Get the restraints set up by add_all_restraints().
44  RestraintSet *get_restraint_set() { return restraint_set_; }
45 
46  void add_states_and_filters();
47  void show_domino_merge_tree() const;
48  domino::Assignments get_combinations(bool uniques = false) const;
49  void set_density_map(em::DensityMap *dmap, float threshold) {
50  dmap_ = dmap;
51  threshold_ = threshold;
52  }
53  atom::Hierarchies get_molecules() const { return mhs_; }
54  core::RigidBodies get_rigid_bodies() const { return rbs_; }
55  /* float load_configuration(int i) {
56  cg_->load_configuration(cg_sorted_[i].first);
57  return cg_sorted_[i].second;
58  }*/
59  //! load combination of states
60  //!The order of the states should be the order
61  void load_combination_of_states(const Ints &state4particles);
62  void show_scores_header(std::ostream &ous = std::cout) const;
63  /* void show_scores(const domino::Assignment &a,
64  std::ostream& out=std::cout) const;
65  */
66  Model *get_model() { return mdl_; }
67  //! If set to fast EV is calculated as penetration score and Fit
68  //! restraint is decomposed
69  void set_fast_scoring(bool state) { fast_scoring_ = state; }
70 
72 
73  protected:
74  RestraintsTemp get_alignment_restraints() const;
76  bool fast_scoring_;
77  domino::ParticleStatesTable *set_particle_states_table(
79  void load_atomic_molecules();
80  // void sort_configurations();
81  ProteinsAnchorsSamplingSpace mapping_data_;
84  double threshold_;
85  atom::Hierarchies mhs_;
86  core::RigidBodies rbs_;
87  Pointer<Model> mdl_;
88  AlignmentParams params_;
89  IntsLists sampled_solutions_; // instead of cg
90  domino::Assignments sampled_assignments_; // instead of sampled_solutions
91  // configurations sorted by score
92  std::vector<std::pair<int, float> > cg_sorted_;
93  Pointer<RestraintSet> conn_rs_;
94  Pointer<RestraintSet> conn_rs_with_filter_;
95  Pointer<RestraintSet> xlink_rs_;
96  Pointer<RestraintSet> xlink_rs_with_filter_;
97  Pointer<RestraintSet> dummy_rs_;
98  Pointer<RestraintSet> em_rs_;
99  Pointer<RestraintSet> ev_rs_;
100  RestraintsTemp jt_rs_;
101  // Pointer<RestraintSet> ev_pruned_rs_;
102  // Pointer<RestraintSet> rog_rs_;
103  // Pointer<RestraintSet> other_rs_;//the other restraints
104  // Pointer<RestraintSet> fit_rs_;//the other restraints
106  IntKey fit_state_key_, order_key_;
107  bool states_set_, filters_set_;
108  Pointer<RestraintSet> restraint_set_;
111  multifit::SettingsData *asmb_data_;
112  IntPairs post_sampling_ev_pairs_;
113  float ev_thr_;
114 };
116 
117 IMPMULTIFIT_END_NAMESPACE
118 
119 #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
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:93
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 lists of object pointers.
Definition: object_macros.h:44
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