Autotest Overview: Autotest for Deep Generator
Suppose that we have a potential (can be DFT, DP, MEAM …), autotest
helps us automatically calculate M properties on N configurations. The folder where the autotest
runs is called the working directory of autotest
. Different potentials should be tested in different working directories.
A property is tested in three steps: The relaxation of a structure should be carried out before calculating all other properties: If, for some reasons, the main program terminated at stage where the key There are now six task types implemented in the package: VASP: The default of ABACUS: The default of deepmd: Only 1 model can be used in autotest in one working directory. meam: Please make sure the USER-MEAMC package has already been installed in LAMMPS. eam_fs & eam_alloy: Please make sure the MANYBODY package has already been installed in LAMMPS Now the supported property types are make
, run
and post
. make
prepares all computational tasks that are needed to calculate the property. For example to calculate EOS, make
prepares a series of tasks, each of which has a scaled configuration with certain volume, and all necessary input files necessary for starting a VASP, ABACUS, or LAMMPS calculations. run
sends all the computational tasks to remote computational resources defined in a machine configuration file like machine.json
, and automatically collects the results when remote calculations finish. post
calculates the desired property from the collected results.Relaxation
dpgen autotest make relax.json
dpgen autotest run relax.json machine.json
dpgen autotest post relax.json
run
, one can easily restart with the same command. relax.json
is the parameter file. An example for deepmd
relaxation is given as:{
"structures": ["confs/mp-*"],
"interaction": {
"type": "deepmd",
"model": "frozen_model.pb",
"type_map": {"Al": 0, "Mg": 1}
},
"relaxation": {}
}
structures
provides the structures to relax. interaction
is provided with deepmd
, and other options are vasp
, abacus
, meam
…Task type
vasp
, abacus
, deepmd
, meam
, eam_fs
, and eam_alloy
. An inter.json
file in json format containing the interaction parameters will be written in the directory of each task after make
. We give input examples of the interaction
part for each type below:potcar_prefix
is “”. "interaction": {
"type": "vasp",
"incar": "vasp_input/INCAR",
"potcar_prefix":"vasp_input",
"potcars": {"Al": "POTCAR.al", "Mg": "POTCAR.mg"}
}
potcar_prefix
is “”. The path of potcars/orb_files/deepks_desc is potcar_prefix
+ potcars
/orb_files
/deepks_desc
/deepks_model
. "interaction": {
"type": "abacus",
"incar": "abacus_input/INPUT",
"potcar_prefix":"abacus_input",
"potcars": {"Al": "pseudo_potential.al", "Mg": "pseudo_potential.mg"},
"orb_files": {"Al": "numerical_orb.al", "Mg": "numerical_orb.mg"},
"atom_masses": {"Al": 26.9815, "Mg":24.305},
"deepks_desc": "jle.orb",
"deepks_model": "model.ptg"
}
"interaction": {
"type": "deepmd",
"model": "frozen_model.pb",
"type_map": {"Al": 0, "Mg": 1}
}
"interaction": {
"type": "meam",
"model": ["meam.lib","AlMg.meam"],
"type_map": {"Al": 1, "Mg": 2}
}
"interaction": {
"type": "eam_fs (eam_alloy)",
"model": "AlMg.eam.fs (AlMg.eam.alloy)",
"type_map": {"Al": 1, "Mg": 2}
}
Property type
eos
, elastic
, vacancy
, interstitial
, surface
, and gamma
. Before property tests, relaxation
should be done first or the relaxation results should be present in the corresponding directory confs/mp-*/relaxation/relax_task
. A file named task.json
in json format containing the property parameter will be written in the directory of each task after make
step. Multiple property tests can be performed simultaneously.
Make run and post
There are three operations in auto test package, namely The The jobs would be dispatched according to the parameter in The post process of calculation results would be performed. make
, run
, and post
. Here we take eos
property as an example for property type.Make
INCAR
, POSCAR
, POTCAR
input files for VASP or in.lammps
, conf.lmp
, and the interatomic potential files for LAMMPS will be generated in the directory confs/mp-*/relaxation/relax_task
for relaxation or confs/mp-*/eos_00/task.[0-9]*[0-9]
for EOS. The machine.json
file is not needed for make
. Example:dpgen autotest make relaxation.json
Run
machine.json
file and the calculation results would be sent back. Example:dpgen autotest run relaxation.json machine.json
Post
result.json
in json format will be generated in confs/mp-*/relaxation/relax_task
for relaxation and result.json
in json format and result.out
in txt format in confs/mp-*/eos_00
for EOS. The machine.json
file is also not needed for post
. Example:dpgen autotest post relaxation.json