Skip to content

Commit 36a3611

Browse files
committed
fix: parse Gromacs frames for bad-box checks
Fixes #1905 Coding-Agent: Codex Codex-Version: codex-cli 0.149.0 Model: gpt-5.6-sol Reasoning-Effort: xhigh
1 parent d5ce577 commit 36a3611

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

dpgen/generator/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2973,7 +2973,7 @@ def _trust_limitation_check(sys_idx, lim):
29732973
ffmt = "lammps/dump"
29742974
elif model_devi_engine == "gromacs":
29752975
conf_name = os.path.join(conf_name, str(ii) + ".gromacstrj")
2976-
ffmt = "lammps/dump"
2976+
ffmt = "gromacs/gro"
29772977
elif model_devi_engine == "amber":
29782978
conf_name = os.path.join(tt, "rc.nc")
29792979
rst_name = os.path.abspath(os.path.join(tt, "init.rst7"))

tests/generator/test_check_bad_box.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@ def test_height_ratio(self):
2323
conf_bad = os.path.join(dirname, "check_bad_box", "bad.height.POSCAR")
2424
self.assertTrue(check_bad_box(conf_bad, "height_ratio:5", fmt="vasp/POSCAR"))
2525
self.assertFalse(check_bad_box(conf_bad, "length_ratio:5", fmt="vasp/POSCAR"))
26+
27+
def test_gromacs_frame_format(self):
28+
dirname = os.path.dirname(__file__)
29+
conf = os.path.join(dirname, "gromacs", "outputs", "traj", "0.gromacstrj")
30+
self.assertFalse(check_bad_box(conf, "length_ratio:5", fmt="gromacs/gro"))

0 commit comments

Comments
 (0)