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

fix post_fp_vasp and make_fp_configs for simplify #803

Merged
merged 4 commits into from
Jul 19, 2022
Merged
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: 7 additions & 6 deletions dpgen/generator/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -3137,12 +3137,13 @@ def post_fp_vasp (iter_index,
else:
all_sys.append(_sys)
# save ele_temp, if any
with open(oo.replace('OUTCAR', 'job.json')) as fp:
job_data = json.load(fp)
if 'ele_temp' in job_data:
assert(use_ele_temp)
ele_temp = job_data['ele_temp']
all_te.append(ele_temp)
if(os.path.exists(oo.replace('OUTCAR', 'job.json')) ):
with open(oo.replace('OUTCAR', 'job.json')) as fp:
job_data = json.load(fp)
if 'ele_temp' in job_data:
assert(use_ele_temp)
ele_temp = job_data['ele_temp']
all_te.append(ele_temp)
else:
icount+=1
all_te = np.array(all_te)
Expand Down
4 changes: 3 additions & 1 deletion dpgen/simplify/simplify.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,16 @@ def make_fp_configs(iter_index, jdata):
create_path(work_path)
picked_data_path = os.path.join(iter_name, model_devi_name, picked_data_name)
systems = get_multi_system(picked_data_path, jdata)
ii = 0
jj = 0
for system in systems:
for subsys in system:
task_name = "task." + fp_task_fmt % (0, jj)
task_name = "task." + fp_task_fmt % (ii, jj)
Copy link
Member

Choose a reason for hiding this comment

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

Instead, I suggest using MultiSystems to append systems, like what dpgen2 does, so there will be no errors to add different systems.
https://github.com/deepmodeling/dpgen2/blob/008d1dfe91f3628a7039dca5d3af10c1b4bca506/dpgen2/op/collect_data.py#L67-L73

task_path = os.path.join(work_path, task_name)
create_path(task_path)
subsys.to('vasp/poscar', os.path.join(task_path, 'POSCAR'))
jj += 1
ii += 1


def make_fp_gaussian(iter_index, jdata):
Expand Down