Skip to content

Commit

Permalink
add comments to explain the meaning of run_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzyphysics committed Aug 2, 2022
1 parent 2551a69 commit 2dca9e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dpgen/generator/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,9 @@ def make_model_devi (iter_index,
shutil.copyfile(calypso_run_model_devi_file,calypso_run_model_devi_script)
# Create work path list
caly_run_opt_path = []

# mode 1: generate structures according to the user-provided input.dat file,
# so calypso_input_path and model_devi_max_iter are needed
if run_mode == 1:
if jdata.get('vsc', False) and len(jdata.get('type_map')) > 1:
# [input.dat.Li.250, input.dat.Li.300]
Expand All @@ -858,6 +861,8 @@ def make_model_devi (iter_index,
elif not jdata.get('vsc', False):
caly_run_opt_path.append('%s.%03d'%(_calypso_run_opt_path, 0))

# mode 2: control each iteration to generate structures in specific way
# by providing model_devi_jobs key
elif run_mode == 2:
for iiidx, jobbs in enumerate(model_devi_jobs):
if iter_index in jobbs.get('times'):
Expand Down

0 comments on commit 2dca9e6

Please sign in to comment.