initial implementation of automated unit conversion.

this includes a tester program and implementation into pair style tersoff
This commit is contained in:
Axel Kohlmeyer
2020-06-22 17:57:05 -04:00
parent f5a31fefdc
commit b29b3d52f6
9 changed files with 308 additions and 13 deletions

View File

@ -240,6 +240,24 @@ namespace LAMMPS_NS {
* \return UNITS field if present
*/
std::string get_potential_units(const std::string & path, const std::string & potential_name);
enum { NOCONVERT = 0, METAL2REAL = 1, REAL2METAL = 1<<1 };
enum { UNKNOWN = 0, ENERGY };
/**
* \brief Return bitmask of available conversion factors for a given propert
* \param property property to be converted
* \return bitmask indicating available conversions
*/
int get_supported_conversions(const int property);
/**
* \brief Return unit conversion factor for given property and selected from/to units
* \param property property to be converted
* \param conversion constant indicating the conversion
* \return conversion factor
*/
double get_conversion_factor(const int property, const int conversion);
}
}