fix bug in lammps_reset_box() no-box check and error out when atoms exist

This commit is contained in:
Axel Kohlmeyer
2021-05-13 12:40:33 -04:00
parent 36de1c4201
commit 0f7a41590d
2 changed files with 12 additions and 5 deletions

View File

@ -161,6 +161,8 @@ TEST_F(LibraryProperties, box)
boxhi[1] = 7.3;
xy = 0.1;
if (!verbose) ::testing::internal::CaptureStdout();
// lammps_reset_box() may only be called without atoms
lammps_command(lmp, "delete_atoms group all bond yes");
lammps_reset_box(lmp, boxlo, boxhi, xy, yz, xz);
if (!verbose) ::testing::internal::GetCapturedStdout();
lammps_extract_box(lmp, boxlo, boxhi, &xy, &yz, &xz, pflags, &boxflag);