diff --git a/src/potential_file_reader.cpp b/src/potential_file_reader.cpp index 2ad8bbb764..2730a3d109 100644 --- a/src/potential_file_reader.cpp +++ b/src/potential_file_reader.cpp @@ -40,16 +40,19 @@ using namespace LAMMPS_NS; * \param lmp Pointer to LAMMPS instance * \param filename Name of file to be read * \param potential_name Name of potential style for error messages - * \param auto_convert Bitmask of supported unit conversions */ + * \param name_suffix Suffix added to potential name in error messages + * \param auto_convert Bitmask of supported unit conversions + */ PotentialFileReader::PotentialFileReader(LAMMPS *lmp, const std::string &filename, const std::string &potential_name, + const std::string &name_suffix, const int auto_convert) : Pointers(lmp), reader(nullptr), filename(filename), - filetype(potential_name + " potential"), + filetype(potential_name + name_suffix), unit_convert(auto_convert) { if (comm->me != 0) { @@ -66,6 +69,20 @@ PotentialFileReader::PotentialFileReader(LAMMPS *lmp, } } +/* + * \param lmp Pointer to LAMMPS instance + * \param filename Name of file to be read + * \param potential_name Name of potential style for error messages + * \param auto_convert Bitmask of supported unit conversions + */ +PotentialFileReader::PotentialFileReader(LAMMPS *lmp, + const std::string &filename, + const std::string &potential_name, + const int auto_convert) : + PotentialFileReader(lmp, filename, potential_name, " potential", auto_convert) +{ +} + /** Closes the file */ PotentialFileReader::~PotentialFileReader() { diff --git a/src/potential_file_reader.h b/src/potential_file_reader.h index d3befca282..4f69b8f757 100644 --- a/src/potential_file_reader.h +++ b/src/potential_file_reader.h @@ -38,6 +38,10 @@ namespace LAMMPS_NS PotentialFileReader(class LAMMPS *lmp, const std::string &filename, const std::string &potential_name, const int auto_convert = 0); + PotentialFileReader(class LAMMPS *lmp, const std::string &filename, + const std::string &potential_name, + const std::string &name_suffix, + const int auto_convert = 0); virtual ~PotentialFileReader(); void ignore_comments(bool value);