28 #include <ObjexxFCL/format.hh>
30 #include <utility/vector1.hh>
34 #include <utility/excn/Exceptions.hh>
40 using namespace ObjexxFCL::format;
66 bool success = Parent::align( map );
67 for ( PosList::iterator it = pos_.begin(),
68 eit = pos_.end(); it!=eit && success; ++it ) {
69 Size newpos( map[ *it ] );
78 using namespace ObjexxFCL::format;
82 show_fragments( out );
86 using namespace ObjexxFCL::format;
91 std::istringstream line_stream( line );
92 while ( line_stream >> pos ) {
93 pos_.push_back( pos );
95 init_length( pos_.front(), pos_.back(), pos_.size() );
99 for ( PosList::const_iterator it = pos_.begin(),
100 eit = pos_.end(); it!=eit; ++it ) {
101 out << RJ( 3, *it ) <<
" ";
107 int offset = setting-pos_.front();
112 Parent::shift_by( offset );
113 for ( PosList::iterator it = pos_.begin(),
114 eit = pos_.end(); it!=eit; ++it ) {
115 int new_pos = *it + offset;
117 std::ostringstream msg;
118 msg <<
"offset " << offset <<
" would shift at least one position of Frame " << *
this <<
" to negative or zero" << std::endl;
119 throw utility::excn::EXCN_RangeError( msg.str() );
virtual bool align(core::id::SequenceMapping const &map)
change frames residue numbers accoriding to map
virtual void read(std::istream &)
virtual void shift_by(int offset)
shift frame by offset relative to current start position ( change end accordingly ) ...
JumpingFrame is a discontinuous frame i.e, the SRFDs stored in the FragData objects can be applied to...
void show_pos(std::ostream &out) const
utility::pointer::shared_ptr< Frame > FrameOP
virtual void show(std::ostream &) const
virtual FrameOP clone() const
clone method, new frame with same alignment position, fragments are not copied!
virtual void shift_to(core::Size setting)
shift to new start position ( change end accordingly )