27 #include <basic/options/keys/OptionKeys.hh>
39 #include <ObjexxFCL/format.hh>
43 #include <basic/Tracer.hh>
45 #include <utility/vector1.hh>
53 static basic::Tracer
tr(
"protocols.simple_filters.AbinitioBaseFilter");
55 using namespace ObjexxFCL;
56 using namespace ObjexxFCL::fmt;
59 namespace simple_filters {
61 AbinitioBaseFilter::AbinitioBaseFilter() {
62 using namespace basic::options;
63 using namespace basic::options::OptionKeys;
69 if ( sstype_ ==
"" ) sstype_=get_protein_sstype( pose );
70 tr.Info <<
"apply filter: " << name() << std::endl;
80 if( secstructs.size() == 0 ) {
81 tr.Error <<
"Warning: Needs psipred_ss2 to run filters" << std::endl;
91 max_helix_length_ = 0;
95 if ( secstructs[i] ==
'H' ) {
98 if ( helix_length > max_helix_length_ ) {
99 max_helix_length_ = helix_length;
101 }
else if ( secstructs[i] ==
'E' ) {
112 beta_ratio_ =
static_cast< float >( beta_ ) / ( alpha + beta_ );
113 if ( beta_ratio_ >= 0.8 ) {
114 tr.Trace <<
"Protein type: all beta Fraction beta: " <<
115 F( 6, 3, beta_ratio_ ) << std::endl;
116 protein_sstype =
'b';
117 }
else if ( beta_ratio_ > 0.2 && beta_ >= 10 ) {
118 tr.Trace <<
"Protein type: alpha/beta Fraction beta: " <<
119 F( 6, 3, beta_ratio_ ) << std::endl;
120 protein_sstype =
"ab";
122 tr.Trace <<
"Protein type: all alpha Fraction beta: " <<
123 F( 6, 3, beta_ratio_ ) <<
"nbeta" << I( 6, beta_ ) << std::endl;
124 protein_sstype =
'a';
127 return protein_sstype;