DPGEN2 configurations

Op configs

RunDPTrain

init_model_policy:
type: str, optional, default: no
argument path: init_model_policy

The policy of init-model training. It can be

  • ‘no’: No init-model training. Traing from scratch.

  • ‘yes’: Do init-model training.

  • ‘old_data_larger_than:XXX’: Do init-model if the training data size of the previous model is larger than XXX. XXX is an int number.

init_model_old_ratio:
type: float, optional, default: 0.9
argument path: init_model_old_ratio

The frequency ratio of old data over new data

init_model_numb_steps:
type: int, optional, default: 400000, alias: init_model_stop_batch
argument path: init_model_numb_steps

The number of training steps when init-model

init_model_start_lr:
type: float, optional, default: 0.0001
argument path: init_model_start_lr

The start learning rate when init-model

init_model_start_pref_e:
type: float, optional, default: 0.1
argument path: init_model_start_pref_e

The start energy prefactor in loss when init-model

init_model_start_pref_f:
type: int | float, optional, default: 100
argument path: init_model_start_pref_f

The start force prefactor in loss when init-model

init_model_start_pref_v:
type: float, optional, default: 0.0
argument path: init_model_start_pref_v

The start virial prefactor in loss when init-model

RunLmp

command:
type: str, optional, default: lmp
argument path: command

The command of LAMMPS

teacher_model_path:
type: str | BinaryFileInput | NoneType, optional, default: None
argument path: teacher_model_path

The teacher model in Knowledge Distillation

shuffle_models:
type: bool, optional, default: False
argument path: shuffle_models

Randomly pick a model from the group of models to drive theexploration MD simulation

RunVasp

Alloy configs

Task group configs

task_group_configs:
type: dict
argument path: task_group_configs

Depending on the value of type, different sub args are accepted.

type:
type: str (flag key)
argument path: task_group_configs/type

the type of the task group

When type is set to lmp-md (or its alias lmp-npt):

Lammps MD tasks. DPGEN will generate the lammps input script

conf_idx:
type: list, alias: sys_idx
argument path: task_group_configs[lmp-md]/conf_idx

The configurations of configurations[conf_idx] will be used to generate the initial configurations of the tasks. This key provides the index of selected item in the configurations array.

n_sample:
type: NoneType | int, optional, default: None
argument path: task_group_configs[lmp-md]/n_sample

Number of configurations. If this number is smaller than the number of configruations in configruations[conf_idx], then n_sample configruations are randomly sampled from configruations[conf_idx], otherwise all configruations in configruations[conf_idx] will be used. If not provided, all configruations in configruations[conf_idx] will be used.

temps:
type: list, alias: Ts
argument path: task_group_configs[lmp-md]/temps

A list of temperatures in K. Also used to initialize the temperature

press:
type: list, optional, alias: Ps
argument path: task_group_configs[lmp-md]/press

A list of pressures in bar.

ens:
type: str, optional, default: nve, alias: ensemble
argument path: task_group_configs[lmp-md]/ens

The ensemble. Allowd options are ‘nve’, ‘nvt’, ‘npt’, ‘npt-a’, ‘npt-t’. ‘npt-a’ stands for anisotrpic box sampling and ‘npt-t’ stands for triclinic box sampling.

dt:
type: float, optional, default: 0.001
argument path: task_group_configs[lmp-md]/dt

The time step

nsteps:
type: int, optional, default: 100
argument path: task_group_configs[lmp-md]/nsteps

The number of steps

trj_freq:
type: int, optional, default: 10, aliases: t_freq, trj_freq, traj_freq
argument path: task_group_configs[lmp-md]/trj_freq

The number of steps

tau_t:
type: float, optional, default: 0.05
argument path: task_group_configs[lmp-md]/tau_t

The time scale of thermostat

tau_p:
type: float, optional, default: 0.5
argument path: task_group_configs[lmp-md]/tau_p

The time scale of barostat

pka_e:
type: NoneType | float, optional, default: None
argument path: task_group_configs[lmp-md]/pka_e

The energy of primary knock-on atom

