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

args: add shuffle_poscar to run jdata #806

Merged
merged 3 commits into from
Jul 21, 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
2 changes: 2 additions & 0 deletions dpgen/generator/arginfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def model_devi_lmp_args() -> List[Argument]:
doc_model_devi_clean_traj = 'If type of model_devi_clean_traj is bool type then it denote whether to clean traj folders in MD since they are too large. If it is Int type, then the most recent n iterations of traj folders will be retained, others will be removed.'
doc_model_devi_nopbc = 'Assume open boundary condition in MD simulations.'
doc_model_devi_activation_func = 'Set activation functions for models, length of the list should be the same as numb_models, and two elements in the list of string respectively assign activation functions to the embedding and fitting nets within each model. Backward compatibility: the orginal "list of String" format is still supported, where embedding and fitting nets of one model use the same activation function, and the length of the list should be the same as numb_models.'
doc_shuffle_poscar = 'Shuffle atoms of each frame before running simulations. The purpose is to sample the element occupation of alloys.'

return [
model_devi_jobs_args(),
Expand Down Expand Up @@ -159,6 +160,7 @@ def model_devi_lmp_args() -> List[Argument]:
doc=doc_model_devi_nopbc),
Argument("model_devi_activation_func", list, optional=True,
doc=doc_model_devi_activation_func),
Argument("shuffle_poscar", bool, optional=True, default=False, doc=doc_shuffle_poscar),
]


Expand Down
2 changes: 1 addition & 1 deletion dpgen/generator/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ def make_model_devi (iter_index,
sys_configs.append(temp_sys_list)
else:
sys_configs = jdata['sys_configs']
shuffle_poscar = jdata['shuffle_poscar']
shuffle_poscar = jdata.get('shuffle_poscar', False)

if model_devi_engine != 'calypso':
cur_job = model_devi_jobs[iter_index]
Expand Down