Skip to content

add arguments for lammps revise_template #1015

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

Merged
merged 11 commits into from
Nov 11, 2022
35 changes: 32 additions & 3 deletions dpgen/generator/arginfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,30 @@ def training_args() -> List[Argument]:


# Exploration
def model_devi_jobs_template_args() -> List[Argument]:
doc_template = 'Give a template for 01.model_devi.'
doc_template_lmp = 'The path to input.lammps template'
doc_template_plm = 'The path to input.plumed template'

args = [
Argument("lmp", str, optional=True, doc=doc_template_lmp),
Argument("plm", str, optional=True, doc=doc_template_plm),
]
return Argument("template", list, args, [], optional=True, repeat=True, doc=doc_template)


def model_devi_jobs_rev_mat_args() -> List[Argument]:
doc_rev_mat = '' # looking forward to update
doc_rev_mat_lmp = '' # looking forward to update
doc_rev_mat_plm = '' # looking forward to update

args = [
Argument("lmp", dict, optional=True, doc=doc_rev_mat_lmp),
Argument("plm", dict, optional=True, doc=doc_rev_mat_plm),
]
return Argument("rev_mat", dict, args, [], optional=True, repeat=True, doc=doc_rev_mat)


def model_devi_jobs_args() -> List[Argument]:
# this may be not correct
doc_sys_idx = 'Systems to be selected as the initial structure of MD and be explored. The index corresponds exactly to the sys_configs.'
Expand All @@ -118,8 +142,10 @@ def model_devi_jobs_args() -> List[Argument]:
doc_model_devi_v_trust_hi = 'Upper bound of virial for the selection. If dict, should be set for each index in sys_idx, respectively. Should be used with DeePMD-kit v2.x.'

args = [
model_devi_jobs_template_args(),
model_devi_jobs_rev_mat_args(),
Argument("sys_idx", list, optional=False, doc=doc_sys_idx),
Argument("temps", list, optional=False, doc=doc_temps),
Argument("temps", list, optional=True, doc=doc_temps),
Argument("press", list, optional=True, doc=doc_press),
Argument("trj_freq", int, optional=False, doc=doc_trj_freq),
Argument("nsteps", int, optional=False, doc=doc_nsteps),
Expand Down Expand Up @@ -160,6 +186,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_merge_traj = 'If model_devi_merge_traj is set as True, only all.lammpstrj will be generated, instead of lots of small traj files.'
doc_model_devi_nopbc = 'Assume open boundary condition in MD simulations.'
doc_model_devi_plumed = '' # looking forward to update
Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually, I'm not sure if this parameter is functional at all. Because to run model_devi with plumed, we use "template", which is a completely independent setting and is not at all affected by this parameter.

doc_shuffle_poscar = 'Shuffle atoms of each frame before running simulations. The purpose is to sample the element occupation of alloys.'
doc_use_relative = 'Calculate relative force model deviation.'
doc_epsilon = 'The level parameter for computing the relative force model deviation.'
Expand Down Expand Up @@ -194,10 +221,12 @@ def model_devi_lmp_args() -> List[Argument]:
doc=doc_model_devi_f_avg_relative),
Argument("model_devi_clean_traj", [
bool, int], optional=True, default=True , doc=doc_model_devi_clean_traj),
Argument("model_devi_merge_traj", [
bool], optional=True, default=False , doc=doc_model_devi_merge_traj),
Argument("model_devi_merge_traj",
bool, optional=True, default=False , doc=doc_model_devi_merge_traj),
Argument("model_devi_nopbc", bool, optional=True, default=False,
doc=doc_model_devi_nopbc),
Argument("model_devi_plumed",
bool, optional=True, default=False , doc=doc_model_devi_plumed),
Argument("shuffle_poscar", bool, optional=True, default=False, doc=doc_shuffle_poscar),
Argument("use_relative", bool, optional=True, default=False, doc=doc_use_relative),
Argument("epsilon", float, optional=True, doc=doc_epsilon),
Expand Down