Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions dpgen/auto_test/VASP.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
16 changes: 16 additions & 0 deletions tests/auto_test/test_vasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))