Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InterfaceAnalyzerMover.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file /protocols/moves/InterfaceAnalyzerMover.hh
11 /// @brief InterfaceAnalyzerMover examines interface structures and packages extra scores into a Job object
12 /// @author Steven Lewis, Bryan Der, Ben Stranges
13 
14 #ifndef INCLUDED_protocols_analysis_InterfaceAnalyzerMover_HH
15 #define INCLUDED_protocols_analysis_InterfaceAnalyzerMover_HH
16 
17 // Unit Headers
19 
20 // Project Headers
21 #include <core/pose/Pose.fwd.hh>
22 #include <core/scoring/ScoreFunction.hh> //This non-obviously needs to be the full header because the constructors have NULL default values for their ScoreFunctionCOP arguments. If you try to use the default ctor with no arguments, it looks like you don't need ScoreFunction.hh, but gcc insists on it anyway. Putting it here is the cleanest and most documentable solution.
23 #include <protocols/moves/Mover.hh>
25 
26 // Utility Headers
27 // AUTO-REMOVED #include <core/init.hh>
28 #include <core/types.hh>
29 // AUTO-REMOVED #include <core/id/AtomID.hh>
30 #include <utility/vector1.hh>
31 #include <utility/file/FileName.hh>
32 #include <set>
33 
34 #include <core/id/AtomID.fwd.hh>
35 
36 
37 
38 namespace protocols {
39 namespace analysis {
40 
42 
43 public:
44  //stole these directly from InterGroupNeighborsCalculator
45  typedef std::set< core::Size > one_group;
46  typedef std::pair< one_group, one_group > group_pair;
48 
49  //constructor for 2 chain poses, separates them by jump number
51  core::Size interface_jump = 1,
52  bool const tracer = false,
54  bool compute_packstat = false,
55  bool pack_input = false,
56  bool pack_separated = false,
57  bool use_jobname = true
58  );
59  //constructor for poses with > 1 jump, keeps defined chains together
61  std::set<int> fixed_chains,
62  bool const tracer = false,
64  bool compute_packstat = false,
65  bool pack_input = false,
66  bool pack_separated = false,
67  bool use_jobname = true
68  );
69 
70  virtual ~InterfaceAnalyzerMover();
71 
72  virtual protocols::moves::MoverOP clone() const;
74  /// @brief Called by MoverFactory when constructing new Movers. Takes care of the specific mover's parsing.
75  virtual
76  void parse_my_tag(
81  core::pose::Pose const & );
82 
83  ///@brief apply function will calculate data about the input pose. It is not intended to modify the pose itself (conformation and energies objects) although it may toss data into the DataCache or a Job object.
84  virtual void apply( core::pose::Pose & pose );
85  virtual std::string get_name() const;
86 
87  void set_pose_info( core::pose::Pose const & pose );
88  /* Undefined, commenting out to fix PyRosetta build void set_scorefunction( core::scoring::ScoreFunctionCOP sf ); */
89  void use_tracer( bool const tracer ) { tracer_ = tracer; }
90 
91  ///@brief funtions to make interface sets needed
93  std::set<int> & fixed_chains );
94  virtual void make_interface_set( core::pose::Pose & pose );
95 
96  ///@brief assigns the complexed and separated poses for the entire mover
98 
99  ///@brief reorder the fold tree to allow multichain interfaces to be evaluated
100  /// returns the jump number to use to define the interface
102  std::set<int> & fixed_chains);
103 
104  //functions to compute various parameters used by the analyzer
105  //these should be private...
106  virtual void compute_separated_sasa(core::pose::Pose & complexed_pose,
107  core::pose::Pose & separated_pose);
108  virtual void compute_interface_energy(core::pose::Pose & complexed_pose,
109  core::pose::Pose & separated_pose);
110  virtual void compute_interface_packstat( core::pose::Pose & pose );
111  virtual void compute_interface_delta_hbond_unsat(core::pose::Pose & complexed_pose,
112  core::pose::Pose & separated_pose );
113  virtual void score_separated_chains(core::pose::Pose & complexed_pose,
114  core::pose::Pose & separated_pose);
115  virtual void report_data();
116  ///@brief setters for the various parameters used by the analyze
117 
118  void set_use_resfile(bool const use_resfile);
119  bool get_use_resfile() const;
120 
121  void set_use_centroid_dG(bool const use_centroid);
122  bool get_use_centroid_dG() const;
123 
124  ///setters for various computations - each of these are expensive, so you can turn them off if desired
125  void set_compute_packstat(bool const compute_packstat);
128  void set_compute_interface_energy(bool const iface_en) {compute_interface_energy_ = iface_en;}
131 
132  void set_pack_input(bool const pack_input);
133  void set_pack_separated(bool const pack_separated);
134 
135  void set_interface_jump(core::Size const interface_jump);
136 
137  void set_skip_reporting(bool const skip_reporting) {skip_reporting_ = skip_reporting;}
138  void set_tracer(bool const tracer);
139  void set_use_jobname(bool const use_jobname);
140 
141  //void set_calcs_ready(bool const calcs_ready); //why is this externally accessible?
142 
143  ///@brief getters for the various parameters used by the analyzer
164  std::set<int> get_fixed_chains();
165  std::set<core::Size> get_interface_set();
167  bool get_pack_input();
169  ///@brief return the interface energy of an all glycine interface (like bb-bb energies)
171  ///@brief
173 
174  ///@brief
175  // Undefined, commenting out to fix PyRosetta build core::Real get_interface_Hbond_sasa();
176 
177  ///@brief the exposure/possible ratio avg for hbonds in the interface
178  //core::Real get_Hbond_exposure_ratio();
179  ///@brief total hbond energy for pose
181 private:
182  ///@brief registers the posemetric calculators
183  void register_calculators();
185  ///@brief sets up the packer task within the mover
186  void setup_task(core::pose::Pose & pose);
187  void print_pymol_selection_of_interface_residues( core::pose::Pose const & pose, std::set< core::Size > const interface_set );
189  void print_pymol_selection_of_packing( core::pose::Pose const & pose, utility::vector1< core::Real > interface_pack_scores );
190  ///@brief calculate the average energy per residue in the interface
192  ///@brief mutate all residue in the interface to Gly and recalc the energy - not used right now
193  void mut_to_gly( core::pose::Pose complex_pose, core::pose::Pose separated_pose );
194  ///@brief report the dG of a centroid pose with score3
195  void calc_centroid_dG ( core::pose::Pose complex_pose, core::pose::Pose separated_pose );
196  ///@brief fill in later
197  void calc_hbond_sasaE( core::pose::Pose pose );
198  ///@brief find the interface shape compementarity value between the chains
199  void compute_interface_sc( core::Size & interface_jump, core::pose::Pose const & complexed_pose);
200 private:
201  ///@brief jump to define which interface is interesting
203  //@brief what chains are fixed in an interface
204  std::set<int> fixed_chains_;
205  ///@brief scorefunction
207 
210 
215  std::set<core::Size> upstream_chains_;
216  std::set<core::Size> downstream_chains_;
217 
218  ///@brief output to tracer or PDB/silent file
219  bool tracer_;
220  ///@brief are calculators ready?
222 
223  ///@brief bother with computing packstat
225  ///@brief bother with computing interface sc
227 
228  ///@brief skip this expensive calculation
230  ///@brief skip this expensive calculation
232  ///@brief skip this expensive calculation
234  ///@brief skip this expensive calculation
236 
237  ///@brief hush! be quiet! silence!
239 
240  //bool is_compute_hbond_unsat_;
241  ///@brief which constructor are we using
243  ///@brief pack the input pose
245  ///@brief pack the separated poses default is false
247  ///@brief just the jobname (true value) or the pose name (flase value)
249  ///@brief use a resfile during the pack_input and pack_separated operations
251  ///@brief skip the centroid_dG step, for incoming poses not centroid convertible
253 
254  ///@brief interface energy
260  //number of interface residues
262  //energy of the unseparated complex (just the score)
270  ///@brief Energy of a all Gly interface
272  ///@brief centroid_dG of interface
274  ///@brief number of unsat hbonds in complex
276  ///@brief pymol style selections
280 
286 
287  ///@brief avg hbond exposure ratio
288  //core::Real hbond_exposure_ratio_;
289  //core::Real total_hb_sasa_;
290  ///@brief total energy of interface Hbonds
292 
293  ///@breif shape complementarity values
295 
296  ///@brief set of residues at the interface in question
297  std::set< core::Size > interface_set_;
298  ///@brief group of residue ids of fixed chains and mobile chains (see typedef)
300  ///@brief packer task used to repack pulled apart chains
302  //name strings for PoseMetricCalculators
303  ///@brief Sasa calculator name string
305  ///@brief InterfaceNeighborDefinition calculator name string
307  ///@brief InterfaceSasaDefinition calculator name string
309  ///@brief InterfaceDeltaEnergetics calculator name string
311  ///@brief NumberHBonds calculator name string
313  ///@brief BuriedUnsatisfiedPolars calculator name string
315 ///@brief InterGroupNeighborsCalculator calculator name string
317 }; //class InterfaceAnalyzerMover
318 
319 }//analysis
320 }//protocols
321 
322 #endif //INCLUDED_protocols_analysis_InterfaceAnalyzerMover_HH