deepmd.pt.model.task.polarizability#
Attributes#
Classes#
Construct a polar fitting net. |
Module Contents#
- class deepmd.pt.model.task.polarizability.PolarFittingNet(ntypes: int, dim_descrpt: int, embedding_width: int, neuron: list[int] = [128, 128, 128], resnet_dt: bool = True, numb_fparam: int = 0, numb_aparam: int = 0, dim_case_embd: int = 0, activation_function: str = 'tanh', precision: str = DEFAULT_PRECISION, mixed_types: bool = True, rcond: float | None = None, seed: int | list[int] | None = None, exclude_types: list[int] = [], fit_diag: bool = True, scale: list[float] | float | None = None, shift_diag: bool = True, type_map: list[str] | None = None, default_fparam: list | None = None, **kwargs: Any)[source]#
Bases:
deepmd.pt.model.task.fitting.GeneralFittingConstruct a polar fitting net.
- Parameters:
- ntypes
int Element count.
- dim_descrpt
int Embedding width per atom.
- embedding_width
int The dimension of rotation matrix, m1.
- neuron
list[int] Number of neurons in each hidden layers of the fitting net.
- 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.
- fit_diagbool
Fit the diagonal part of the rotational invariant polarizability matrix, which will be converted to normal polarizability matrix by contracting with the rotation matrix.
- scale
list[float] The output of the fitting net (polarizability matrix) for type i atom will be scaled by scale[i]
- shift_diagbool
Whether to shift the diagonal part of the polarizability matrix. The shift operation is carried out after scale.
- type_map: list[str], Optional
A list of strings. Give the name to each type of atoms.
- default_fparam: list[float], optional
The default frame parameter. If set, when fparam.npy files are not included in the data system, this value will be used as the default value for the frame parameter in the fitting net.
- ntypes
- change_type_map(type_map: list[str], model_with_new_type_stat: Any | None = None) None[source]#
Change the type related params to new ones, according to type_map and the original one in the model. If there are new types in type_map, statistics will be updated accordingly to model_with_new_type_stat for these new types.
- classmethod deserialize(data: dict) deepmd.pt.model.task.fitting.GeneralFitting[source]#
Deserialize the fitting.
- Parameters:
- data
dict The serialized data
- data
- Returns:
BFThe deserialized fitting
- output_def() deepmd.dpmodel.FittingOutputDef[source]#
Returns the output def of the fitting net.