diff --git a/doc/index.rst b/doc/index.rst index aaf253448..3d67e1139 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -2,13 +2,50 @@ DPGEN's documentation ========================== -.. _parameters:: +.. _overview:: .. toctree:: :maxdepth: 2 - :caption: Parameters + :caption: Overview + + +.. _installation:: +.. toctree:: + :maxdepth: 2 + :caption: Installation + + +.. _run:: + +.. toctree:: + :maxdepth: 2 + :caption: Run + + run/run-process.rst + run/param.rst run-mdata.rst + +.. _init:: + +.. toctree:: + :maxdepth: 2 + :caption: Init + + +.. _autotest:: + +.. toctree:: + :maxdepth: 2 + :caption: Autotest + + +.. _simplify:: + +.. toctree:: + :maxdepth: 2 + :caption: Simplify + .. _tutorial: diff --git a/doc/run/example-of-machine.md b/doc/run/example-of-machine.md new file mode 100644 index 000000000..569f85026 --- /dev/null +++ b/doc/run/example-of-machine.md @@ -0,0 +1,118 @@ +# Example of machine.json + +## DPDispatcher Update Note + +DPDispatcher has updated and the api of machine.json is changed. DP-GEN will use the new DPDispatcher if the value of key "api_version" in machine.json is equal to or large than 1.0. And for now, DPDispatcher is maintained on a separate repo (https://github.com/deepmodeling/dpdispatcher). Please check the documents (https://deepmd.readthedocs.io/projects/dpdispatcher/en/latest/) for more information about the new DPDispatcher. + +DP-GEN will use the old DPDispatcher if the key "api_version" is not specified in machine.json or the "api_version" is smaller than 1.0. This gurantees that the old machine.json still works. + +## New DPDispatcher + +Each iteration in the run process of DP-GEN is composed of three steps: exploration, labeling, and training. Accordingly, machine.json is composed of three parts: train, model_devi, and fp. Each part is a list of dicts. Each dict can be considered as an independent environment for calculation. + +In this section, we will show you how to perform train task at a local workstation, model_devi task at a local Slurm cluster, and fp task at a remote PBS cluster using the new DPDispatcher. For each task, three types of keys are needed: +- Command: provides the command used to execute each step. +- Machine: specifies the machine environment (local workstation, local or remote cluster, or cloud server). +- Resources: specify the number of groups, nodes, CPU, and GPU; enable the virtual environment. + +### Performing train task at a local workstation + +In this example, we perform the `train` task on a local workstation. + +```json +"train": [ + { + "command": "dp", + "machine": { + "batch_type": "Shell", + "context_type": "local", + "local_root": "./", + "remote_root": "/home/user1234/work_path" + }, + "resources": { + "number_node": 1, + "cpu_per_node": 4, + "gpu_per_node": 1, + "group_size": 1, + "source_list": ["/home/user1234/deepmd.env"] + } + } + ], +``` + +The "command" for the train task in the DeePMD-kit is "dp". + +In machine parameters, "batch_type" specifies the type of job scheduling system. If there is no job scheduling system, we can use the "Shell" to perform the task. "context_type" specifies the method of data transfer, and "local" means copying and moving data via local file storage systems (e.g. cp, mv, etc.). In DP-GEN, the paths of all tasks are automatically located and set by the software, and therefore "local_root" is always set to "./". The input file for each task will be sent to the "remote_root" and the task will be performed there, so we need to make sure that the path exists. + +In the resources parameter, "number_node", "cpu_per_node", and "gpu_per_node" specify the number of nodes, the number of CPUs, and the number of GPUs required for a task respectively. "group_size", which needs to be highlighted, specifies how many tasks will be packed into a group. In the training tasks, we need to train 4 models. If we only have one GPU, we can set the "group_size" to 4. If "group_size" is set to 1, 4 models will be trained on one GPU at the same time, as there is no job scheduling system. Finally, the environment variables can be activated by "source_list". In this example, "source /home/user1234/deepmd.env" is executed before "dp" to load the environment variables necessary to perform the training task. + +### Perform model_devi task at a local Slurm cluster + +In this example, we perform the model_devi task at a local Slurm workstation. + +```json +"model_devi": [ + { + "command": "lmp", + "machine": { + "context_type": "local", + "batch_type": "Slurm", + "local_root": "./", + "remote_root": "/home/user1234/work_path" + }, + "resources": { + "number_node": 1, + "cpu_per_node": 4, + "gpu_per_node": 1, + "queue_name": "QueueGPU", + "custom_flags" : ["#SBATCH --mem=32G"], + "group_size": 10, + "source_list": ["/home/user1234/lammps.env"] + } + } +], +``` + +The "command" for the model_devi task in the LAMMPS is "lmp". + +In the machine parameter, we specify the type of job scheduling system by changing the "batch_type" to "Slurm". + +In the resources parameter, we specify the name of the queue to which the task is submitted by adding "queue_name". We can add additional lines to the calculation script via the "custom_flags". In the model_devi steps, there are frequently many short tasks, so we usually pack multiple tasks (e.g. 10) into a group for submission. Other parameters are similar to that of the local workstation. + +### Perform fp task in a remote PBS cluster + +In this example, we perform the fp task at a remote PBS cluster that can be accessed via SSH. + +```json +"fp": [ + { + "command": "mpirun -n 32 vasp_std", + "machine": { + "context_type": "SSHContext", + "batch_type": "PBS", + "local_root": "./", + "remote_root": "/home/user1234/work_path", + "remote_profile": { + "hostname": "39.xxx.xx.xx", + "username": "user1234" + } + }, + "resources": { + "number_node": 1, + "cpu_per_node": 32, + "gpu_per_node": 0, + "queue_name": "QueueCPU", + "group_size": 5, + "source_list": ["/home/user1234/vasp.env"] + } + } +], +``` + +VASP code is used for fp task and mpi is used for parallel computing, so "mpirun -n 32" is added to specify the number of parallel threads. + +In the machine parameter, "context_type" is modified to "SSHContext" and "batch_type" is modified to "PBS". It is worth noting that "remote_root" should be set to an accessible path on the remote PBS cluster. "remote_profile" is added to specify the information used to connect the remote cluster, including hostname, username, port, etc. + +In the resources parameter, we set "gpu_per_node" to 0 since it is cost-effective to use the CPU for VASP calculations. + +Explicit descriptions of keys in machine.json will be given in the following section. diff --git a/doc/run/example-of-param.md b/doc/run/example-of-param.md new file mode 100644 index 000000000..0490d971f --- /dev/null +++ b/doc/run/example-of-param.md @@ -0,0 +1,128 @@ +# Example-of-param.json + +We have provided different examples of param.json in dpgen/examples/run/. In this section, we give a description of the param.json, taking dpgen/examples/run/dp2.x-lammps-vasp/param_CH4_deepmd-kit-2.0.1.json as an example. This is a param.json for a gas-phase methane molecule. Here, DeePMD-kit (v2.x), LAMMPS and VASP codes are used for training, exploration and labeling respectively. + +## basics + +The basics related keys in param.json are given as follows + +```json + "type_map": [ + "H", + "C" + ], + "mass_map": [ + 1, + 12 + ], +``` + +The basics related keys specify the basic information about the system. "type_map" gives the atom types, i.e. "H" and "C". "mass_map" gives the standard atom weights, i.e. "1" and "12". + +## data + +The data related keys in param.json are given as follows + +```json + "init_data_prefix": "....../init/", + "init_data_sys": [ + "CH4.POSCAR.01x01x01/02.md/sys-0004-0001/deepmd" + ], + + "sys_configs_prefix": "....../init/", + "sys_configs": [ + [ + "CH4.POSCAR.01x01x01/01.scale_pert/sys-0004-0001/scale*/00000*/POSCAR" + ], + [ + "CH4.POSCAR.01x01x01/01.scale_pert/sys-0004-0001/scale*/00001*/POSCAR" + ] + ], +``` + +The data related keys specify the init data for training initial DP models and structures used for model_devi calculations. "init_data_prefix" and "init_data_sys" specify the location of the init data. "sys_configs_prefix" and "sys_configs" specify the location of the structures. + +Here, the init data is provided at "...... /init/CH4.POSCAR.01x01x01/02.md/sys-0004-0001/deepmd". These structures are divided into two groups and provided at "....../init/CH4.POSCAR.01x01x01/01.scale_pert/sys-0004-0001/scale*/00000*/POSCAR" and "....../init/CH4.POSCAR.01x01x01/01.scale_pert/sys-0004-0001/scale*/00001*/POSCAR". + +## training + +The training related keys in param.json are given as follows + +```json + "numb_models": 4, + "train_param": "input.json", + "default_training_param": { + }, +``` +The training related keys specify the details of training tasks. "numb_models" specifies the number of models to be trained. "default_training_param" specifies the training parameters for `deepmd-kit`. + +Here, 4 DP models will be trained in `00.train`. A detailed explanation of training parameters can be found in DeePMD-kit’s documentation (https://docs.deepmodeling.com/projects/deepmd/en/master/). + +## exploration + +The exploration related keys in param.json are given as follows + +```json + "model_devi_dt": 0.002, + "model_devi_skip": 0, + "model_devi_f_trust_lo": 0.05, + "model_devi_f_trust_hi": 0.15, + "model_devi_clean_traj": true, + "model_devi_jobs": [ + { + "sys_idx": [ + 0 + ], + "temps": [ + 100 + ], + "press": [ + 1.0 + ], + "trj_freq": 10, + "nsteps": 300, + "ensemble": "nvt", + "_idx": "00" + }, + { + "sys_idx": [ + 1 + ], + "temps": [ + 100 + ], + "press": [ + 1.0 + ], + "trj_freq": 10, + "nsteps": 3000, + "ensemble": "nvt", + "_idx": "01" + } + ], +``` +The exploration related keys specify the details of exploration tasks. "model_devi_dt" specifies timestep for MD simulation. "model_devi_skip" specifies the number of structures skipped for saving in each MD. "model_devi_f_trust_lo" and "model_devi_f_trust_hi" specify the lower and upper bound of model_devi of forces for the selection. "model_devi_clean_traj" specifies whether to clean traj folders in MD. If type of model_devi_clean_traj is boolean type then it denote whether to clean traj folders in MD since they are too large.In "model_devi_jobs", "sys_idx" specifies the group of structures used for model_devi calculations, "temps" specifies the temperature (K) in MD, "press" specifies the pressure (Bar) in MD, "trj_freq" specifies the frequency of trajectory saved in MD, "nsteps" specifies the running steps of MD, "ensemble" specifies the ensemble used in MD, and "_idx" specifies the index of iteration. + +Here, MD simulations are performed at the temperature of 100 K and the pressure of 1.0 Bar with an integrator time of 2 fs under the nvt ensemble. Two iterations are set in "model_devi_jobs". MD simulations are run for 300 and 3000 time steps with the first and second groups of structures in "sys_configs" in 00 and 01 iterations. We choose to save all structures generated in MD simulations and have set `"trj_freq"` as 10, so 30 and 300 structures are saved in 00 and 01 iterations. If the "max_devi_f" of saved structure falls between 0.05 and 0.15, DP-GEN will treat the structure as a candidate. We choose to clean traj folders in MD since they are too large. If you want to save the most recent n iterations of traj folders, you can set "model_devi_clean_traj" to be an integer. + +## labeling + +The labeling related keys in param.json are given as follows + +```json + "fp_style": "vasp", + "shuffle_poscar": false, + "fp_task_max": 20, + "fp_task_min": 1, + "fp_pp_path": "....../methane/", + "fp_pp_files": [ + "POTCAR" + ], + "fp_incar": "....../INCAR_methane" +``` + +The labeling related keys specify the details of labeling tasks. "fp_style" specifies software for First Principles. "fp_task_max" and "fp_task_min" specify the minimum and maximum of structures to be calculated in `02.fp` of each iteration. "fp_pp_path" and "fp_pp_files" specify the location of the psuedo-potential file to be used for 02.fp. "fp_incar" specifies input file for VASP. INCAR must specify KSPACING and KGAMMA. + +Here, a minimum of 1 and a maximum of 20 structures will be labeled using the VASP code with the INCAR provided at "....../INCAR_methane" and POTCAR provided at "....../methane/POTCAR" in each iteration. Note that the order of elements in POTCAR should correspond to the order in `type_map`. + +All the keys of the DP-GEN are explained in detail in the section Parameters. diff --git a/doc/run/overview-of-the-run-process.md b/doc/run/overview-of-the-run-process.md new file mode 100644 index 000000000..478cc0e27 --- /dev/null +++ b/doc/run/overview-of-the-run-process.md @@ -0,0 +1,65 @@ +# Overview of the Run process + +The run process contains a series of successive iterations, undertaken in order such as heating the system to certain temperatures. Each iteration is composed of three steps: exploration, labeling, and training. Accordingly, there are three sub-folders: 00.train, 01.model_devi, and 02.fp in each iteration. + +00.train: DP-GEN will train several (default 4) models based on initial and generated data. The only difference between these models is the random seed for neural network initialization. + +01.model_devi : represent for model-deviation. DP-GEN will use models obtained from 00.train to run Molecular Dynamics(default LAMMPS). Larger deviation for structure properties (default is the force of atoms) means less accuracy of the models. Using this criterion, a few structures will be selected and put into the next stage 02.fp for more accurate calculation based on First Principles. + +02.fp : Selected structures will be calculated by first-principles methods(default VASP). DP-GEN will obtain some new data and put them together with initial data and data generated in previous iterations. After that, new training will be set up and DP-GEN will enter the next iteration! + +In the run process of the DP-GEN, we need to specify the basic information about the system, the initial data, and details of the training, exploration, and labeling tasks. In addition, we need to specify the software, machine environment, and computing resource and enable the process of job generation, submission, query, and collection automatically. We can perform the run process as we expect by specifying the keywords in param.json and machine.json, and they will be introduced in detail in the following sections. + +Here, we give a general description of the run process. We can execute the run process of DP-GEN easily by: + +```sh +dpgen run param.json machine.json +``` + +The following files or folders will be created and upgraded by codes: + +- iter.00000x contains the main results that DP-GEN generates in the first iteration. +- record.dpgen records the current stage of the run process. +- dpgen.log includes time and iteration information. + +When the first iteration is completed, the folder structure of iter.000000 is like this: + +```sh +$ ls iter.000000 +00.train 01.model_devi 02.fp +``` + +In folder iter.000000/ 00.train: + +- Folder 00x contains the input and output files of the DeePMD-kit, in which a model is trained. +- graph.00x.pb is the model DeePMD-kit generates. The only difference between these models is the random seed for neural network initialization. + +In folder iter.000000/ 01.model_devi: + +- Folder confs contains the initial configurations for LAMMPS MD converted from POSCAR you set in "sys_configs" of param.json. +- Folder task.000.00000x contains the input and output files of the LAMMPS. In folder task.000.00000x, file model_devi.out records the model deviation of concerned labels, energy and force in MD. It serves as the criterion for selecting which structures and doing first-principle calculations. + +In folder iter.000000/ 02.fp: + +- candidate.shuffle.000.out records which structures will be selected from last step 01.model_devi. There are always far more candidates than the maximum you expect to calculate at one time. In this condition, DP-GEN will randomly choose up to `"fp_task_max"` structures and form the folder task.*. +- rest_accurate.shuffle.000.out records the other structures where our model is accurate ("max_devi_f" is less than `"model_devi_f_trust_lo"`, no need to calculate any more), +- rest_failed.shuffled.000.out records the other structures where our model is too inaccurate (larger than `"model_devi_f_trust_hi"`, there may be some error). +- data.000: After first-principle calculations, DP-GEN will collect these data and change them into the format DeePMD-kit needs. In the next iteration's 00.train, these data will be trained together as well as the initial data. + +DP-GEN identifies the stage of the run process by a record file, record.dpgen, which will be created and upgraded by codes. Each line contains two numbers: the first is the index of iteration, and the second, ranging from 0 to 9, records which stage in each iteration is currently running. + +| Index of iterations | Stage in eachiteration | Process | +|:---------------------|:----------------------------|:-----------------| +| 0 | 0 | make_train | +| 0 | 1 | run_train | +| 0 | 2 | post_train | +| 0 | 3 | make_model_devi | +| 0 | 4 | run_model_devi | +| 0 | 5 | post_model_devi | +| 0 | 6 | make_fp | +| 0 | 7 | run_fp | +| 0 | 8 | post_fp | + +0,1,2 correspond to make_train, run_train, post_train. DP-GEN will write scripts in make_train, run the task by specific machine in run_train and collect result in post_train. The records for model_devi and fp stage follow similar rules. + +If the process of DP-GEN stops for some reasons, DP-GEN will automatically recover the main process by record.dpgen. You may also change it manually for your purpose, such as removing the last iterations and recovering from one checkpoint. diff --git a/doc/run/param.rst b/doc/run/param.rst new file mode 100644 index 000000000..749c4e956 --- /dev/null +++ b/doc/run/param.rst @@ -0,0 +1,446 @@ +============================= +dpgen run param parameters +============================= + +type_map: + | type: ``list`` + | argument path: ``type_map`` + + Atom types. + +mass_map: + | type: ``list`` + | argument path: ``mass_map`` + + Standard atom weights. + +use_ele_temp: + | type: ``int`` + | argument path: ``use_ele_temp`` + + Currently only support fp_style vasp. + + - 0: no electron temperature. + + - 1: eletron temperature as frame parameter. + + - 2: electron temperature as atom parameter. + +init_data_prefix: + | type: ``str``, optional + | argument path: ``init_data_prefix`` + + Prefix of initial data directories. + +init_data_prefix: + | type: ``list`` + | argument path: ``init_data_prefix`` + + Directories of initial data. You may use either absolute or relative path here. + +sys_format: + | type: ``str`` + | argument path: ``sys_format`` + + Format of initial data. It will be vasp/poscar if not set. + +init_multi_systems: + | type: ``bool``, optional + | argument path: ``init_multi_systems`` + + If set to true, init_data_sys directories should contain sub-directories of various systems. DP-GEN will regard all of these sub-directories as inital data systems. + +init_batch_size: + | type: ``str``, optional + | argument path: ``init_batch_size`` + + Each number is the batch_size of corresponding system for training in init_data_sys. One recommended rule for setting the sys_batch_size and init_batch_size is that batch_size mutiply number of atoms ot the stucture should be larger than 32. If set to auto, batch size will be 32 divided by number of atoms. + +sys_configs_prefix: + | type: ``str``, optional + | argument path: ``sys_configs_prefix`` + + Prefix of sys_configs. + +sys_configs: + | type: ``str`` + | argument path: ``sys_configs`` + + Containing directories of structures to be explored in iterations.Wildcard characters are supported here. + +sys_batch_size: + | type: ``list``, optional + | argument path: ``sys_batch_size`` + + Each number is the batch_size for training of corresponding system in sys_configs. If set to auto, batch size will be 32 divided by number of atoms. + +numb_models: + | type: ``int`` + | argument path: ``numb_models`` + + Number of models to be trained in 00.train. 4 is recommend. + +training_iter0_model_path: + | type: ``list``, optional + | argument path: ``training_iter0_model_path`` + + The model used to init the first iter training. Number of element should be equal to numb_models. + +training_init_model: + | type: ``bool``, optional + | argument path: ``training_init_model`` + + Iteration > 0, the model parameters will be initilized from the model trained at the previous iteration. Iteration == 0, the model parameters will be initialized from training_iter0_model_path. + +default_training_param: + | type: ``dict`` + | argument path: ``default_training_param`` + + Training parameters for deepmd-kit in 00.train. You can find instructions from here: (https://github.com/deepmodeling/deepmd-kit). + +dp_compress: + | type: ``bool``, optional, default: ``False`` + | argument path: ``dp_compress`` + + Use dp compress to compress the model. + +model_devi_dt: + | type: ``float`` + | argument path: ``model_devi_dt`` + + Timestep for MD. 0.002 is recommend. + +model_devi_skip: + | type: ``int`` + | argument path: ``model_devi_skip`` + + Number of structures skipped for fp in each MD. + +model_devi_f_trust_lo: + | type: ``list`` | ``float`` + | argument path: ``model_devi_f_trust_lo`` + + Lower bound of forces for the selection. If list, should be set for each index in sys_configs, respectively. + +model_devi_f_trust_hi: + | type: ``list`` | ``float`` + | argument path: ``model_devi_f_trust_hi`` + + Upper bound of forces for the selection. If list, should be set for each index in sys_configs, respectively. + +model_devi_v_trust_lo: + | type: ``list`` | ``float`` + | argument path: ``model_devi_v_trust_lo`` + + Lower bound of virial for the selection. If list, should be set for each index in sys_configs, respectively. Should be used with DeePMD-kit v2.x. + +model_devi_v_trust_hi: + | type: ``list`` | ``float`` + | argument path: ``model_devi_v_trust_hi`` + + Upper bound of virial for the selection. If list, should be set for each index in sys_configs, respectively. Should be used with DeePMD-kit v2.x. + +model_devi_adapt_trust_lo: + | type: ``bool``, optional + | argument path: ``model_devi_adapt_trust_lo`` + + Adaptively determines the lower trust levels of force and virial. This option should be used together with model_devi_numb_candi_f, model_devi_numb_candi_v and optionally with model_devi_perc_candi_f and model_devi_perc_candi_v. dpgen will make two sets: + + - 1. From the frames with force model deviation lower than model_devi_f_trust_hi, select max(model_devi_numb_candi_f, model_devi_perc_candi_f*n_frames) frames with largest force model deviation. + + - 2. From the frames with virial model deviation lower than model_devi_v_trust_hi, select max(model_devi_numb_candi_v, model_devi_perc_candi_v*n_frames) frames with largest virial model deviation. + + The union of the two sets is made as candidate dataset. + +model_devi_numb_candi_f: + | type: ``int``, optional + | argument path: ``model_devi_numb_candi_f`` + + See model_devi_adapt_trust_lo. + +model_devi_numb_candi_v: + | type: ``int``, optional + | argument path: ``model_devi_numb_candi_v`` + + See model_devi_adapt_trust_lo. + +model_devi_perc_candi_f: + | type: ``float``, optional + | argument path: ``model_devi_perc_candi_f`` + + See model_devi_adapt_trust_lo. + +model_devi_perc_candi_v: + | type: ``float``, optional + | argument path: ``model_devi_perc_candi_v`` + + See model_devi_adapt_trust_lo. + +model_devi_f_avg_relative: + | type: ``bool``, optional + | argument path: ``model_devi_f_avg_relative`` + + Normalized the force model deviations by the RMS force magnitude along the trajectory. This key should not be used with use_relative. + +model_devi_clean_traj: + | type: ``bool`` | ``int`` + | argument path: ``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. + +model_devi_nopbc: + | type: ``bool`` + | argument path: ``model_devi_nopbc`` + + Assume open boundary condition in MD simulations. + +model_devi_activation_func: + | type: ``list``, optional + | argument path: ``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. + +model_devi_jobs: + | type: ``dict`` | ``list`` + | argument path: ``model_devi_jobs`` + + Settings for exploration in 01.model_devi. Each dict in the list corresponds to one iteration. The index of model_devi_jobs exactly accord with index of iterations + + sys_idx: + | type: ``list`` + | argument path: ``model_devi_jobs/sys_idx`` + + Systems to be selected as the initial structure of MD and be explored. The index corresponds exactly to the sys_configs. + + temps: + | type: ``list`` + | argument path: ``model_devi_jobs/temps`` + + Temperature (K) in MD. + + press: + | type: ``list`` + | argument path: ``model_devi_jobs/press`` + + Pressure (Bar) in MD. + + trj_freq: + | type: ``int`` + | argument path: ``model_devi_jobs/trj_freq`` + + Frequecy of trajectory saved in MD. + + nsteps: + | type: ``int`` + | argument path: ``model_devi_jobs/nsteps`` + + Running steps of MD. + + ensembles: + | type: ``str`` + | argument path: ``model_devi_jobs/ensembles`` + + Determining which ensemble used in MD, options include “npt” and “nvt”. + + neidelay: + | type: ``int``, optional + | argument path: ``model_devi_jobs/neidelay`` + + Delay building until this many steps since last build. + + taut: + | type: ``float`` | ``str``, optional + | argument path: ``model_devi_jobs/taut`` + + Coupling time of thermostat (ps). + + taup: + | type: ``float`` | ``str``, optional + | argument path: ``model_devi_jobs/taup`` + + Coupling time of barostat (ps). + +fp_style: + | type: ``dict`` + | argument path: ``fp_style`` + + Software for First Principles. Options include “vasp”, “pwscf”, “siesta” and “gaussian” up to now. + + + Depending on the value of *fp_style*, different sub args are accepted. + + fp_style: + | type: ``str`` (flag key) + | argument path: ``fp_style/fp_style`` + | possible choices: vasp, gaussian, siesta, cp2k + + The code used for fp tasks. + + + When *fp_style* is set to ``vasp``: + + fp_pp_path: + | type: ``str`` + | argument path: ``fp_style[vasp]/fp_pp_path`` + + Directory of psuedo-potential file to be used for 02.fp exists. + + fp_pp_files: + | type: ``list`` + | argument path: ``fp_style[vasp]/fp_pp_files`` + + Psuedo-potential file to be used for 02.fp. Note that the order of elements should correspond to the order in type_map. + + fp_incar: + | type: ``str`` + | argument path: ``fp_style[vasp]/fp_incar`` + + Input file for VASP. INCAR must specify KSPACING and KGAMMA. + + fp_aniso_kspacing: + | type: ``list`` + | argument path: ``fp_style[vasp]/fp_aniso_kspacing`` + + Set anisotropic kspacing. Usually useful for 1-D or 2-D materials. Only support VASP. If it is setting the KSPACING key in INCAR will be ignored. + + cvasp: + | type: ``bool`` + | argument path: ``fp_style[vasp]/cvasp`` + + If cvasp is true, DP-GEN will use Custodian to help control VASP calculation. + + + When *fp_style* is set to ``gaussian``: + + use_clusters: + | type: ``bool`` + | argument path: ``fp_style[gaussian]/use_clusters`` + + If set to true, clusters will be taken instead of the whole system. This option does not work with DeePMD-kit 0.x. + + cluster_cutoff: + | type: ``float`` + | argument path: ``fp_style[gaussian]/cluster_cutoff`` + + The cutoff radius of clusters if use_clusters is set to true. + + fp_params: + | type: ``dict`` + | argument path: ``fp_style[gaussian]/fp_params`` + + Parameters for Gaussian calculation. + + doc_keywords: + | type: ``str`` | ``list`` + | argument path: ``fp_style[gaussian]/fp_params/doc_keywords`` + + Keywords for Gaussian input. + + multiplicity: + | type: ``int`` | ``str`` + | argument path: ``fp_style[gaussian]/fp_params/multiplicity`` + + Spin multiplicity for Gaussian input. If set to auto, the spin multiplicity will be detected automatically. If set to frag, the "fragment=N" method will be used. + + nproc: + | type: ``int`` + | argument path: ``fp_style[gaussian]/fp_params/nproc`` + + The number of processors for Gaussian input. + + + When *fp_style* is set to ``siesta``: + + use_clusters: + | type: ``bool`` + | argument path: ``fp_style[siesta]/use_clusters`` + + If set to true, clusters will be taken instead of the whole system. This option does not work with DeePMD-kit 0.x. + + cluster_cutoff: + | type: ``float`` + | argument path: ``fp_style[siesta]/cluster_cutoff`` + + The cutoff radius of clusters if use_clusters is set to true. + + fp_params: + | type: ``dict`` + | argument path: ``fp_style[siesta]/fp_params`` + + Parameters for siesta calculation. + + ecut: + | type: ``int`` + | argument path: ``fp_style[siesta]/fp_params/ecut`` + + Define the plane wave cutoff for grid. + + ediff: + | type: ``float`` + | argument path: ``fp_style[siesta]/fp_params/ediff`` + + Tolerance of Density Matrix. + + kspacing: + | type: ``float`` + | argument path: ``fp_style[siesta]/fp_params/kspacing`` + + Sample factor in Brillouin zones. + + mixingweight: + | type: ``float`` + | argument path: ``fp_style[siesta]/fp_params/mixingweight`` + + Proportion a of output Density Matrix to be used for the input Density Matrix of next SCF cycle (linear mixing). + + NumberPulay: + | type: ``int`` + | argument path: ``fp_style[siesta]/fp_params/NumberPulay`` + + Controls the Pulay convergence accelerator. + + + When *fp_style* is set to ``cp2k``: + + user_fp_params: + | type: ``dict`` + | argument path: ``fp_style[cp2k]/user_fp_params`` + + Parameters for cp2k calculation. find detail in manual.cp2k.org. only the kind section must be set before use. we assume that you have basic knowledge for cp2k input. + + external_input_path: + | type: ``str`` + | argument path: ``fp_style[cp2k]/external_input_path`` + + Conflict with key:user_fp_params, use the template input provided by user, some rules should be followed, read the following text in detail. + +fp_task_max: + | type: ``int`` + | argument path: ``fp_task_max`` + + Maximum of structures to be calculated in 02.fp of each iteration. + +fp_task_min: + | type: ``int`` + | argument path: ``fp_task_min`` + + Minimum of structures to be calculated in 02.fp of each iteration. + +fp_accurate_threshold: + | type: ``float``, optional + | argument path: ``fp_accurate_threshold`` + + If the accurate ratio is larger than this number, no fp calculation will be performed, i.e. fp_task_max = 0. + +fp_accurate_soft_threshold: + | type: ``float``, optional + | argument path: ``fp_accurate_soft_threshold`` + + If the accurate ratio is between this number and fp_accurate_threshold, the fp_task_max linearly decays to zero. + +fp_cluster_vacuum: + | type: ``float``, optional + | argument path: ``fp_cluster_vacuum`` + + If the vacuum size is smaller than this value, this cluster will not be choosen for labeling. + diff --git a/doc/run/run-process.rst b/doc/run/run-process.rst new file mode 100644 index 000000000..cb98d7982 --- /dev/null +++ b/doc/run/run-process.rst @@ -0,0 +1,9 @@ +.. _run:: + +.. toctree:: + :maxdepth: 2 + :caption: Run Process + + overview-of-the-run-process.md + example-of-param.md + example-of-machine.md