5 #include <unordered_map>
7 #include <boost/functional/hash.hpp>
8 #include <boost/algorithm/string.hpp>
9 #include <boost/regex.hpp>
12 : std::binary_function<std::string, std::string, bool>
15 std::string
const& y)
const
17 return boost::algorithm::iequals(x, y, std::locale());
22 : std::unary_function<std::string, std::size_t>
29 for(std::string::const_iterator it = x.begin();
32 boost::hash_combine(seed, std::toupper(*it, locale));
172 std::string basisNameEscaped = boost::regex_replace(basisName, boost::regex(
"\\*"),
"ds");
173 basisNameEscaped = boost::regex_replace(basisNameEscaped, boost::regex(
" "),
"_");
174 return basisNameEscaped;
178 std::stringstream fileNameBuilder;
179 std::stringstream atomTypeBuilder;
180 atomTypeBuilder << type;
182 std::string basisNameEscaped =
escapeBasis(basisName);
184 std::string atomTypeString = atomTypeBuilder.str();
185 fileNameBuilder <<
"atom_" << atomTypeString <<
"_basis_" << basisNameEscaped <<
".tm";
187 std::string filename = fileNameBuilder.str();
194 std::cerr <<
"Unknown atom abbreviation " << abbreviation << std::endl;
201 std::unordered_map<std::string, AtomType, ihash, iequal_to> abbreviationMap {
321 if(abbreviationMap.find(abbreviation) != abbreviationMap.end()) {
322 return abbreviationMap.find(abbreviation)->second;