26 else if (su ==
"mole")
30 APP_ABORT(
"units::count_unit\n invalid count unit: " + su +
"\n valid options are: mol");
50 else if (su ==
"meter")
52 else if (su ==
"angstrom")
54 else if (su ==
"bohr")
56 else if (su ==
"nanometer")
58 else if (su ==
"picometer")
60 else if (su ==
"femtometer")
64 APP_ABORT(
"units::distance_unit\n invalid distance unit: " + su +
65 "\n valid options are: m/meter, A/angstrom, B/bohr, nm/nanometer, pm/picometer, fm/femtometer");
83 else if (su ==
"second")
85 else if (su ==
"millisecond")
87 else if (su ==
"nanosecond")
89 else if (su ==
"picosecond")
91 else if (su ==
"femtosecond")
95 APP_ABORT(
"units::time_unit\n invalid time unit: " + su +
96 "\n valid options are: s/second, ms/millisecond, ns/nanosecond, ps/picosecond, fs/femtosecond");
110 else if (su ==
"amu")
114 else if (su ==
"kilogram")
116 else if (su ==
"electron_mass")
118 else if (su ==
"proton_mass")
120 else if (su ==
"atomic_mass_unit")
122 else if (su ==
"dalton")
126 APP_ABORT(
"units::mass_unit\n invalid mass unit: " + su +
127 "\n valid options are: kg/kilogram, me/electron_mass, mp/proton_mass, amu/atomic_mass_unit, Da/dalton");
143 else if (su ==
"kJ/mol")
147 else if (su ==
"joule")
149 else if (su ==
"electron_volt")
151 else if (su ==
"rydberg")
153 else if (su ==
"hartree")
155 else if (su ==
"kilojoule_per_mole")
157 else if (su ==
"kelvin")
161 APP_ABORT(
"units::energy_unit\n invalid energy unit: " + su +
162 "\n valid options are: J/joule, eV/electron_volt, Ry/rydberg, Ha/hartree, kJ/mol/kilo_joule_per_mole, " 175 else if (su ==
"coulomb")
177 else if (su ==
"proton_charge")
181 APP_ABORT(
"units::charge_unit\n invalid charge unit: " + su +
"\n valid options are: C/coulomb, e/proton_charge");
191 else if (su ==
"bar")
193 else if (su ==
"Mbar")
195 else if (su ==
"GPa")
197 else if (su ==
"atm")
199 else if (su ==
"pascal")
201 else if (su ==
"megabar")
203 else if (su ==
"gigapascal")
205 else if (su ==
"atmosphere")
209 APP_ABORT(
"units::pressure_unit\n invalid pressure unit: " + su +
210 "\n valid options are: Pa/pascal, bar/bar, Mbar/megabar, GPa/gigapascal, atm/atmosphere");
222 else if (su ==
"newton")
224 else if (su ==
"piconewton")
228 APP_ABORT(
"units::force_unit\n invalid force unit: " + su +
"\n valid options are: N/newton, pN/piconewton");
units time_unit(const std::string &su)
convert from std::string to time unit
helper functions for EinsplineSetBuilder
units mass_unit(const std::string &su)
convert from std::string to mass unit
units charge_unit(const std::string &su)
convert from std::string to charge unit
units count_unit(const std::string &su)
convert from std::string to count unit
units energy_unit(const std::string &su)
convert from std::string to energy unit
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
units distance_unit(const std::string &su)
convert from std::string to distance unit
units pressure_unit(const std::string &su)
convert from std::string to pressure unit
units force_unit(const std::string &su)
convert from std::string to force unit