Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support forward files for init_surf #909

Merged
Merged
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
8 changes: 8 additions & 0 deletions dpgen/data/surf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from dpgen import ROOT_PATH
from dpgen.remote.decide_machine import convert_mdata
from dpgen.dispatcher.Dispatcher import make_submission_compat
from dpgen.generator.lib.utils import symlink_user_forward_files
#-----PMG---------
from pymatgen.io.vasp import Poscar
from pymatgen.core import Structure, Element
Expand Down Expand Up @@ -548,6 +549,13 @@ def run_vasp_relax(jdata, mdata):
forward_files = ["POSCAR", "INCAR", "POTCAR"]
backward_files = ["OUTCAR","CONTCAR"]
forward_common_files = []
work_path_list = glob.glob(os.path.join(work_dir, "surf-*"))
task_format = {"fp" : "sys-*"}
for work_path in work_path_list :
symlink_user_forward_files(mdata=mdata, task_type="fp", work_path=work_path, task_format=task_format)
Comment on lines +552 to +555
Copy link
Member

@njzjz njzjz Aug 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not directly set the format as surf-*/sys-*

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because surf-* seems to align with the meaning of work_path.

user_forward_files = mdata.get("fp" + "_user_forward_files", [])
forward_files += [os.path.basename(file) for file in user_forward_files]
backward_files += mdata.get("fp" + "_user_backward_files", [])
#if 'cvasp' in mdata['fp_resources']:
# if mdata['fp_resources']['cvasp']:
# forward_common_files=['cvasp.py']
Expand Down