dpgen package

dpgen.info()[source]

Subpackages

Submodules

dpgen.arginfo module

dpgen.arginfo.general_mdata_arginfo(name: str, tasks: Tuple[str]) Argument[source]

Generate arginfo for general mdata.

Parameters:
namestr

mdata name

taskstuple[str]

tuple of task keys, e.g. (“train”, “model_devi”, “fp”)

Returns:
Argument

arginfo

dpgen.main module

dpgen.main.main()[source]
dpgen.main.main_parser() ArgumentParser[source]

Returns parser for dpgen command.

Returns:
argparse.ArgumentParser

parser for dpgen command

dpgen.util module

dpgen.util.box_center(ch='', fill=' ', sp='|')[source]

put the string at the center of | |

dpgen.util.convert_training_data_to_hdf5(input_files: List[str], h5_file: str)[source]

Convert training data to HDF5 format and update the input files.

Parameters:
input_fileslist of str

DeePMD-kit input file names

h5_filestr

HDF5 file name

dpgen.util.expand_sys_str(root_dir: str | Path) List[str][source]

Recursively iterate over directories taking those that contain type.raw file.

If root_dir is a file but not a directory, it will be assumed as an HDF5 file.

Parameters:
root_dirUnion[str, Path]

starting directory

Returns:
List[str]

list of string pointing to system directories

dpgen.util.normalize(arginfo: Argument, data: dict, strict_check: bool = True) dict[source]

Normalize and check input data.

Parameters:
arginfodargs.Argument

argument information

datadict

input data

strict_checkbool, default=True

strict check data or not

Returns:
dict

normalized data

dpgen.util.sepline(ch='-', sp='-', screen=False)[source]

seperate the output by ‘-’