20 #include <basic/datacache/CacheableData.hh>
27 #include <numeric/xyzVector.hh>
28 #include <numeric/conversions.hh>
30 #include <utility/vector1.hh>
43 begin_( 0 ),end_( 0 ),
44 is_geometry_initialized_( false )
59 begin_( begin ), end_( end ),
60 is_geometry_initialized_( false )
78 is_geometry_initialized_( s.is_geometry_initialized_ ),
79 orient_ ( s.orient_ ),
80 Nend_orient_( s.Nend_orient_ ),
81 Cend_orient_( s.Cend_orient_ ),
82 Nend_pos_( s.Nend_pos_ ),
83 Cend_pos_( s.Cend_pos_ ),
84 mid_pos_( s.mid_pos_ )
118 out << st.
begin() <<
"-" << st.
end() ;
137 mid_pos( ( bbpos.
N( pos ) + bbpos.
C( pos ) )/2.0 );
139 mid_pos( ( bbpos.
N( pos ) + bbpos.
C( pos+1 ) )/2.0 );
176 out << hx.
begin() <<
"-" << hx.
end() ;
189 static Real const eleven_inv = 1.0 / 11.0;
192 Size const s2 = s1 + 1;
193 Size const s3 = s2 + 1;
194 Size const s4 = s3 + 1;
196 Vector const p1 = ( bbpos.
CA( s1 ) + bbpos.
C( s1 ) ) +
197 ( bbpos.
N( s2 ) + bbpos.
CA( s2 ) + bbpos.
C( s2 ) ) +
198 ( bbpos.
N( s3 ) + bbpos.
CA( s3 ) + bbpos.
C( s3 ) ) +
199 ( bbpos.
N( s4 ) + bbpos.
CA( s4 ) ) ;
201 Vector const Nend_pos1 = ( p1 + bbpos.
N( s1 ) ) * eleven_inv;
202 Vector const Nend_pos2 = ( p1 + bbpos.
C( s4 ) ) * eleven_inv;
203 Nend_orient( ( Nend_pos2 - Nend_pos1 ).normalized() );
206 Size const n2 = n1 + 1;
207 Size const n3 = n2 + 1;
208 Size const n4 = n3 + 1;
210 Vector const p2 = ( bbpos.
CA( n1 ) + bbpos.
C( n1 ) ) +
211 ( bbpos.
N( n2 ) + bbpos.
CA( n2 ) + bbpos.
C( n2 ) ) +
212 ( bbpos.
N( n3 ) + bbpos.
CA( n3 ) + bbpos.
C( n3 ) ) +
213 ( bbpos.
N( n4 ) + bbpos.
CA( n4 ) ) ;
215 Vector const Cend_pos1 = ( p2 + bbpos.
N( n1 ) ) * eleven_inv;
216 Vector const Cend_pos2 = ( p2 + bbpos.
C( n4 ) ) * eleven_inv;
217 Cend_orient( ( Cend_pos2 - Cend_pos1 ).normalized() );
220 Vector v = Cend_pos2 - Nend_pos1;
226 mid_pos( ( Nend_pos1 + Cend_pos2 )/2.0 );
293 secstruct_( s.secstruct_ ),
294 bb_pos_( s.bb_pos_ ),
295 strands_( s.strands_ ),
296 strand_id_( s.strand_id_ ),
297 helices_( s.helices_ ),
298 helix_id_( s.helix_id_ ),
299 loop_id_( s.loop_id_ ),
300 ss_element_id_( s.ss_element_id_ )
309 basic::datacache::CacheableDataOP
364 if( secstruct ==
"" ){
368 runtime_assert( num_protein_res ==
secstruct_.length() );
384 Size nres( secstruct.size() );
385 runtime_assert( nres > 0 );
396 out <<
"#### SS_Info " << std::endl;
397 for ( Helices::const_iterator it=ssinfo.
helices_.begin(), ite=ssinfo.
helices_.end(); it != ite; ++it ) {
399 Helix const & hx( **it );
400 out <<
"# Helix " << count <<
": " << hx << std::endl;
403 for ( Strands::const_iterator it=ssinfo.
strands_.begin(), ite=ssinfo.
strands_.end(); it != ite; ++it ) {
405 Strand const & st( **it );
406 out <<
"# Strand " << count <<
": " << st << std::endl;
427 for( Strands::iterator iter =
strands_.begin(),
428 iter_end =
strands_.end(); iter != iter_end; ++iter ) {
430 if( st->length() >= 2 ){
434 for( Helices::iterator iter =
helices_.begin(),
435 iter_end =
helices_.end(); iter != iter_end; ++iter ) {
437 if( hx->length() >= 4 ){
448 bool flag_L(
false );
449 bool flag_E(
false );
450 bool flag_H(
false );
451 Size beginE, beginH, beginL;
452 Size istrand( 0 ), ihelix( 0 ), iloop( 0 ), iss( 0 );
455 for(
Size i=1; i<= secstruct.length(); ++i ) {
456 String const & ss( secstruct.substr( i-1, 1 ) );
464 if ( flag_E ==
false ) {
469 strand_id_[ i ] = istrand;
471 }
else if( ss ==
"H" ) {
473 if ( flag_H ==
false ) {
482 if( flag_L ==
false ) {
491 if ( ss !=
"E" && flag_E ==
true ) {
493 if( ( i - beginE ) >= 2 ) {
500 if ( ss !=
"H" && flag_H ==
true ) {
502 if( ( i-beginH ) >= 2 ) {
509 if( ss !=
"L" && flag_L ==
true ) {
511 if( ( i-beginL ) >= 2 ) {
514 loops_.push_back(
new Loop( beginL, beginL ) );
526 if( flag_E ==
true ) {
527 if( ( secstruct.length() - beginE + 1 ) >= 2 ) {
533 if( flag_H ==
true ) {
534 if( ( secstruct.length() - beginH + 1 ) >= 2 ) {
535 helices_.push_back(
new Helix( beginH, secstruct.length() ) );
540 if( flag_L ==
true ) {
541 if( ( secstruct.length() - beginL + 1 ) >= 2 ) {
542 loops_.push_back(
new Loop( beginL, secstruct.length() ) );
544 loops_.push_back(
new Loop( beginL, beginL ) );