32 #include <ObjexxFCL/string.functions.hh>
35 #include <utility/io/izstream.hh>
36 #include <utility/file/file_sys_util.hh>
41 #include <utility/vector1.hh>
58 using namespace core::chemical;
59 using namespace core::scoring;
62 utility_exit_with_message(
"Cannot find file '"+filename+
"'");
65 utility::io::izstream data( filename );
67 utility_exit_with_message(
"Cannot open file '"+filename+
"'");
73 while ( getline( data, line ) ) {
74 std::istringstream l( line );
75 if ( line.size() < 1 || line[0] ==
'#' )
continue;
76 lines.push_back( line );
82 std::istringstream h( first_line );
88 utility_exit_with_message(
"Error parsing first line of '"+filename+
"'");
92 if ( h.fail() )
break;
96 utility_exit_with_message(
"Error, score type '"+tag+
"' spcified in '"+filename+
"' doesn't exist.");
102 std::istringstream k( second_line );
103 Size const ntypes( unfolded_score_types.size() );
107 if ( tag !=
"WEIGHT" ) {
108 utility_exit_with_message(
"Error parsing second line of '"+filename+
"'");
110 for (
Size i=1; i <= ntypes; ++i ) {
113 utility_exit_with_message(
"Error, number of energies doesn't match number of score types in '"+filename+
"'");
119 Size const nlines( lines.size() );
121 for (
Size i=3; i <= nlines; ++i ) {
123 std::istringstream l( temp_line );
129 ObjexxFCL::lpad( tlc, 3 );
131 for (
Size i=1; i <= ntypes; ++i ) {
134 utility_exit_with_message(
"Error, number of energies doesn't match number of score types in '"+filename+
"'");
136 emap[ unfolded_score_types[i] ] = val;