32 #include <utility/exit.hh>
39 #include <basic/Tracer.hh>
42 #include <utility/vector1.hh>
46 static basic::Tracer
TR(
"protocols.topology.util" );
69 std::map< String, StrandPairingOP > newpairs;
74 for(
Size ispair=1; ispair<=spairset.
size(); ispair++ ) {
81 for(
Size iaa=begin1; iaa<=end1; ++iaa ) {
83 Size istrand ( ssinfo->strand_id( iaa ) );
84 if( istrand == 0 )
continue;
85 Size ist_begin ( ssinfo->strand( istrand )->begin() );
88 if ( jaa == 0 )
continue;
90 Size jstrand ( ssinfo->strand_id( jaa ) );
91 if( jstrand == 0 )
continue;
93 Size jst_begin ( ssinfo->strand( jstrand )->begin() );
94 Size jst_end ( ssinfo->strand( jstrand )->end() );
95 Size jst_length ( jst_end - jst_begin );
97 if( istrand == jstrand )
continue;
99 if( istrand !=0 && jstrand !=0 && jaa !=0 ){
112 std::ostringstream spairname;
113 spairname << istrand <<
"-" << jstrand <<
"." << orient ;
114 std::map<String, StrandPairingOP>::iterator it( newpairs.find( spairname.str() ) );
115 if ( it == newpairs.end() ){
117 newpairs.insert( std::map<String, StrandPairingOP>::value_type( spairname.str(), strand_pair ) );
119 (*it).second->elongate( iaa, jaa, pleats, pleats );
127 std::map<String, StrandPairingOP>::iterator it( newpairs.begin() );
128 while( it != newpairs.end() ){
131 if( (*it).second->size1() < minimum_pair_length || (*it).second->size2() < minimum_pair_length ) {
137 TR.Debug <<
"Defined strand pair : " << *((*it).second)
138 <<
", 1st_strand begin: " << (*it).second->begin1() <<
", end: " << (*it).second->end1()
139 <<
", 2nd_strand begin: " << (*it).second->begin2() <<
", end: " << (*it).second->end2() << std::endl;
156 Real const pore_radius )
165 for (
Size j = 1; j<=5; ++j ) {
167 atom_map.
set( atom,
true );
186 for(
Size ii=1; ii<=intervals.size(); ii++ ) {
187 for(
Size jj=intervals[ ii ].
left; jj<=intervals[ ii ].right; ++jj ) {
188 position_A[ jj ] =
false;
190 for (
Size j=1; j<=5; ++j ) {
192 atom_map_A.
set( atom1,
true );
195 atom_map_A.
set( atom2,
true );
198 atom_map_B.
set( atom3,
true );
201 atom_map_B.
set( atom4,
true );
206 if( position_A[ jj ] ) {
207 for (
Size j=1; j<=5; ++j ) {
209 atom_map_A.
set( atom,
true );
212 for (
Size j=1; j<=5; ++j ) {
214 atom_map_B.
set( atom,
true );
222 Real tot_all( 0.0 ), tot_A( 0.0 ), tot_B( 0.0 );
224 tot_all += rsd_sasa[ ii ];
225 if( position_A[ ii ] ) {
226 tot_A += rsd_sasa_A[ ii ];
228 tot_B += rsd_sasa_B[ ii ];
241 return tot_A + tot_B - tot_all;
257 HBondSet
const & hbond_set( static_cast< HBondSet const & > ( copy_pose.
energies().
data().get(
HBOND_SET )) );
260 Size num_broken_hbond( 0 );
261 for(
Size ii=begin; ii<=
end; ++ii ) {
262 if( ! hbond_set.acc_bbg_in_bb_bb_hbond( ii ) ) {
263 TR <<
"hbonds of " << ii <<
" is broken. " << std::endl;
268 return num_broken_hbond;
284 HBondSet
const & hbond_set( static_cast< HBondSet const & > ( copy_pose.
energies().
data().get(
HBOND_SET )) );
288 Size don_pos = hbond_set.hbond((
int)i).don_res();
289 Size acc_pos = hbond_set.hbond((
int)i).acc_res();
290 if( don_pos >= begin && don_pos <= end &&
291 acc_pos >= begin && acc_pos <= end ) {
292 hbonds.push_back( hbond_set.hbond((
int)i) );