dpdata.deepmd package#
Submodules#
dpdata.deepmd.comp module#
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.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, atom_numb_pad=None, **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
- atom_numb_padint, optional
If provided, pad atom counts to the next multiple of this number using virtual atoms (type -1 in real_atom_types). This reduces the number of subdirectories when systems have many different atom counts. For example, atom_numb_pad=8 groups systems into multiples of 8.
- **kwargsdict
Other parameters
- Returns:
- mixed_systems: dict
dict of mixed system with key ‘atom_numbs’