Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VIP_Report.cc
Go to the documentation of this file.
1 // (c) Copyright Rosetta Commons Member Institutions.
2 // (c) This file is part of the Rosetta software suite and is made available under license.
3 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
4 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
5 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
6 
7 /// @file protocols/vip/VIP_Report.cc
8 /// @brief Prints information about changes implemented in vip mover
9 
12 
13 #include <basic/options/option.hh>
14 #include <basic/options/keys/cp.OptionKeys.gen.hh>
15 
16 #include <core/scoring/Energies.hh>
20 
22 
23 #include <fstream>
24 
25 namespace protocols {
26 namespace vip {
27 
30 
31 void
33  core::pose::Pose & goe_native,
34  utility::vector1<core::Real> & goe_repack_e,
36  utility::vector1<core::Size> & goe_repack_pos
37 ){
38  using namespace basic::options;
39  using namespace basic::options::OptionKeys;
40  std::ofstream output;
41  std::string fname = option[cp::vipReportFile];
42  output.open( fname.c_str(), std::ios::out | std::ios::app );
43 
44  output << " GOE point mutant report: " << std::endl;
45 
48  score_em->apply( goe_native );
49 
50  for( core::Size i = 1; i <= goe_repack_e.size(); i++ ){
51  if( goe_repack_e[i] < goe_native.energies().total_energy() ){
52  if( goe_repack_res[i]->name() != goe_native.residue(goe_repack_pos[i]).name() ){
53  output << "Position: " << goe_repack_pos[i] << " Native AA: " << goe_native.residue(goe_repack_pos[i]).name() << " Mutant AA: " << goe_repack_res[i]->name() << " ddEgoe: " << goe_native.energies().total_energy() - goe_repack_e[i] << std::endl;}}}
54 output.close();
55 }
56 
57 
58 void
60  core::pose::Pose & goe_native,
61  utility::vector1<core::Real> & goe_relax_e,
63  utility::vector1<core::Size> & goe_relax_pos
64  ){
65  using namespace basic::options;
66  using namespace basic::options::OptionKeys;
67  std::fstream output;
68  std::string fname = option[cp::vipReportFile];
69  output.open( fname.c_str(), std::ios::out | std::ios::app );
70 
71  output << " GOE after relax report: " << std::endl;
72 
75  score_em->apply( goe_native );
76 
77  for( core::Size i = 1; i <= goe_relax_e.size(); i++ ){
78  if( goe_relax_e[i] < goe_native.energies().total_energy() ){
79  if( goe_relax_res[i]->name() != goe_native.residue(goe_relax_pos[i]).name() ){
80  output << "Position: " << goe_relax_pos[i] << " Native AA: " << goe_native.residue(goe_relax_pos[i]).name() << " Mutant AA: " << goe_relax_res[i]->name() << " ddEgoe: " << goe_native.energies().total_energy() - goe_relax_e[i] << std::endl;}}}
81  output.close();
82 }
83 
84 void
86  core::pose::Pose & goe_native,
88  ){
89  std::fstream output;
90  using namespace core::scoring::packstat;
92  std::string filename0 = "Intermediate";
93 
94  output << " GOE packstat report: " << std::endl;
95 
96  for( core::Size i = 1; i <= goe_relax.size(); i++ ){
97  for( core::Size j = 1; j <= goe_relax[i].total_residue(); j++ ){
98  if( goe_relax[i].residue(j).name() != goe_native.residue(j).name() ){
99 // filename = filename0 + ".designed" + utility::to_string<int>(i) + ".pdb";
100 // goe_relax[i].dump_pdb( filename );
101 
102  output << " Position: " << j << " Native AA: " << goe_native.residue(j).name() << " Mutant AA: " << goe_relax[i].residue(j).name() << " Packing Score: " << output_packstat(goe_relax[i]) << std::endl;
103 }}}
104 }
105 
106 }}