deepmd.tf.utils.neighbor_stat#
Attributes#
Classes#
Class for getting neighbor statistics data information. | |
Class for getting training data information. |
Module Contents#
- class deepmd.tf.utils.neighbor_stat.NeighborStatOP(ntypes: int, rcut: float, mixed_types: bool)[source]#
Class for getting neighbor statistics data information.
- Parameters:
- ntypes
The num of atom types
- rcut
The cut-off radius
- mixed_typesbool,
optional If True, treat neighbors of all types as a single type.
- build(coord: deepmd.tf.env.tf.Tensor, atype: deepmd.tf.env.tf.Tensor, cell: deepmd.tf.env.tf.Tensor, pbc: deepmd.tf.env.tf.Tensor) tuple[deepmd.tf.env.tf.Tensor, deepmd.tf.env.tf.Tensor][source]#
Calculate the nearest neighbor distance between atoms, maximum nbor size of atoms and the output data range of the environment matrix.
- class deepmd.tf.utils.neighbor_stat.NeighborStat(ntypes: int, rcut: float, mixed_type: bool = False)[source]#
Bases:
deepmd.utils.neighbor_stat.NeighborStatClass for getting training data information.
It loads data from DeepmdData object, and measures the data info, including neareest nbor distance between atoms, max nbor size of atoms and the output data range of the environment matrix.
- Parameters:
- ntypes
The num of atom types
- rcut
The cut-off radius
- mixed_typebool,
optional, default=False Treat all types as a single type.
- iterator(data: deepmd.tf.utils.data_system.DeepmdDataSystem) collections.abc.Iterator[tuple[numpy.ndarray, float, str]][source]#
Produce data.
- Parameters:
- data
The data system
- Yields:
np.ndarrayThe maximal number of neighbors
floatThe squared minimal distance between two atoms
strThe directory of the data system
- _execute(coord: numpy.ndarray, atype: numpy.ndarray, box: numpy.ndarray | None, pbc: bool) tuple[numpy.ndarray, numpy.ndarray][source]#
Execute the operation.
- Parameters:
- coord
The coordinates of atoms.
- atype
The atom types.
- box
The box.
- pbc
Whether the box is periodic.