Add type information for table potentials

This commit is contained in:
Richard Berger
2020-06-02 16:08:49 -04:00
parent d6e062d0b9
commit a80c80c77e
4 changed files with 6 additions and 5 deletions

View File

@ -383,7 +383,7 @@ void AngleTable::free_table(Table *tb)
void AngleTable::read_table(Table *tb, char *file, char *keyword)
{
TableFileReader reader(lmp, file);
TableFileReader reader(lmp, file, "angle");
char * line = reader.find_section_start(keyword);

View File

@ -309,7 +309,7 @@ void BondTable::free_table(Table *tb)
void BondTable::read_table(Table *tb, char *file, char *keyword)
{
TableFileReader reader(lmp, file);
TableFileReader reader(lmp, file, "bond");
double emin = BIGNUM;
char * line = reader.find_section_start(keyword);

View File

@ -27,8 +27,9 @@
using namespace LAMMPS_NS;
TableFileReader::TableFileReader(LAMMPS *lmp,
const std::string &filename) :
PotentialFileReader(lmp, filename, "table")
const std::string &filename,
const std::string &type) :
PotentialFileReader(lmp, filename, type + " table")
{
}

View File

@ -24,7 +24,7 @@ namespace LAMMPS_NS
{
class TableFileReader : public PotentialFileReader {
public:
TableFileReader(class LAMMPS *lmp, const std::string &filename);
TableFileReader(class LAMMPS *lmp, const std::string &filename, const std::string & type);
virtual ~TableFileReader();
char * find_section_start(const std::string & keyword);