Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RGFilter.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 RGFilter.cc
11 /// @brief runs reject or accept filters on pose
12 /// @detailed
13 /// Contains currently: RGFilter
14 ///
15 ///
16 /// @author Robert Vernon
17 
18 // Unit Headers
20 
21 // Package Headers
22 
23 // Project Headers
24 #include <core/pose/Pose.hh>
25 #include <core/types.hh>
26 // AUTO-REMOVED #include <core/scoring/ScoreFunction.hh>
29 
30 // ObjexxFCL Headers
31 
32 // Utility headers
33 #include <basic/Tracer.hh>
34 
35 #include <utility/vector1.hh>
36 
37 
38 
39 //// C++ headers
40 static basic::Tracer tr("protocols.simple_filters.RGFilter");
41 
42 namespace protocols {
43 namespace simple_filters {
44 
45 bool RGFilter::apply( core::pose::Pose const & pose ) const {
46 
47  using namespace core::scoring;
48  if ( !AbinitioBaseFilter::apply( pose ) ) return false;
49  if ( sstype_ == "fail" ) return true;
50  //car sheet_filter disable
51 
52  //car rg filter disable
53  if ( max_helix_length_ > 25 || max_helix_fraction_ > 0.22 ) return true;
54 
55  //ScoreFunctionOP scorefxn( new ScoreFunction );
56  //scorefxn->set_weight( rg, 1.0 );
58 
59  core::Real rg_threshold
60  = ( 3.0 * std::pow( static_cast< float >( pose.total_residue() ), ( 1.0f / 3 ) ) ) + 2;
61  //core::Real rg_score = (*scorefxn)( pose );
62 
63  core::Real rg_score = rg_energy.calculate_rg_score( pose );
64 
65 
66  if ( rg_score > rg_threshold ) {
67  return false;
68  }
69 
70  return true;
71 }
72 
73 } // filters
74 } // protocols