neidelay:
type: NoneType | int, optional, default: None
argument path: task_group_configs[lmp-md]/neidelay

The delay of updating the neighbor list

no_pbc:
type: bool, optional, default: False
argument path: task_group_configs[lmp-md]/no_pbc

Not using the periodic boundary condition

use_clusters:
type: bool, optional, default: False
argument path: task_group_configs[lmp-md]/use_clusters

Calculate atomic model deviation

relative_f_epsilon:
type: NoneType | float, optional, default: None
argument path: task_group_configs[lmp-md]/relative_f_epsilon

Calculate relative force model deviation

relative_v_epsilon:
type: NoneType | float, optional, default: None
argument path: task_group_configs[lmp-md]/relative_v_epsilon

Calculate relative virial model deviation

When type is set to lmp-template:

Lammps MD tasks defined by templates. User provide lammps (and plumed) template for lammps tasks. The variables in templates are revised by the revisions key. Notice that the lines for pair style, dump and plumed are reserved for the revision of dpgen2, and the users should not write these lines by themselves. Rather, users notify dpgen2 the poistion of the line for pair_style by writting ‘pair_style deepmd’, the line for dump by writting ‘dump dpgen_dump’. If plumed is used, the line for fix plumed shouldbe written exactly as ‘fix dpgen_plm’.

conf_idx:
type: list, alias: sys_idx
argument path: task_group_configs[lmp-template]/conf_idx

The configurations of configurations[conf_idx] will be used to generate the initial configurations of the tasks. This key provides the index of selected item in the configurations array.

n_sample:
type: NoneType | int, optional, default: None
argument path: task_group_configs[lmp-template]/n_sample

Number of configurations. If this number is smaller than the number of configruations in configruations[conf_idx], then n_sample configruations are randomly sampled from configruations[conf_idx], otherwise all configruations in configruations[conf_idx] will be used. If not provided, all configruations in configruations[conf_idx] will be used.

lmp_template_fname:
type: str, aliases: lmp_template, lmp
argument path: task_group_configs[lmp-template]/lmp_template_fname

The file name of lammps input template

plm_template_fname:
type: str | NoneType, optional, default: None, aliases: plm_template, plm
argument path: task_group_configs[lmp-template]/plm_template_fname

The file name of plumed input template

revisions:
type: dict, optional, default: {}
argument path: task_group_configs[lmp-template]/revisions
traj_freq:
type: int, optional, default: 10, aliases: t_freq, trj_freq, trj_freq
argument path: task_group_configs[lmp-template]/traj_freq

The frequency of dumping configurations and thermodynamic states

When type is set to customized-lmp-template:

Lammps MD tasks defined by user customized shell commands and templates. User provided shell script generates a series of folders, and each folder contains a lammps template task group.

conf_idx:
type: list, alias: sys_idx
argument path: task_group_configs[customized-lmp-template]/conf_idx

The configurations of configurations[conf_idx] will be used to generate the initial configurations of the tasks. This key provides the index of selected item in the configurations array.

n_sample:
type: NoneType | int, optional, default: None
argument path: task_group_configs[customized-lmp-template]/n_sample

Number of configurations. If this number is smaller than the number of configruations in configruations[conf_idx], then n_sample configruations are randomly sampled from configruations[conf_idx], otherwise all configruations in configruations[conf_idx] will be used. If not provided, all configruations in configruations[conf_idx] will be used.

custom_shell_commands:
type: list
argument path: task_group_configs[customized-lmp-template]/custom_shell_commands

Customized shell commands to be run for each configuration. The commands require input_lmp_conf_name as input conf file, input_lmp_tmpl_name and input_plm_tmpl_name as templates, and input_extra_files as extra input files. By running the commands a series folders in pattern output_dir_pattern are supposed to be generated, and each folder is supposed to contain a configuration file output_lmp_conf_name, a lammps template file output_lmp_tmpl_name and a plumed template file output_plm_tmpl_name.

revisions:
type: dict, optional, default: {}
argument path: task_group_configs[customized-lmp-template]/revisions

