18 #include <basic/Tracer.hh>
25 #include <utility/io/izstream.hh>
27 #include <utility/vector1.hh>
33 static basic::Tracer
tr(
"core.chemical");
54 utility::io::izstream data( filename.c_str() );
56 if ( !data.good() ) utility_exit_with_message(
"Unable to open MM atom type set file: "+filename );
62 getline( data, line );
63 std::istringstream l( line );
65 if ( tag !=
"NAME" ) {
66 utility_exit_with_message(
"MMAtomTypeSet::read_file: bad first line: "+ line );
70 tags.push_back( tag );
76 int const ntags( tags.size() );
78 using namespace basic;
81 while ( getline( data,line ) ) {
82 std::istringstream l( line );
83 l >> name_wo_whitespace;
84 if ( name_wo_whitespace.find(
"#",0) == 0 )
continue;
86 utility_exit_with_message(
"bad line: "+line);
92 for (
int i=1; i<= ntags; ++i ) {
98 utility_exit_with_message(
"bad line: "+line);
102 atoms_.push_back( mm_atom_type_ptr );
104 utility_exit_with_message(
"MMAtomTypeSet:: duplicate atom name "+name_wo_whitespace);
107 tr.Debug <<
"New MM atom type: " << name_wo_whitespace << std::endl;
119 std::cout << (*i).first <<
" " << (*i).second << std::endl;