33 #include <basic/Tracer.hh>
37 #include <utility/io/izstream.hh>
39 #include <utility/exit.hh>
40 #include <utility/vector1.hh>
50 static basic::Tracer
TR(
"core.chemical.orbitals");
55 read_file( directory +
"/orbital_properties.txt" );
77 utility::io::izstream data( filename.c_str() );
79 if ( !data.good() ) utility_exit_with_message(
"Unable to open atomset file: "+filename );
85 getline( data, line );
86 std::istringstream l( line );
88 if ( tag !=
"orbital_type" || tag2 !=
"atom_type" ) {
89 utility_exit_with_message(
"AtomTypeSet::read_file: bad first line: "+ line );
93 tags.push_back( tag );
101 using namespace basic;
104 while ( getline( data,line ) ) {
105 std::istringstream l( line );
106 l >> name_wo_whitespace;
107 if ( l.fail() || name_wo_whitespace.find(
"#",0) == 0 )
continue;
109 if ( l.fail() || tag.size() < 1 ) {
110 utility_exit_with_message(
"bad line: "+line);
118 for (
Size i=1; i<= ntags; ++i ) {
124 utility_exit_with_message(
"bad line: "+line);
129 while ( !l.fail() && tag.find(
"#",0) != 0) {
138 utility_exit_with_message(
"AtomTypeSet:: duplicate atom name "+name_wo_whitespace);
141 TR.Debug <<
"New atom type: " << name_wo_whitespace <<
' ' << atom_type_name << std::endl;
151 std::map< std::string, int >::const_iterator
154 utility_exit_with_message(
"unrecognized orbital type name "+orbital_type_name);
163 std::map< std::string, int >::const_iterator
166 utility_exit_with_message(
"unrecognized orbital type name "+orbital_type_name);