Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StubScoreFilter.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 sw=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 /// @author Sarel Fleishman (sarelf@uw.edu)
13 #define foreach BOOST_FOREACH
14 #include <core/pose/Pose.hh>
17 #include <utility/tag/Tag.hh>
19 #include <protocols/moves/Mover.hh>
21 #include <basic/Tracer.hh>
22 #include <core/types.hh>
23 #include <core/chemical/AA.hh>
24 #include <numeric/xyzVector.hh>
25 
26 
27 
32 
33 #include <core/kinematics/Jump.hh>
35 #include <utility/vector0.hh>
36 #include <utility/vector1.hh>
37 
38 //Auto Headers
40 
41 
42 
43 namespace protocols {
44 namespace protein_interface_design{
45 namespace filters {
46 
47 static basic::Tracer TR( "protocols.protein_interface_design.filters.StubScoreFilter" );
48 
49 ///@brief default ctor
51  parent( "StubScore" ),
52  host_chain_( 2 ),
53  cb_force_( 0.5 )
54 {}
55 
56 bool
58 {
59  core::Real const stub_score( compute( pose ) );
60  if( stub_score >= -0.0001 ){
61  TR<<"bb_cst evalutes to 0. Failing"<<std::endl;
62  return false;
63  }
64  return true;
65 }
66 
68 StubScoreFilter::compute( core::pose::Pose const & in_pose ) const{
69  if( !stub_sets_.size() ){
70  TR.Error<<"Stubsets not set in StubScoreFilter. Have I been parsed correctly?"<<std::endl;
71  runtime_assert( stub_sets_.size() );
72  }
74  core::pose::Pose pose( in_pose );
75  (*stub_scorefxn)(pose);//for constraints to be active
78  dummy_min.stub_sets( stub_sets_ );
79  dummy_min.host_chain( host_chain_ );
80  dummy_min.cb_force( cb_force_ );
81  dummy_min.refresh_bbstub_constraints( pose );
82 
84  core::Real const stub_score( stf.compute( pose ) );
85  return( stub_score );
86 }
87 
90 {
91  return( compute( pose ) );
92 }
93 
94 void
95 StubScoreFilter::report( std::ostream & out, core::pose::Pose const & pose ) const
96 {
97  out<<"StubScoreFilter returns "<<compute( pose )<<std::endl;
98 }
99 
100 void
101 StubScoreFilter::stub_sets( utility::vector1< std::pair< protocols::hotspot_hashing::HotspotStubSetOP, std::pair< protocols::hotspot_hashing::HotspotStubOP, core::Size > > > const & stubsets ){
102  stub_sets_ = stubsets;
103 }
104 
105 void
110  core::pose::Pose const & pose )
111 {
112  TR.Info << "StubScoreFilter"<<std::endl;
113  host_chain_ = tag->getOption< core::Size >( "chain_to_design", 2 );
114  cb_force_ = tag->getOption< core::Real >( "cb_force", 0.5 );
115  runtime_assert( cb_force_ > -0.00001 );
117  runtime_assert( stub_sets_.size() );
118 }
119 
122  return new StubScoreFilter();
123 }
124 
126 
127 
130  return new StubScoreFilter( *this );
131 }
132 
135 
137 StubScoreFilterCreator::keyname() const { return "StubScore"; }
138 
139 
140 } // filters
141 } // protein_interface_design
142 } // protocols