Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InterfaceHolesFilter.cc
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/protein_interface_design/filters/InterfaceHolesFilter.cc
11 /// @brief Find packing defects at an interface using packstat score terms
12 /// @author Jacob Corn (jecorn@u.washington.edu)
16 // Project Headers
17 #include <core/types.hh>
18 #include <core/pose/Pose.hh>
22 #include <utility/tag/Tag.hh>
23 #include <protocols/moves/Mover.fwd.hh> //Movers_map
24 #include <core/scoring/Energies.hh>
25 
26 #include <basic/Tracer.hh>
27 #include <utility/vector0.hh>
28 #include <utility/vector1.hh>
29 
30 
31 namespace protocols {
32 namespace protein_interface_design {
33 namespace filters {
34 
35 
36 static basic::Tracer TR( "protocols.protein_interface_design.filters.InterfaceHolesFilter" );
39 {
40  using namespace core;
41  using namespace core::scoring;
42  pose::Pose copy_pose = pose;
43  ScoreFunctionOP sfxn = new ScoreFunction;
44  sfxn->set_weight( holes_decoy, 1.0 );
45  core::Real const weight( (*sfxn)[ ScoreType( holes_decoy ) ] );
47  iface.calculate( copy_pose );
48 
49  (*sfxn)( copy_pose );
50  Real const bound_holes( copy_pose.energies().total_energies()[ ScoreType( holes_decoy ) ]);
51  TR.Debug << "Bound holes: " << bound_holes << std::endl;
52 
54  translate->step_size( 1000.0 );
55  translate->apply( copy_pose );
56  (*sfxn)( copy_pose );
57  Real const unbound_holes( copy_pose.energies().total_energies()[ ScoreType( holes_decoy ) ]);
58  TR.Debug << "Unbound holes: " << unbound_holes << std::endl;
59 
60  Real delta_holes = (bound_holes - unbound_holes) * weight; // more negative as bound state gets better
61 
62  // Normalize for number of heavy atoms in the pose. Otherwise larger interfaces will always be larger
63  //Brings this in line with scores reported by Will's holes app.
64  // 8-19-09: this now appears to be done internally by the scoretype. No need to do it myself
65  //core::Size nheavyatoms=0;
66  //for( core::Size i=1; i<= copy_pose.total_residue(); ++i ) {
67  // nheavyatoms += copy_pose.residue(i).nheavyatoms();
68 // }
69  //delta_holes /= nheavyatoms;
70  return delta_holes;
71 }
72 
74 
75 bool
77  core::Real const iface_holes( compute( pose ));
78  TR << "delta holes score: " << iface_holes ;
79  if( iface_holes <= threshold_ )
80  {
81  TR<<" passing."<<std::endl;
82  return( true );
83  }
84  else TR<<" failing." << std::endl;
85  return( false );
86 }
87 
88 void
89 InterfaceHolesFilter::report( std::ostream & out, core::pose::Pose const & pose ) const {
90  core::Real const iface_holes( compute( pose ));
91  out<<"InterfaceHoles score across jump # "<< rb_jump_ << ": " << iface_holes<<'\n';
92 }
93 
96  core::Real const iface_holes( compute( pose ));
97  return( (core::Real) iface_holes );
98 }
99 
100 void
102 {
103  threshold_ = tag->getOption<core::Size>( "threshold", 200 );
104  rb_jump_ = tag->getOption<core::Size>( "jump", 1 );
105 
106  TR<<"Using jump number " << rb_jump_ << " with threshold "<< threshold_ <<std::endl;
107 }
108 
111 
113 InterfaceHolesFilterCreator::keyname() const { return "InterfaceHoles"; }
114 
115 
116 } // filters
117 } // protein_interface_design
118 } // devel
119 
120