deepmd.dpmodel.utils.neighbor_stat#
Classes#
Class for getting neighbor statistics data information. | |
Neighbor statistics using pure NumPy. |
Module Contents#
- class deepmd.dpmodel.utils.neighbor_stat.NeighborStatOP(ntypes: int, rcut: float, mixed_types: bool)[source]#
Bases:
deepmd.dpmodel.common.NativeOPClass for getting neighbor statistics data information.
- Parameters:
- ntypes
The num of atom types
- rcut
The cut-off radius
- mixed_typesbool,
optional If True, treat all types as a single type.
- call(coord: numpy.ndarray, atype: numpy.ndarray, cell: numpy.ndarray | None) tuple[float, numpy.ndarray][source]#
Calculate the neareest neighbor distance between atoms, maximum nbor size of atoms and the output data range of the environment matrix.
- Parameters:
- coord
The coordinates of atoms.
- atype
The atom types.
- cell
The cell.
- Returns:
floatThe minimal squared distance between two atoms
np.ndarrayThe maximal number of neighbors
- class deepmd.dpmodel.utils.neighbor_stat.NeighborStat(ntypes: int, rcut: float, mixed_type: bool = False)[source]#
Bases:
deepmd.utils.neighbor_stat.NeighborStatNeighbor statistics using pure NumPy.
- Parameters:
- iterator(data: deepmd.utils.data_system.DeepmdDataSystem) collections.abc.Iterator[tuple[numpy.ndarray, float, str]][source]#
Abstract method for producing data.
- Yields:
np.ndarrayThe maximal number of neighbors
floatThe squared minimal distance between two atoms
strThe directory of the data system