deepmd.dpmodel.atomic_model.dipole_atomic_model#
Classes#
Model give atomic prediction of some physical property. |
Module Contents#
- class deepmd.dpmodel.atomic_model.dipole_atomic_model.DPDipoleAtomicModel(descriptor: deepmd.dpmodel.descriptor.base_descriptor.BaseDescriptor, fitting: deepmd.dpmodel.fitting.base_fitting.BaseFitting, type_map: list[str], **kwargs: Any)[source]#
Bases:
deepmd.dpmodel.atomic_model.dp_atomic_model.DPAtomicModelModel give atomic prediction of some physical property.
The atomic model computes atomic properties by first extracting a descriptor from the atomic environment, then passing it through a fitting network:
\[\mathcal{D}^i = \mathcal{D}(\mathbf{R}^i, \mathbf{R}_j, \alpha_j),\]\[\mathbf{y}^i = \mathcal{F}(\mathcal{D}^i),\]where \(\mathcal{D}^i\) is the descriptor for atom \(i\), \(\alpha_j\) is the atom type of neighbor \(j\), \(\mathcal{F}\) is the fitting network, and \(\mathbf{y}^i\) is the predicted atomic property (energy, dipole, etc.).
- Parameters:
- descriptor
Descriptor
- fitting_net
Fitting net
- type_map
Mapping atom type to the name (str) of the type. For example type_map[1] gives the name of the type 1.
- apply_out_stat(ret: dict[str, deepmd.dpmodel.array_api.Array], atype: deepmd.dpmodel.array_api.Array) dict[str, deepmd.dpmodel.array_api.Array][source]#
Apply the stat to each atomic output. The developer may override the method to define how the bias is applied to the atomic output of the model.
- Parameters:
- ret
The returned dict by the forward_atomic method
- atype
The atom types. nf x nloc