deepmd.pt.model.task.dos

Module Contents

Classes

DOSFittingNet

Construct a fitting net for energy.

Attributes

dtype

device

log

deepmd.pt.model.task.dos.dtype[source]
deepmd.pt.model.task.dos.device[source]
deepmd.pt.model.task.dos.log[source]
class deepmd.pt.model.task.dos.DOSFittingNet(ntypes: int, dim_descrpt: int, numb_dos: int = 300, neuron: List[int] = [128, 128, 128], resnet_dt: bool = True, numb_fparam: int = 0, numb_aparam: int = 0, rcond: float | None = None, bias_dos: torch.Tensor | None = None, trainable: bool | List[bool] = True, seed: int | None = None, activation_function: str = 'tanh', precision: str = DEFAULT_PRECISION, exclude_types: List[int] = [], mixed_types: bool = True)[source]

Bases: deepmd.pt.model.task.ener.InvarFitting

Construct a fitting net for energy.

Parameters:
var_namestr

The atomic property to fit, ‘energy’, ‘dipole’, and ‘polar’.

ntypesint

Element count.

dim_descrptint

Embedding width per atom.

dim_outint

The output dimension of the fitting net.

neuronList[int]

Number of neurons in each hidden layers of the fitting net.

bias_atom_etorch.Tensor, optional

Average enery per atom for each element.

resnet_dtbool

Using time-step in the ResNet construction.

numb_fparamint

Number of frame parameters.

numb_aparamint

Number of atomic parameters.

activation_functionstr

Activation function.

precisionstr

Numerical precision.

mixed_typesbool

If true, use a uniform fitting net for all atom types, otherwise use different fitting nets for different atom types.

rcondfloat, optional

The condition number for the regression of atomic energy.

seedint, optional

Random seed.

exclude_types: List[int]

Atomic contributions of the excluded atom types are set zero.

atom_ener: List[Optional[torch.Tensor]], optional

Specifying atomic energy contribution in vacuum. The value is a list specifying the bias. the elements can be None or np.array of output shape. For example: [None, [2.]] means type 0 is not set, type 1 is set to [2.] The set_davg_zero key in the descrptor should be set.

exclude_types: List[int][source]
output_def() deepmd.dpmodel.FittingOutputDef[source]

Returns the output def of the fitting net.

classmethod deserialize(data: dict) DOSFittingNet[source]

Deserialize the fitting.

Parameters:
datadict

The serialized data

Returns:
BF

The deserialized fitting

serialize() dict[source]

Serialize the fitting to dict.