Move common potentials opening code to utils

This commit is contained in:
Richard Berger
2020-06-04 17:18:28 -04:00
parent 7ab65c05da
commit 4a6d3bc0e0
6 changed files with 85 additions and 151 deletions

View File

@ -193,6 +193,22 @@ namespace LAMMPS_NS {
* \return true if file exists and is readable
*/
bool file_is_readable(const std::string & path);
/**
* \brief Determine full path of potential file
* If file is not found in current directory, search LAMMPS_POTENTIALS folder
* \param path file path
* \return full path to potential file
*/
std::string get_potential_file_path(const std::string& path);
/**
* \brief Read potential file and return DATE field if it is present
* \param path file path
* \param potential_name name of potential that is being read
* \return DATE field if present
*/
std::string get_potential_date(const std::string & path, const std::string & potential_name);
}
}