From f2a00a754694e1f62297cff0272dc84ba5ddda6a Mon Sep 17 00:00:00 2001 From: njzjz-bot Date: Mon, 24 Aug 2026 04:27:56 +0800 Subject: [PATCH] fix: avoid forwarding root-level VASP inputs Coding-Agent: Codex Codex-Version: codex-cli 0.149.0 Model: gpt-5.6-sol Reasoning-Effort: xhigh --- dpgen/auto_test/VASP.py | 13 ++++++------- tests/auto_test/test_vasp.py | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/dpgen/auto_test/VASP.py b/dpgen/auto_test/VASP.py index 72376da4b..5d14878ca 100644 --- a/dpgen/auto_test/VASP.py +++ b/dpgen/auto_test/VASP.py @@ -239,13 +239,12 @@ def forward_files(self, property_type="relaxation"): return ["INCAR", "POSCAR", "KPOINTS", "POTCAR"] def forward_common_files(self, property_type="relaxation"): - potcar_not_link_list = ["vacancy", "interstitial"] - if property_type == "elastic": - return ["INCAR", "KPOINTS", "POTCAR"] - elif property_type in potcar_not_link_list: - return ["INCAR"] - else: - return ["INCAR", "POTCAR"] + """Return files shared from the submission's top-level work directory. + + VASP inputs are generated inside each property directory and forwarded + through :meth:`forward_files`; none of them live at the submission root. + """ + return [] def backward_files(self, property_type="relaxation"): return ["OUTCAR", "outlog", "CONTCAR", "OSZICAR", "XDATCAR"] diff --git a/tests/auto_test/test_vasp.py b/tests/auto_test/test_vasp.py index ae458b393..05263736e 100644 --- a/tests/auto_test/test_vasp.py +++ b/tests/auto_test/test_vasp.py @@ -160,3 +160,19 @@ def compare_dict(dict1, dict2): def test_backward_files(self): backward_files = ["OUTCAR", "outlog", "CONTCAR", "OSZICAR", "XDATCAR"] self.assertEqual(self.VASP.backward_files(), backward_files) + + def test_forward_files(self): + self.assertEqual( + ["INCAR", "POSCAR", "KPOINTS", "POTCAR"], self.VASP.forward_files() + ) + + def test_forward_common_files(self): + """Task-local VASP inputs must not be uploaded from the work root.""" + for property_type in [ + "relaxation", + "elastic", + "vacancy", + "interstitial", + ]: + with self.subTest(property_type=property_type): + self.assertEqual([], self.VASP.forward_common_files(property_type))