deepmd.pt.model.task.dipole#
Attributes#
Classes#
Construct a dipole fitting net. |
Module Contents#
- class deepmd.pt.model.task.dipole.DipoleFittingNet(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, 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] = [], r_differentiable: bool = True, c_differentiable: bool = True, type_map: list[str] | None = None, **kwargs)[source]#
Bases:
deepmd.pt.model.task.fitting.GeneralFitting
Construct a dipole 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.
- 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.
- r_differentiable
If the variable is differentiated with respect to coordinates of atoms. Only reducible variable are differentiable.
- c_differentiable
If the variable is differentiated with respect to the cell tensor (pbc case). Only reducible variable are differentiable.
- type_map: list[str], Optional
A list of strings. Give the name to each type of atoms.
- ntypes
- classmethod deserialize(data: dict) deepmd.pt.model.task.fitting.GeneralFitting [source]#
Deserialize the fitting.
- Parameters:
- data
dict
The serialized data
- data
- Returns:
BF
The deserialized fitting
- output_def() deepmd.dpmodel.FittingOutputDef [source]#
Returns the output def of the fitting net.
- compute_output_stats(merged: Callable[[], list[dict]] | list[dict], stat_file_path: deepmd.utils.path.DPPath | None = None) None [source]#
Compute the output statistics (e.g. energy bias) for the fitting net from packed data.
- Parameters:
- merged
Union
[Callable
[[],list
[dict
]],list
[dict
]] - list[dict]: A list of data samples from various data systems.
Each element, merged[i], is a data dictionary containing keys: torch.Tensor originating from the i-th data system.
- Callable[[], list[dict]]: A lazy function that returns data samples in the above format
only when needed. Since the sampling process can be slow and memory-intensive, the lazy function helps by only sampling once.
- stat_file_path
Optional
[DPPath
] The path to the stat file.
- merged