22 #include <boost/type_traits.hpp>
25 #include <utility/pointer/owning_ptr.hh>
26 #include <utility/exit.hh>
34 #include <basic/Tracer.hh>
37 namespace frag_picker {
39 static basic::Tracer
TR(
"protocols.frag_picker.VallResidue");
46 utility::pointer::ReferenceCount(), key_(0),id_(
""),profile_(20),profile_struct_(20),sec_shift_data_(0),
47 position_index_(0), section_index_(0) {
52 if (line.length() > 300)
54 else if (line.length() > 240)
56 else if (line.length() > 110)
64 utility::pointer::ReferenceCount(),
69 ss_str_(rval.ss_str_),
85 sa_norm_(rval.sa_norm_),
86 dssp_phi_(rval.dssp_phi_),
87 dssp_psi_(rval.dssp_psi_),
89 profile_(rval.profile_),
90 profile_struct_(rval.profile_struct_),
91 sec_shift_data_(rval.sec_shift_data_),
92 position_index_(rval.position_index_),
93 section_index_(rval.section_index_),
94 all_atom_residue_depth_(rval.all_atom_residue_depth_){
158 char id[] = {
'\0',
'\0',
'\0',
'\0',
'\0',
'\0' };
164 std::sscanf(line.c_str(), format_here.c_str(), &
id, &
aa_, &
ss_, &
resi_, &
x_,
183 char id[] = {
'\0',
'\0',
'\0',
'\0',
'\0',
'\0' };
192 std::sscanf(line.c_str(), format_here.c_str(), &
id, &
aa_, &
ss_, &
resi_, &
bF_,
203 &sec_shift_data_[4], &sec_shift_data_[5], &sec_shift_data_[6],
204 &sec_shift_data_[7], &sec_shift_data_[8], &sec_shift_data_[9],
205 &sec_shift_data_[10], &sec_shift_data_[11], &sec_shift_data_[12]);
215 char id[] = {
'\0',
'\0',
'\0',
'\0',
'\0',
'\0' };
222 &
y_, &
z_, &
cbx_, &
cby_, &
cbz_, &
cenx_, &
ceny_, &
cenz_, &
phi_, &
psi_, &
omega_, &
dssp_phi_, &
dssp_psi_, &
sa_, &
nali_, &
profile_[
order_[1]],
249 char id[] = {
'\0',
'\0',
'\0',
'\0',
'\0',
'\0' };
253 std::sscanf(line.c_str(), format_here.c_str(), &
id, &
aa_, &
resi_, &
x_,
294 using boost::is_same;
297 bool const is_ulong = is_same<Size, unsigned long>::value;
298 bool const is_double = is_same<Real, double>::value;
301 std::ostringstream s;
305 s << (is_ulong ?
"%lu" :
"%u") <<
" ";
308 s << (is_double ?
"%lf" :
"%f") <<
" ";
309 s << (is_double ?
"%lf" :
"%f") <<
" ";
310 s << (is_double ?
"%lf" :
"%f") <<
" ";
311 s << (is_double ?
"%lf" :
"%f") <<
" ";
312 s << (is_double ?
"%lf" :
"%f") <<
" ";
313 s << (is_double ?
"%lf" :
"%f") <<
" ";
320 for (
Size i = 0; i < 20; ++i) {
321 s <<
" " << (is_double ?
"%lf" :
"%f");
324 TR.Debug <<
"vall line format (no CS) is:\n"<<s.str()<<std::endl;
330 using boost::is_same;
333 bool const is_ulong = is_same<Size, unsigned long>::value;
334 bool const is_double = is_same<Real, double>::value;
337 std::ostringstream s;
341 s << (is_ulong ?
"%lu" :
"%u") <<
" ";
344 s << (is_double ?
"%lf" :
"%f") <<
" ";
345 s << (is_double ?
"%lf" :
"%f") <<
" ";
346 s << (is_double ?
"%lf" :
"%f") <<
" ";
347 s << (is_double ?
"%lf" :
"%f") <<
" ";
348 s << (is_double ?
"%lf" :
"%f") <<
" ";
349 s << (is_double ?
"%lf" :
"%f") <<
" ";
350 s << (is_double ?
"%lf" :
"%f") <<
" ";
353 for (
Size i = 0; i < 20; ++i) {
354 s <<
" " << (is_double ?
"%lf" :
"%f");
358 for (
Size i = 0; i < 12; ++i) {
359 s <<
" " << (is_double ?
"%lf" :
"%f");
363 TR.Debug <<
"vall line format (WITH CS) is:\n"<<s.str()<<std::endl;
372 using boost::is_same;
375 bool const is_ulong = is_same<Size, unsigned long>::value;
376 bool const is_double = is_same<Real, double>::value;
379 std::ostringstream s;
383 s << (is_ulong ?
"%lu" :
"%u") <<
" ";
384 s << (is_double ?
"%lf" :
"%f") <<
" ";
385 s << (is_double ?
"%lf" :
"%f") <<
" ";
386 s << (is_double ?
"%lf" :
"%f") <<
" ";
387 s << (is_double ?
"%lf" :
"%f") <<
" ";
388 s << (is_double ?
"%lf" :
"%f") <<
" ";
389 s << (is_double ?
"%lf" :
"%f") <<
" ";
390 s << (is_double ?
"%lf" :
"%f") <<
" ";
391 s << (is_double ?
"%lf" :
"%f") <<
" ";
392 s << (is_double ?
"%lf" :
"%f") <<
" ";
393 s << (is_double ?
"%lf" :
"%f") <<
" ";
394 s << (is_double ?
"%lf" :
"%f") <<
" ";
395 s << (is_double ?
"%lf" :
"%f") <<
" ";
396 s << (is_double ?
"%lf" :
"%f") <<
" ";
397 s << (is_double ?
"%lf" :
"%f") <<
" ";
398 s << (is_double ?
"%lf" :
"%f") <<
" ";
399 s << (is_double ?
"%lf" :
"%f") <<
" ";
400 s << (is_ulong ?
"%ld" :
"%d") <<
" ";
403 for (
Size i = 0; i < 20; ++i) {
404 s <<
" " << (is_double ?
"%lf" :
"%f");
408 for (
Size i = 0; i < 20; ++i) {
409 s <<
" " << (is_double ?
"%lf" :
"%f");
412 TR.Debug <<
"vall line format version1 is:\n"<<s.str()<<std::endl;
418 using boost::is_same;
421 bool const is_ulong = is_same<Size, unsigned long>::value;
422 bool const is_double = is_same<Real, double>::value;
425 std::ostringstream s;
428 s << (is_ulong ?
"%lu" :
"%u") <<
" ";
430 s << (is_double ?
"%lf" :
"%f") <<
" ";
431 s << (is_double ?
"%lf" :
"%f") <<
" ";
432 s << (is_double ?
"%lf" :
"%f") <<
" ";
433 s << (is_double ?
"%lf" :
"%f") <<
" ";
435 TR.Debug <<
"vall line format residue depth version1 is:\n"<<s.str()<<std::endl;
450 if (r->aa() ==
'G') {
458 }
else if (r->aa() ==
'G') {
487 utility_exit_with_message(
"unkown contacts type for distance");