Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PointMutScanDriver.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 // This file is part of the Rosetta software suite and is made available under license.
5 // The Rosetta software is developed by the contributing members of the Rosetta Commons consortium.
6 // (C) 199x-2009 Rosetta Commons participating institutions and developers.
7 // For more information, see http://www.rosettacommons.org/.
8 
9 /// @file protocols/pmut_scan/PointMutScanDriver.hh
10 /// @brief A protocol that tries to find stability enhancing mutations
11 /// @author Ron Jacak (ron.jacak@gmail.com)
12 
13 #ifndef INCLUDED_protocols_pmut_scan_PointMutScanDriver_HH
14 #define INCLUDED_protocols_pmut_scan_PointMutScanDriver_HH
15 
16 // MPI Headers have to be #included first
17 #ifdef USEMPI
18 #include <mpi.h>
19 #endif
20 
21 // Project Headers
23 
24 #include <core/types.hh>
25 #include <core/pose/Pose.fwd.hh>
27 
28 // Utility headers
29 #include <utility/vector1.hh>
30 
31 // ObjexxFCL header
32 
33 // C++
34 #include <string>
35 
36 namespace protocols {
37 namespace pmut_scan {
38 
40 
41 public:
42  PointMutScanDriver( utility::vector1< std::string > & pdb_file_names, bool double_mutant_scan, std::string list_file, bool output_mutant_structures );
44 
45  //This protocol is its own Job Distributor - this fires it off from application-level
46  void go();
47 
48  //mutant-scanning related functions
49 
50  void read_in_structures();
51  void fill_mutations_list();
52 
54 
55  void make_specific_mutant( utility::vector1< core::pose::Pose > & mutant_poses, utility::vector1< core::pose::Pose > & native_poses, protocols::pmut_scan::Mutant & m, std::string mutation_string = "", std::string mutation_string_PDB_numbering = "" );
56 
57  ///@brief score the pose for the purposes of determining if a mutation is "good" or not. In the base implementation, it's just a scorefunction call, but in child implementations it may be fancier (for example, calculating a binding energy instead)
58  virtual core::Energy score(core::pose::Pose & pose);
59 
60  ///@brief accessor for scorefxn_ now that it is private member data
61  core::scoring::ScoreFunctionCOP get_scorefxn() const;// { return scorefxn_; }
62 
63  ///@brief offers a chance for child classes to inject mutant selection logic
64  virtual bool reject_mutant( Mutant const & /*m*/, core::pose::Pose const & /*pose*/ ) { return false; }
65 
66  //unit test utilities
67  void set_ddG_cutoff( core::Real threshold );
68 
69  utility::vector1< Mutant >::const_iterator mutants_begin() const; // used only by unit tests
70  utility::vector1< Mutant >::const_iterator mutants_end() const; // used only by unit tests
71 
72  core::Size n_mutants() const; // used only by unit tests
73 
74 private:
75 
76  void make_mutants();
77 
78  void make_mutant_structure( core::pose::Pose & mutant_pose, core::pose::Pose & native_pose, protocols::pmut_scan::MutationData const & md );
79 
80 private: //mutant scanning data
84 
86 
89 
91 
93 
95 
96 private: //Job Distribution related functions
97  void barrier();
99 
100  void read_mutants_list_file( std::string & list_file );
101  void divide_up_mutations();
102 
103 #ifdef USEMPI
104  static void send_mutant_data_to_node( int destination, protocols::pmut_scan::Mutant const & m );
105  static protocols::pmut_scan::Mutant receive_mutant_data_from_node( int source );
106 #endif
107 
108 private: //Job Distribution related data
109 
110 #ifdef USEMPI
111  MPI_Status stat_;
112  int tag_;
113 #endif
114 
117 
118 }; // class PointMutScanDriver
119 
120 } // namespace pmut_scan
121 } // namespace protocols
122 
123 #endif //INCLUDED_protocols_pmut_scan_PointMutScanDriver_HH