Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DockFilters.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 DockingFilters
11 /// @brief filters for docking
12 /// @author Jeff Gray
13 
14 // Unit Headers
16 
17 // Package headers
19 // AUTO-REMOVED #include <protocols/filters/BasicFilters.hh>
20 
21 // Project headers
22 #include <basic/Tracer.hh>
23 #include <core/pose/Pose.fwd.hh>
26 
27 // ObjexxFCL Headers
28 // AUTO-REMOVED #include <ObjexxFCL/string.functions.hh>
29 
30 // C++ Headers
31 #include <string>
32 
33 //Utility Headers
34 #include <utility/tools/make_vector1.hh>
35 // AUTO-REMOVED #include <numeric/trig.functions.hh>
36 // AUTO-REMOVED #include <numeric/xyzMatrix.fwd.hh>
37 
38 #include <utility/vector1.hh>
39 
40 
41 using basic::T;
42 using basic::Error;
43 using basic::Warning;
44 
45 static basic::Tracer TR("protocols.docking.DockFilters");
46 
47 namespace protocols {
48 namespace docking {
49 
50 ///////////////// Low-Res Filter /////////////////
51 
53 {
54  using namespace protocols::simple_filters;
55  using namespace core::scoring;
56 
57  ScoreCutoffFilterOP hascontacts = new ScoreCutoffFilter();
58  hascontacts->set_score_type( interchain_contact );
59  hascontacts->set_unweighted( true );
60  hascontacts->set_cutoff(9.99); // interchain_contact of 10 indicates no contacts
61 
62  ScoreCutoffFilterOP fewclashes = new ScoreCutoffFilter();
63  fewclashes->set_score_type( interchain_vdw );
64  fewclashes->set_unweighted( true );
65  fewclashes->set_cutoff(1.0); // no more than 1.0 clash (low-res bump score)
66 
68  filters_->add_filter( hascontacts );
69  filters_->add_filter( fewclashes );
70 }
71 
73  //utility::pointer::ReferenceCount(),
75  filters_( init.filters_ )
76 {
77 }
78 
80 
81 void
83 {
84  using namespace protocols::simple_filters;
85  using namespace core::scoring;
86 
87  use_constraints_ = setting;
88  if ( use_constraints_ ) {
89  ScoreCutoffFilterOP constraint_filter = new ScoreCutoffFilter() ;
90  constraint_filter->set_score_type( atom_pair_constraint );
91  constraint_filter->set_cutoff( cutoff );
92  constraint_filter->set_unweighted( true );
93  filters_->add_filter( constraint_filter );
94  } else {
95  if ( filters_->size() > 2 ) filters_->remove_last_filter();
96  }
97 }
98 
99 bool
101 {
102  //assert ( !pose.is_fullatom() );
103  return filters_->apply(pose);
104 }
105 
106 void
107 DockingLowResFilter::report( std::ostream & out, core::pose::Pose const & pose ) const
108 {
109  filters_->report( out, pose );
110 }
111 
112 ///////////////// High-Res Filter /////////////////
113 
115 {
116  movable_jumps_ = utility::tools::make_vector1<core::Size>(1);
118  score_margin_ = 0.0;
120  scorefilter_->set_score_type( core::scoring::total_score );
121  scorefilter_->set_cutoff( 1000000.0 );
122 }
123 
125  //utility::pointer::ReferenceCount(),
126  Filter( init ), movable_jumps_ ( init.movable_jumps_ ), score_margin_ ( init.score_margin_ ),
127  scorefunction_ ( init.scorefunction_ ), scorefilter_( init.scorefilter_ )
128 {}
129 
131 
133 {
134  scorefilter_->set_cutoff( scorefilter_->cutoff() + score_margin_ - new_score_margin );
135  score_margin_ = new_score_margin;
136 }
137 
140 
141 bool
143 {
144  //assert ( pose.is_fullatom() );
146  return scorefilter_->apply(pose) && (interface_score < 0.0);
147 }
148 
149 } // namespace docking
150 } // namespace protocols