The revisions. Should be a dict providing the key - list of desired values pair. Key is the word to be replaced in the templates, and it may appear in both the lammps and plumed input templates. All values in the value list will be enmerated.

traj_freq:
type: int, optional, default: 10, aliases: t_freq, trj_freq, trj_freq
argument path: task_group_configs[customized-lmp-template]/traj_freq

The frequency of dumping configurations and thermodynamic states

input_lmp_conf_name:
type: str, optional, default: conf.lmp
argument path: task_group_configs[customized-lmp-template]/input_lmp_conf_name

Input conf file name for the shell commands.

input_lmp_tmpl_name:
type: str, optional, default: in.lammps, aliases: lmp_template, lmp
argument path: task_group_configs[customized-lmp-template]/input_lmp_tmpl_name

The file name of lammps input template

input_plm_tmpl_name:
type: str | NoneType, optional, default: None, aliases: plm_template, plm
argument path: task_group_configs[customized-lmp-template]/input_plm_tmpl_name

The file name of plumed input template

input_extra_files:
type: list, optional, default: []
argument path: task_group_configs[customized-lmp-template]/input_extra_files

Extra files that may be needed to execute the shell commands

output_dir_pattern:
type: str | list, optional, default: *
argument path: task_group_configs[customized-lmp-template]/output_dir_pattern

Pattern of resultant folders generated by the shell commands.

output_lmp_conf_name:
type: str, optional, default: conf.lmp
argument path: task_group_configs[customized-lmp-template]/output_lmp_conf_name

Generated conf file name.

output_lmp_tmpl_name:
type: str, optional, default: in.lammps
argument path: task_group_configs[customized-lmp-template]/output_lmp_tmpl_name

Generated lmp input file name.

output_plm_tmpl_name:
type: str, optional, default: input.plumed
argument path: task_group_configs[customized-lmp-template]/output_plm_tmpl_name

Generated plm input file name.

Step configs

template_config:
type: dict, optional, default: {'image': 'dptechnology/dpgen2:latest'}
argument path: template_config

The configs passed to the PythonOPTemplate.

image:
type: str, optional, default: dptechnology/dpgen2:latest
argument path: template_config/image

The image to run the step.

timeout:
type: NoneType | int, optional, default: None
argument path: template_config/timeout

The time limit of the OP. Unit is second.

retry_on_transient_error:
type: NoneType | int, optional, default: None
argument path: template_config/retry_on_transient_error

The number of retry times if a TransientError is raised.

timeout_as_transient_error:
type: bool, optional, default: False
argument path: template_config/timeout_as_transient_error

Treat the timeout as TransientError.

envs:
type: dict | NoneType, optional, default: None
argument path: template_config/envs

The environmental variables.

template_slice_config:
type: dict, optional
argument path: template_slice_config

The configs passed to the Slices.

group_size:
type: NoneType | int, optional, default: None
argument path: template_slice_config/group_size

The number of tasks running on a single node. It is efficient for a large number of short tasks.

pool_size:
type: NoneType | int, optional, default: None
argument path: template_slice_config/pool_size

The number of tasks running at the same time on one node.

continue_on_failed:
type: bool, optional, default: False
argument path: continue_on_failed

If continue the the step is failed (FatalError, TransientError, A certain number of retrial is reached…).

continue_on_num_success:
type: NoneType | int, optional, default: None
argument path: continue_on_num_success

Only in the sliced OP case. Continue the workflow if a certain number of the sliced jobs are successful.

continue_on_success_ratio:
type: NoneType | float, optional, default: None
argument path: continue_on_success_ratio

Only in the sliced OP case. Continue the workflow if a certain ratio of the sliced jobs are successful.

parallelism:
type: NoneType | int, optional, default: None
argument path: parallelism

The parallelism for the step

executor:
type: dict | NoneType, optional, default: None
argument path: executor

The executor of the step.

Depending on the value of type, different sub args are accepted.

type:
type: str (flag key)
argument path: executor/type
possible choices: dispatcher

The type of the executor.

When type is set to dispatcher: