Skip to content

Commit f2a00a7

Browse files
committed
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
1 parent d5ce577 commit f2a00a7

2 files changed

Lines changed: 22 additions & 7 deletions

File tree

dpgen/auto_test/VASP.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,12 @@ def forward_files(self, property_type="relaxation"):
239239
return ["INCAR", "POSCAR", "KPOINTS", "POTCAR"]
240240

241241
def forward_common_files(self, property_type="relaxation"):
242-
potcar_not_link_list = ["vacancy", "interstitial"]
243-
if property_type == "elastic":
244-
return ["INCAR", "KPOINTS", "POTCAR"]
245-
elif property_type in potcar_not_link_list:
246-
return ["INCAR"]
247-
else:
248-
return ["INCAR", "POTCAR"]
242+
"""Return files shared from the submission's top-level work directory.
243+
244+
VASP inputs are generated inside each property directory and forwarded
245+
through :meth:`forward_files`; none of them live at the submission root.
246+
"""
247+
return []
249248

250249
def backward_files(self, property_type="relaxation"):
251250
return ["OUTCAR", "outlog", "CONTCAR", "OSZICAR", "XDATCAR"]

tests/auto_test/test_vasp.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,19 @@ def compare_dict(dict1, dict2):
160160
def test_backward_files(self):
161161
backward_files = ["OUTCAR", "outlog", "CONTCAR", "OSZICAR", "XDATCAR"]
162162
self.assertEqual(self.VASP.backward_files(), backward_files)
163+
164+
def test_forward_files(self):
165+
self.assertEqual(
166+
["INCAR", "POSCAR", "KPOINTS", "POTCAR"], self.VASP.forward_files()
167+
)
168+
169+
def test_forward_common_files(self):
170+
"""Task-local VASP inputs must not be uploaded from the work root."""
171+
for property_type in [
172+
"relaxation",
173+
"elastic",
174+
"vacancy",
175+
"interstitial",
176+
]:
177+
with self.subTest(property_type=property_type):
178+
self.assertEqual([], self.VASP.forward_common_files(property_type))

0 commit comments

Comments
 (0)