deepmd.dpmodel.utils.env_mat#
Classes#
The unit operation of a native model. |
Functions#
| Compute smooth weight for descriptor elements. |
| Make smooth environment matrix. |
Module Contents#
- deepmd.dpmodel.utils.env_mat.compute_smooth_weight(distance: numpy.ndarray, rmin: float, rmax: float)[source]#
Compute smooth weight for descriptor elements.
- deepmd.dpmodel.utils.env_mat._make_env_mat(nlist, coord, rcut: float, ruct_smth: float, radial_only: bool = False, protection: float = 0.0)[source]#
Make smooth environment matrix.
- class deepmd.dpmodel.utils.env_mat.EnvMat(rcut, rcut_smth, protection: float = 0.0)[source]#
Bases:
deepmd.dpmodel.NativeOP
The unit operation of a native model.
- call(coord_ext: numpy.ndarray, atype_ext: numpy.ndarray, nlist: numpy.ndarray, davg: numpy.ndarray | None = None, dstd: numpy.ndarray | None = None, radial_only: bool = False) tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray] [source]#
Compute the environment matrix.
- Parameters:
- nlist
The neighbor list. shape: nf x nloc x nnei
- coord_ext
The extended coordinates of atoms. shape: nf x (nallx3)
- atype_ext
The extended aotm types. shape: nf x nall
- davg
The data avg. shape: nt x nnei x (4 or 1)
- dstd
The inverse of data std. shape: nt x nnei x (4 or 1)
- radial_only
Whether to only compute radial part of the environment matrix. If True, the output will be of shape nf x nloc x nnei x 1. Otherwise, the output will be of shape nf x nloc x nnei x 4. Default: False.
- Returns:
env_mat
The environment matrix. shape: nf x nloc x nnei x (4 or 1)
diff
The relative coordinate of neighbors. shape: nf x nloc x nnei x 3
switch
The value of switch function. shape: nf x nloc x nnei