deepmd.utils.neighbor_stat

Module Contents

Classes

NeighborStat

Abstract base class for getting training data information.

Attributes

log

deepmd.utils.neighbor_stat.log[source]
class deepmd.utils.neighbor_stat.NeighborStat(ntypes: int, rcut: float, mixed_type: bool = False)[source]

Bases: abc.ABC

Abstract base class 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:
ntypesint

The num of atom types

rcutfloat

The cut-off radius

mixed_typebool, optional, default=False

Treat all types as a single type.

get_stat(data: deepmd.utils.data_system.DeepmdDataSystem) Tuple[float, numpy.ndarray][source]

Get the data statistics of the training data, including nearest nbor distance between atoms, max nbor size of atoms.

Parameters:
data

Class for manipulating many data systems. It is implemented with the help of DeepmdData.

Returns:
min_nbor_dist

The nearest distance between neighbor atoms

max_nbor_size

An array with ntypes integers, denotes the actual achieved max sel

abstract iterator(data: deepmd.utils.data_system.DeepmdDataSystem) Iterator[Tuple[numpy.ndarray, float, str]][source]

Abstract method for producing data.

Yields:
mnnp.ndarray

The maximal number of neighbors

dtfloat

The squared minimal distance between two atoms

jjstr

The directory of the data system