deepmd.dpmodel.utils.exclude_mask#
Classes#
Computes the type exclusion mask for atoms. | |
Computes the type exclusion mask for atom pairs. |
Module Contents#
- class deepmd.dpmodel.utils.exclude_mask.AtomExcludeMask(ntypes: int, exclude_types: list[int] = [])[source]#
Computes the type exclusion mask for atoms.
- build_type_exclude_mask(atype: numpy.ndarray)[source]#
Compute type exclusion mask for atoms.
- Parameters:
- atype
The extended aotm types. shape: nf x natom
- Returns:
mask
The type exclusion mask for atoms. shape: nf x natom Element [ff,ii] being 0 if type(ii) is excluded, otherwise being 1.
- class deepmd.dpmodel.utils.exclude_mask.PairExcludeMask(ntypes: int, exclude_types: list[tuple[int, int]] = [])[source]#
Computes the type exclusion mask for atom pairs.
- build_type_exclude_mask(nlist: numpy.ndarray, atype_ext: numpy.ndarray)[source]#
Compute type exclusion mask for atom pairs.
- Parameters:
- nlist
The neighbor list. shape: nf x nloc x nnei
- atype_ext
The extended aotm types. shape: nf x nall
- Returns:
mask
The type exclusion mask for pair atoms of shape: nf x nloc x nnei. Element [ff,ii,jj] being 0 if type(ii), type(nlist[ff,ii,jj]) is excluded, otherwise being 1.