deepmd.dpmodel.utils.exclude_mask

Module Contents

Classes

AtomExcludeMask

Computes the type exclusion mask for atoms.

PairExcludeMask

Computes the type exclusion mask for atom pairs.

class deepmd.dpmodel.utils.exclude_mask.AtomExcludeMask(ntypes: int, exclude_types: List[int] = [])[source]

Computes the type exclusion mask for atoms.

get_exclude_types()[source]
get_type_mask()[source]
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.

get_exclude_types()[source]
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.

__contains__(item)[source]