deepmd.pt.model.task.dos#
Attributes#
Classes#
Construct a fitting net for energy. |
Module Contents#
- 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, dim_case_embd: int = 0, rcond: float | None = None, bias_dos: torch.Tensor | None = None, trainable: bool | list[bool] = True, seed: int | list[int] | None = None, activation_function: str = 'tanh', precision: str = DEFAULT_PRECISION, exclude_types: list[int] = [], mixed_types: bool = True, type_map: list[str] | None = None)[source]#
Bases:
deepmd.pt.model.task.ener.InvarFittingConstruct a fitting net for energy.
- Parameters:
- var_name
str The atomic property to fit, ‘energy’, ‘dipole’, and ‘polar’.
- ntypes
int Element count.
- dim_descrpt
int Embedding width per atom.
- dim_out
int The output dimension of the fitting net.
- neuron
list[int] Number of neurons in each hidden layers of the fitting net.
- bias_atom_e
torch.Tensor,optional Average energy per atom for each element.
- resnet_dtbool
Using time-step in the ResNet construction.
- numb_fparam
int Number of frame parameters.
- numb_aparam
int Number of atomic parameters.
- dim_case_embd
int Dimension of case specific embedding.
- activation_function
str Activation function.
- precision
str Numerical precision.
- mixed_typesbool
If true, use a uniform fitting net for all atom types, otherwise use different fitting nets for different atom types.
- rcond
float,optional The condition number for the regression of atomic energy.
- seed
int,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 descriptor should be set.
- type_map: list[str], Optional
A list of strings. Give the name to each type of atoms.
- use_aparam_as_mask: bool
If True, the aparam will not be used in fitting net for embedding.
- var_name
- output_def() deepmd.dpmodel.FittingOutputDef[source]#
Returns the output def of the fitting net.
- classmethod deserialize(data: dict) DOSFittingNet[source]#
Deserialize the fitting.
- Parameters:
- data
dict The serialized data
- data
- Returns:
BFThe deserialized fitting