37 #include <basic/Tracer.hh>
48 #include <utility/vector1.hh>
50 #include <boost/functional/hash.hpp>
54 static basic::Tracer
tr(
"protocols.noesy_assign.crosspeaks");
58 using namespace basic;
63 namespace noesy_assign {
66 CrossPeakInfo::~CrossPeakInfo() {}
68 void CrossPeakInfo::show( std::ostream& os )
const {
70 << proton_atom_name_ <<
" " << label_atom_type_ <<
" "
71 <<
"TOL: " << proton_tolerance_ <<
" " << label_tolerance_
72 <<
" from file " << filename_;
74 fold_proton_resonance_.show( os );
76 fold_label_resonance_.show( os );
77 os <<
"MAX_NOE_DIST: " << max_noe_distance_;
94 using namespace core::chemical;
95 if ( label_atom_type_ ==
"N" or label_atom_type_ ==
"NC" ) {
97 if ( proton_name ==
"HE" )
return "NE";
98 if ( proton_name.substr(0,2) ==
"HH" )
return "N"+proton_name.substr(1,2);
101 if ( proton_name.substr(0,2) ==
"HZ" )
return "NZ";
104 if ( proton_name.substr(0,3) ==
"HE2" )
return "NE2";
107 if ( proton_name.substr(0,3) ==
"HD2" )
return "ND2";
110 if ( proton_name ==
"HE1" )
return "NE1";
112 if ( proton_name ==
"H" )
return "N";
116 if ( label_atom_type_ ==
"C" or label_atom_type_ ==
"NC" ) {
117 if ( proton_name[ 0 ] ==
'Q' && proton_name[ 1 ] ==
'Q' ) {
118 name =
"C" + proton_name.substr(2,1);
121 if ( proton_name[ 0 ] ==
'Q' ) {
125 }
if ( proton_name.substr(1,2) ==
"HB" ) {
127 }
if ( proton_name.substr(1,2) ==
"HA" ) {
131 if ( proton_name ==
"HH2" )
return "CH2";
132 if ( proton_name ==
"HZ2" )
return "CZ2";
133 if ( proton_name ==
"HZ3" )
return "CZ3";
134 if ( proton_name ==
"HE3" )
return "CE3";
135 if ( proton_name ==
"HD1" )
return "CD1";
138 if ( proton_name ==
"HZ" )
return "CZ";
139 if ( proton_name.substr(0,2) ==
"HD" || proton_name.substr(0,2) ==
"HE" )
return "C"+proton_name.substr(1,2);
142 if ( proton_name.substr(0,2) ==
"HA" )
return "CA";
143 if ( proton_name.substr(0,2) ==
"HB" )
return "CB";
145 Size len=proton_name.size()-2;
146 if ( proton_name.substr(0,2) ==
"HG" || proton_name.substr(0,2)==
"HD" )
return "C"+proton_name.substr(1,len < 1 ? 1 : len );
151 throw EXCN_UnknownAtomname(
"proton_name " + proton_name +
" not recognized for " + label_atom_type_ +
" label" );