37 #include <ObjexxFCL/format.hh>
40 #include <utility/vector1.fwd.hh>
41 #include <basic/Tracer.hh>
43 #include <utility/vector1.hh>
51 using namespace ObjexxFCL::fmt;
53 static basic::Tracer
tr(
"core.fragment.JumpSRFD");
54 using namespace core::id;
96 runtime_assert( ipos > 1 );
97 Size const upstream_resnr ( frame.
seqpos( ipos-1 ) );
98 Size const downstream_resnr( frame.
seqpos( ipos ) );
99 tr.Trace <<
"DownJumpSRFD applied for jump " << upstream_resnr <<
" ---> "<< downstream_resnr << std::endl;
104 tr.Warning <<
"WARNING: DownJump-Frag could not be applied to current pose... need to have a jump at "
105 << upstream_resnr <<
" " << downstream_resnr << std::endl;
112 tr.Trace <<
"apply stub transform to " << std::endl;
113 tr.Trace <<
"up stub: " <<
NamedStubID( upstream_stub_atoms_, upstream_resnr ) << std::endl;
114 tr.Trace <<
"down stub: " <<
NamedStubID( downstream_stub_atoms_, downstream_resnr ) << std::endl;
123 Size const intra_frame_pos,
127 Size const upstream_resnr( frame.
seqpos( intra_frame_pos - 1 ) );
128 Size const downstream_resnr( frame.
seqpos( intra_frame_pos ) );
130 if ( movemap.
get_jump( upstream_resnr, downstream_resnr ) ) {
131 return apply( pose, intra_frame_pos, frame );
140 runtime_assert( ipos > 1 );
141 Size const upstream_resnr ( frame.
seqpos( ipos-1 ) );
142 Size const downstream_resnr( frame.
seqpos( ipos ) );
165 return dynamic_cast< UpJumpSRFD const*
> ( & aSRFD );
173 runtime_assert( ipos > 1 );
174 Size const upstream_resnr ( frame.
seqpos( ipos-1 ) );
175 Size const downstream_resnr( frame.
seqpos( ipos ) );
176 return move_map.
get_jump( upstream_resnr, downstream_resnr );
181 upstream_stub_atoms_ = upstream;
182 downstream_stub_atoms_ = downstream;
186 downstream_stub_atoms_.reserve(4);
187 downstream_stub_atoms_.push_back(
"CA" );
188 downstream_stub_atoms_.push_back(
"N" );
189 downstream_stub_atoms_.push_back(
"CA" );
190 downstream_stub_atoms_.push_back(
"C" );
191 upstream_stub_atoms_ = downstream_stub_atoms_;
201 for ( AtomList::const_iterator it = upstream_stub_atoms_.begin(),
202 eit = upstream_stub_atoms_.end(); it!=eit; ++it ) {
205 if ( upstream_stub_atoms_ != downstream_stub_atoms_ ) {
207 for ( AtomList::const_iterator it = downstream_stub_atoms_.begin(),
208 eit = downstream_stub_atoms_.end(); it!=eit; ++it ) {
215 Parent::read_data( in );
217 tr.Trace <<
"read RT " << rt_ <<
" status of stream: " << (in.fail() ?
"FAIL" :
"GOOD" ) << std::endl;
221 std::istringstream is( line );
225 if ( !is.fail() && tag ==
"UPSTUB" ) {
226 upstream_stub_atoms_.clear();
227 while ( is >> tag ) {
228 if ( tag ==
"DOWNSTUB" )
break;
229 upstream_stub_atoms_.push_back( tag );
231 if ( !is.fail() && tag ==
"DOWNSTUB" ) {
232 downstream_stub_atoms_.clear();
233 while ( is >> tag ) {
234 downstream_stub_atoms_.push_back( tag );
237 downstream_stub_atoms_=upstream_stub_atoms_;
240 set_standard_stub_atoms();
242 tr.Trace <<
"set the STUB atoms: " << std::endl;
243 tr.Trace <<
" UPSTUB ";
244 for ( AtomList::const_iterator it = upstream_stub_atoms_.begin(),
245 eit = upstream_stub_atoms_.end(); it!=eit; ++it ) {
246 tr.Trace <<
A(3, (*it));
248 tr.Trace <<
" DOWNSTUB ";
249 for ( AtomList::const_iterator it = downstream_stub_atoms_.begin(),
250 eit = downstream_stub_atoms_.end(); it!=eit; ++it ) {
251 tr.Trace <<
A(3, (*it));
253 if ( upstream_stub_atoms_.size() != 4 || downstream_stub_atoms_.size() !=4 ) {
254 utility_exit_with_message(
"[ERROR] reading JumpSRFD... need 4 or NONE of the stub atoms...");
256 tr.Trace << std::endl;