deepmd.tf.nvnmd.entrypoints.wrap

Module Contents

Classes

Wrap

Generate the binary model file (model.pb).

Functions

wrap(*[, nvnmd_config, nvnmd_weight, nvnmd_map, ...])

Attributes

log

deepmd.tf.nvnmd.entrypoints.wrap.log[source]
class deepmd.tf.nvnmd.entrypoints.wrap.Wrap(config_file: str, weight_file: str, map_file: str, model_file: str)[source]

Generate the binary model file (model.pb).

the model file can be use to run the NVNMD with lammps the pair style need set as:

pair_style nvnmd model.pb
pair_coeff * *
Parameters:
config_file

input file name an .npy file containing the configuration information of NVNMD model

weight_file

input file name an .npy file containing the weights of NVNMD model

map_file

input file name an .npy file containing the mapping tables of NVNMD model

model_file

output file name an .pb file containing the model using in the NVNMD

References

DOI: 10.1038/s41524-022-00773-z

wrap()[source]
wrap_head(nhs, nws)[source]

Wrap the head information.

version nhead nheight nwidth rcut cut-off radius ntype number of atomic species nnei number of neighbors atom_ener atom bias energy

wrap_dscp()[source]

Wrap the configuration of descriptor.

version 0: [NBIT_IDX_S2G-1:0] SHIFT_IDX_S2G

[NBIT_NEIB*NTYPE-1:0] SELs [NBIT_FIXD*M1*NTYPE*NTYPE-1:0] GSs [NBIT_FLTE-1:0] NEXPO_DIV_NI

version 1:

[NBIT_FLTE-1:0] NEXPO_DIV_NI

wrap_fitn()[source]

Wrap the weights of fitting net.

w weight b bias

wrap_bias(bias, NBIT_DATA, NBIT_DATA_FL)[source]
wrap_weight(weight, NBIT_DISP, NBIT_WEIGHT)[source]

weight: weights of fittingNet NBIT_DISP: nbits of exponent of weight max value NBIT_WEIGHT: nbits of mantissa of weights.

wrap_map()[source]

Wrap the mapping table of embedding network.

wrap_lut()[source]

Wrap the LUT.

deepmd.tf.nvnmd.entrypoints.wrap.wrap(*, nvnmd_config: str | None = 'nvnmd/config.npy', nvnmd_weight: str | None = 'nvnmd/weight.npy', nvnmd_map: str | None = 'nvnmd/map.npy', nvnmd_model: str | None = 'nvnmd/model.pb', **kwargs)[source]