Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ResiduesInInterfaceFilter.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/simple_filters/ResiduesInInterfaceFilter.cc
11 /// @brief
12 /// @author Sarel Fleishman (sarelf@u.washington.edu), Jacob Corn (jecorn@u.washington.edu)
13 
16 
17 #include <core/types.hh>
18 #include <core/pose/Pose.hh>
19 #include <core/pose/PDBInfo.hh>
20 #include <basic/Tracer.hh>
27 #include <core/scoring/Energies.hh>
34 #include <utility/tag/Tag.hh>
35 //#include <protocols/moves/ResidueMover.hh>
37 #include <basic/MetricValue.hh>
38 #include <numeric/random/random.hh>
39 // AUTO-REMOVED #include <boost/foreach.hpp>
40 #define foreach BOOST_FOREACH
42 
46 // AUTO-REMOVED #include <core/conformation/symmetry/util.hh>
47 
49 
50 //Objectxxxx header
51 #include <ObjexxFCL/FArray1D.hh>
52 #include <ObjexxFCL/FArray1D.fwd.hh>
53 
54 // Utility Headers
55 
56 // Unit Headers
58 //#include <protocols/protein_interface_design/design_utils.hh>
59 
60 // C++ headers
61 #include <map>
62 
65 #include <utility/vector0.hh>
66 #include <utility/vector1.hh>
67 #include <ObjexxFCL/format.hh>
68 
69 
70 
71 namespace protocols {
72 namespace simple_filters {
73 
74 static basic::Tracer residues_in_interface_tracer( "protocols.simple_filters.ResiduesInInterfaceFilter" );
75 
78 
80 ResiduesInInterfaceFilterCreator::keyname() const { return "ResInInterface"; }
81 
83 
84 /// @detailed a utility for docking_filter
86 {
87  Size interface_counter( 0 );
88 
89  runtime_assert( rb_jump_ <= pose.num_jump() );
90 
91  core::pose::Pose temp_pose( pose );
94  (*scorefxn)(temp_pose);
95 
97  interface.calculate( temp_pose );
98 
99  for (Size i = 1; i <= temp_pose.total_residue(); i++) {
100  if ( !temp_pose.residue(i).is_protein() ) continue;
101  if( interface.is_interface( i ) ) interface_counter++;
102  }
103  return( interface_counter );
104 }
105 
106 void
108 {
109  residues_in_interface_threshold_ = tag->getOption<core::Size>( "residues", 20 );
110  rb_jump_ = tag->getOption<core::Size>( "jump_number", 1 );
111 
112  residues_in_interface_tracer<<"residues in interface filter over jump number " << rb_jump_ << " with threshold "<<residues_in_interface_threshold_<<std::endl;
113 }
114 
115 bool
117  core::Size const interface_res( compute( pose ));
118  residues_in_interface_tracer<<"There are "<<interface_res<<" residues in the interface.";
119  if( interface_res <= residues_in_interface_threshold_ )
120  {
121  residues_in_interface_tracer<<" Breaking out."<<std::endl;
122  return( false );
123  }
124  else residues_in_interface_tracer<<std::endl;
125  return( true );
126 }
127 
128 void
129 ResiduesInInterfaceFilter::report( std::ostream & out, core::pose::Pose const & pose ) const {
130  core::Size const interface_res( compute( pose ));
131  out<<"residues_in_interface "<<interface_res<<'\n';
132 }
133 
136  core::Size const interface_res( compute( pose ));
137  return( (core::Real) interface_res );
138 }
139 
140 }
141 }