From d1978dd136917fe198385cf5cae0575c13fb17ad Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 4 Jun 2024 21:57:18 -0400 Subject: [PATCH] support writing data files with PairIJ sections for all generic testers --- unittest/force-styles/test_angle_style.cpp | 3 ++- unittest/force-styles/test_bond_style.cpp | 3 ++- unittest/force-styles/test_dihedral_style.cpp | 3 ++- unittest/force-styles/test_improper_style.cpp | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/unittest/force-styles/test_angle_style.cpp b/unittest/force-styles/test_angle_style.cpp index 010fabd6e2..6e823b32fc 100644 --- a/unittest/force-styles/test_angle_style.cpp +++ b/unittest/force-styles/test_angle_style.cpp @@ -138,8 +138,9 @@ LAMMPS *init_lammps(LAMMPS::argv &args, const TestConfig &cfg, const bool newton } command("run 0 post no"); + command("variable write_data_pair index ii"); command("write_restart " + cfg.basename + ".restart"); - command("write_data " + cfg.basename + ".data"); + command("write_data " + cfg.basename + ".data pair ${write_data_pair}"); command("write_coeff " + cfg.basename + "-coeffs.in"); return lmp; diff --git a/unittest/force-styles/test_bond_style.cpp b/unittest/force-styles/test_bond_style.cpp index 185d28089e..eb6b0b488d 100644 --- a/unittest/force-styles/test_bond_style.cpp +++ b/unittest/force-styles/test_bond_style.cpp @@ -138,8 +138,9 @@ LAMMPS *init_lammps(LAMMPS::argv &args, const TestConfig &cfg, const bool newton } command("run 0 post no"); + command("variable write_data_pair index ii"); command("write_restart " + cfg.basename + ".restart"); - command("write_data " + cfg.basename + ".data nofix"); + command("write_data " + cfg.basename + ".data nofix pair ${write_data_pair}"); command("write_coeff " + cfg.basename + "-coeffs.in"); return lmp; diff --git a/unittest/force-styles/test_dihedral_style.cpp b/unittest/force-styles/test_dihedral_style.cpp index efc37b9e03..060dd040c2 100644 --- a/unittest/force-styles/test_dihedral_style.cpp +++ b/unittest/force-styles/test_dihedral_style.cpp @@ -136,8 +136,9 @@ LAMMPS *init_lammps(LAMMPS::argv &args, const TestConfig &cfg, const bool newton } command("run 0 post no"); + command("variable write_data_pair index ii"); command("write_restart " + cfg.basename + ".restart"); - command("write_data " + cfg.basename + ".data"); + command("write_data " + cfg.basename + ".data pair ${write_data_pair}"); command("write_coeff " + cfg.basename + "-coeffs.in"); return lmp; diff --git a/unittest/force-styles/test_improper_style.cpp b/unittest/force-styles/test_improper_style.cpp index ba3618d3dc..c90d30c21a 100644 --- a/unittest/force-styles/test_improper_style.cpp +++ b/unittest/force-styles/test_improper_style.cpp @@ -138,8 +138,9 @@ LAMMPS *init_lammps(LAMMPS::argv &args, const TestConfig &cfg, const bool newton } command("run 0 post no"); + command("variable write_data_pair index ii"); command("write_restart " + cfg.basename + ".restart"); - command("write_data " + cfg.basename + ".data"); + command("write_data " + cfg.basename + ".data pair ${write_data_pair}"); command("write_coeff " + cfg.basename + "-coeffs.in"); return lmp;