14 #include <basic/Tracer.hh>
18 #include <utility/exit.hh>
19 #include <utility/io/izstream.hh>
20 #include <utility/file/FileName.hh>
21 #include <utility/pointer/owning_ptr.hh>
29 #include <ObjexxFCL/format.hh>
31 #include <utility/vector1.hh>
38 static basic::Tracer
tr(
"core.sequence.ChemicalShiftSequence" );
55 static bool init_order(
false);
56 static std::map< string, Size >
order;
57 static Real const bad_shift ( 9999.000 );
58 static Real const upper_limit( 20.0 );
83 utility::io::izstream input(fn);
87 string msg(
"ERROR: Unable to open file " + fn.name() );
88 utility_exit_with_message(msg);
94 while ( line.substr(0,13) !=
"DATA SEQUENCE" ) {
95 getline( input, line );
98 while ( line.substr(0,13) ==
"DATA SEQUENCE" ) {
100 std::istringstream ls( line );
101 ls >> dummy >> dummy;
102 while ( ls.good() ) {
108 for (
Size ii = 1; ii <= 3; ++ii ) {
109 getline( input, line );
123 while( getline( input, line ) ) {
124 std::istringstream ls( line );
129 ls >> res_no >> aa >> atm_name >> chemical_shift;
131 if ( res_no != last_res_no ) {
132 for (
Size ii = last_res_no; ii <= res_no; ++ii ) {
140 last_res_no = res_no;
142 if ( chemical_shift > upper_limit ) {
143 chemical_shift = bad_shift;
146 std::cout << line << std::endl;
147 std::cout <<
"res_no = " << res_no << std::endl;
148 std::cout <<
"aa = " << aa << std::endl;
149 std::cout <<
"aa_seq[" << res_no-1 <<
"] = " << aa_seq[res_no-1]
151 Size const idx( order[atm_name] );
152 std::cout <<
"idx = " << idx << std::endl;
153 std::cout << std::endl << std::endl;
155 if ( idx != 0 ) new_prof[ res_no ][ idx ] = chemical_shift;
174 return 0.948093982461;
175 }
else if ( idx == 2 ) {
176 return 0.828795509906;
177 }
else if ( idx == 3 ) {
178 return 0.969003290496;
179 }
else if ( idx == 4 ) {
180 return 0.231641960268;
181 }
else if ( idx == 5 ) {
182 return 0.725943902221;
183 }
else if ( idx == 6 ) {
184 return 2.78164308475;
186 utility_exit_with_message(
"Error: invalid index!");
199 for (
Size j = 1; j <= p.
width(); ++j ) {
200 out << ObjexxFCL::fmt::F( width, precision, p.
prof_row(i)[j] );