dpdata.deepmd package

Submodules

dpdata.deepmd.comp module

dpdata.deepmd.comp.dump(folder, data, set_size=5000, comp_prec=<class 'numpy.float32'>, remove_sets=True)[source]
dpdata.deepmd.comp.to_system_data(folder, type_map=None, labels=True)[source]

dpdata.deepmd.hdf5 module

Utils for deepmd/hdf5 format.

dpdata.deepmd.hdf5.dump(f: h5py.File | h5py.Group, folder: str, data: dict, set_size=5000, comp_prec=<class 'numpy.float32'>) None[source]

Dump data to a HDF5 file.

Parameters:
fh5py.File or h5py.Group

HDF5 file or group object

folderstr

path in the HDF5 file

datadict

System or LabeledSystem data

set_sizeint, default: 5000

size of a set

comp_precnp.dtype, default: np.float32

precision of data

dpdata.deepmd.hdf5.to_system_data(f: h5py.File | h5py.Group, folder: str, type_map: list | None = None, labels: bool = True)[source]

Load a HDF5 file.

Parameters:
fh5py.File or h5py.Group

HDF5 file or group object

folderstr

path in the HDF5 file

type_maplist

type map

labelsbool

labels

dpdata.deepmd.mixed module

dpdata.deepmd.mixed.dump(folder, data, set_size=2000, comp_prec=<class 'numpy.float32'>, remove_sets=True)[source]
dpdata.deepmd.mixed.mix_system(*system, type_map, **kwargs)[source]

Mix the systems into mixed_type ones according to the unified given type_map.

Parameters:
*systemSystem

The systems to mix

type_maplist of str

Maps atom type to name

**kwargsdict

Other parameters

Returns:
mixed_systems: dict

dict of mixed system with key ‘atom_numbs’

dpdata.deepmd.mixed.split_system(sys, split_num=10000)[source]
dpdata.deepmd.mixed.to_system_data(folder, type_map=None, labels=True)[source]

dpdata.deepmd.raw module

dpdata.deepmd.raw.dump(folder, data)[source]
dpdata.deepmd.raw.load_type(folder, type_map=None)[source]
dpdata.deepmd.raw.to_system_data(folder, type_map=None, labels=True)[source]