deepmd.dpmodel.fitting.property_fitting#

Classes#

PropertyFittingNet

Fitting the rotationally invariant properties of task_dim of the system.

Module Contents#

class deepmd.dpmodel.fitting.property_fitting.PropertyFittingNet(ntypes: int, dim_descrpt: int, task_dim: int = 1, neuron: list[int] = [128, 128, 128], bias_atom_p: numpy.ndarray | None = None, rcond: float | None = None, trainable: bool | list[bool] = True, intensive: bool = False, bias_method: str = 'normal', resnet_dt: bool = True, numb_fparam: int = 0, numb_aparam: int = 0, activation_function: str = 'tanh', precision: str = DEFAULT_PRECISION, mixed_types: bool = True, exclude_types: list[int] = [], type_map: list[str] | None = None, seed: int | None = None)[source]#

Bases: deepmd.dpmodel.fitting.invar_fitting.InvarFitting

Fitting the rotationally invariant properties of task_dim of the system.

Parameters:
ntypes

The number of atom types.

dim_descrpt

The dimension of the input descriptor.

task_dim

The dimension of outputs of fitting net.

neuron

Number of neurons \(N\) in each hidden layer of the fitting net

bias_atom_p

Average property per atom for each element.

rcond

The condition number for the regression of atomic energy.

trainable

If the weights of fitting net are trainable. Suppose that we have \(N_l\) hidden layers in the fitting net, this list is of length \(N_l + 1\), specifying if the hidden layers and the output layer are trainable.

intensive

Whether the fitting property is intensive.

bias_method

The method of applying the bias to each atomic output, user can select ‘normal’ or ‘no_bias’. If ‘normal’ is used, the computed bias will be added to the atomic output. If ‘no_bias’ is used, no bias will be added to the atomic output.

resnet_dt

Time-step dt in the resnet construction: \(y = x + dt * \phi (Wx + b)\)

numb_fparam

Number of frame parameter

numb_aparam

Number of atomic parameter

activation_function

The activation function \(\boldsymbol{\phi}\) in the embedding net. Supported options are “none”, “gelu_tf”, “linear”, “relu6”, “sigmoid”, “tanh”, “gelu”, “relu”, “softplus”.

precision

The precision of the embedding net parameters. Supported options are “float16”, “float64”, “default”, “float32”.

mixed_types

If false, different atomic types uses different fitting net, otherwise different atom types share the same fitting net.

exclude_types: list[int]

Atomic contributions of the excluded atom types are set zero.

type_map: list[str], Optional

A list of strings. Give the name to each type of atoms.

task_dim[source]#
intensive[source]#
bias_method[source]#
classmethod deserialize(data: dict) PropertyFittingNet[source]#

Deserialize the fitting.

Parameters:
datadict

The serialized data

Returns:
BF

The deserialized fitting

serialize() dict[source]#

Serialize the fitting to dict.