27 #include <basic/Tracer.hh>
31 #include <utility/tag/Tag.hh>
33 #include <utility/vector0.hh>
34 #include <utility/vector1.hh>
38 static basic::Tracer
tr(
"protocols.fldsgn.filters.SecondaryStructureFilter");
46 Filter(
"SecondaryStructure" ),
54 Filter(
"SecondaryStructure" ),
63 filtered_ss_( rval.filtered_ss_ ),
64 filtered_abego_( rval.filtered_abego_ ),
65 use_abego_( rval.use_abego_ )
78 for(
Size ii=1; s.length(); ++ii ) {
90 utility_exit_with_message(
"Length of input ss is not same as total residue of pose.");
93 utility_exit_with_message(
"Length of input abego is not same as total residue of pose.");
100 if( *sec.c_str() ==
'D' ){
103 if( *sec.c_str() != pose.
secstruct( i ) ){
104 tr <<
"SS filter fail: current/filterd = "
105 << pose.
secstruct( i ) <<
'/' << sec <<
" at position " << i << std::endl;
113 for(
Size j=1; j<=abego.size(); j++ ) {
114 if( abego_manager.
check_rama( *abego.substr( j-1, 1 ).c_str(), pose.
phi( i ), pose.
psi( i ), pose.
omega( i ) )) {
119 tr <<
"Abego filter fail current(phi,psi,omega)/filtered = "
120 << pose.
phi( i ) <<
"," << pose.
psi( i ) <<
"," << pose.
omega( i ) <<
"/" << abego
121 <<
" at position " << i << std::endl;
127 tr <<
"Successfully " <<
filtered_ss_ <<
" was filtered. " << std::endl;
151 for(
Size ii=1; abego.length(); ++ii ) {
159 String blueprint = tag->getOption<
String>(
"blueprint",
"" );
160 if( blueprint !=
"" ) {
163 tr <<
"ss and abego definition in xml will be ignored, and blueprint info is used. " << std::endl;
168 BluePrint blue( blueprint );
171 use_abego_ = tag->getOption<
bool>(
"use_abego", 0 );
175 tr.Error <<
"Error!, option of topology is empty." << std::endl;
176 runtime_assert(
false );