30 #include <basic/Tracer.hh>
33 #include <utility/tag/Tag.hh>
35 #include <utility/vector0.hh>
36 #include <utility/vector1.hh>
44 static basic::Tracer
TR(
"protocols.fldsgn.filters.HelixPairingFilter");
87 secstruct_( rval.secstruct_ ),
88 dist_cutoff_( rval.dist_cutoff_ ),
89 bend_angle_( rval.bend_angle_ ),
90 cross_angle_( rval.cross_angle_ ),
91 align_angle_( rval.align_angle_ ),
92 hpairset_( rval.hpairset_ )
136 runtime_assert( ! helix_pairings.empty() );
147 Helices const & helices( ss_info->helices() );
154 for( HelixPairings::const_iterator it=helix_pairings.begin(), ite=helix_pairings.end(); it != ite; ++it ) {
157 if( helices.size() < hpair.
h1() ) {
158 TR <<
"Helix " << hpair.
h1() <<
" does not exist ! " << std::endl;
162 if( helices.size() < hpair.
h2() ) {
163 TR <<
"Helix " << hpair.
h2() <<
" does not exist ! " << std::endl;
170 TR <<
"Helix " << hpair.
h1() <<
"is bend, angle=" << helices[ hpair.
h1() ]->bend() << std::endl;
174 TR <<
"Helix bend " << hpair.
h2() <<
" " << helices[ hpair.
h2() ]->bend() << std::endl;
186 if( filter ==
false )
break;
189 TR <<
" Filter condition: " << std::endl;
190 TR <<
" bend ( intra helix ) <= " <<
bend_angle_ << std::endl;
198 TR <<
" Filter success ! " << std::endl;
200 TR <<
" Filter failed ! " << std::endl;
222 runtime_assert( ! helix_pairings.empty() );
246 TR <<
"Invalid type for output_type, choose either dist or cross or align. " << std::endl;
247 runtime_assert(
false );
266 String const hpairs = tag->getOption<
String>(
"helix_pairings",
"" );
271 String const blueprint = tag->getOption<
String>(
"blueprint",
"" );
272 if( blueprint !=
"" ) {
273 BluePrint blue( blueprint );
276 if( ! blue.helix_pairings().empty() ) {
280 TR <<
" HHPAIR in blueprint will be igonared " << std::endl;
285 if(
hpairset_->helix_pairings().empty() ){
286 TR.Error <<
"Error!, Option of helix_pairings is empty." << std::endl;
287 runtime_assert(
false );
298 if( output_type_ !=
"dist" && output_type_ !=
"cross" && output_type_ !=
"align" ) {
299 TR <<
"Invalid type for output_type, choose among dist or cross or align. " << std::endl;
301 TR <<
"HelixPairing " << *
hpairset_->helix_pairing( output_id_ ) <<
", "
302 << output_type_ <<
" is used for output value. " << std::endl;