18 #include <basic/Tracer.hh>
19 #include <utility/exit.hh>
23 #include <ObjexxFCL/string.functions.hh>
25 #include <utility/vector1.hh>
31 using namespace ObjexxFCL;
35 size2_( mapping.
size() ),
47 Size upstream_res(0), old_num_res(0);
60 upstream_res =
event.position;
64 upstream_res =
event.position - 1;
68 upstream_res =
event.position - 1;
71 utility_exit_with_message(
72 "unknown signal triggered by conformation length change. please update this file"
76 old_num_res =
event.conformation->size() -
event.length_change;
78 for (
Size i = 1; i <= upstream_res; ++i )
mapping_.push_back( i );
82 if (upstream_res < old_num_res)
89 runtime_assert( downstream_res <= old_num_res + 1);
151 for(
core::Size i = 1; i <= new_mapping.size(); ++i){
152 if( new_mapping[i] != 0 && new_mapping[i] <=
mapping_.size() ){
153 new_mapping[i] =
mapping_[ new_mapping[i] ];
179 bool aligned(
true );
242 output << (
"id.SequenceMapping ") << i <<
" --> ";
244 else output <<
"----" << std::endl;
253 int pos =
static_cast< int >(
mapping_[ i ]) - setting;
254 mapping_[ i ] = ( pos > 0 ) ? pos : 0;
278 if ( pos1 == 0 )
return;
280 if ( pos1 >=
size1() ) {
315 if ( pos1 >
mapping_.size() )
return 0;
328 for (
Size ii = 1; ii <=
size1(); ++ii ) {
329 if (
mapping_[ii] != other[ii] )
return false;
338 retval += string_of(i) +
" --> ";
340 retval += string_of(
mapping_[i]) +
"\n";
342 retval +=
static_cast< std::string > (
"----") +
"\n";
355 using namespace core::id;
361 *composite_smap = smaps[1];
363 for(
core::Size i = 2; i <= smaps.size(); ++i ){
364 composite_smap->downstream_combine( smaps[i] );
367 return composite_smap;