add tests for all improper styles except hybrid

This commit is contained in:
abhishandy
2020-08-14 23:10:35 -04:00
parent 194fe17263
commit a65c672afc
15 changed files with 1000 additions and 216 deletions

View File

@ -57,6 +57,8 @@ TestConfigReader::TestConfigReader(TestConfig &config) : YamlReader(), config(co
consumers["bond_coeff"] = &TestConfigReader::bond_coeff;
consumers["angle_style"] = &TestConfigReader::angle_style;
consumers["angle_coeff"] = &TestConfigReader::angle_coeff;
consumers["improper_style"] = &TestConfigReader::improper_style;
consumers["improper_coeff"] = &TestConfigReader::improper_coeff;
consumers["init_energy"] = &TestConfigReader::init_energy;
consumers["run_energy"] = &TestConfigReader::run_energy;
consumers["equilibrium"] = &TestConfigReader::equilibrium;
@ -259,6 +261,22 @@ void TestConfigReader::angle_coeff(const yaml_event_t &event)
}
}
void TestConfigReader::improper_style(const yaml_event_t &event)
{
config.improper_style = (char *)event.data.scalar.value;
}
void TestConfigReader::improper_coeff(const yaml_event_t &event)
{
config.improper_coeff.clear();
std::stringstream data((char *)event.data.scalar.value);
std::string line;
while (std::getline(data, line, '\n')) {
config.improper_coeff.push_back(line);
}
}
void TestConfigReader::equilibrium(const yaml_event_t &event)
{
std::stringstream data((char *)event.data.scalar.value);