deepmd.utils.tabulate#
Attributes#
Classes#
A base class for pt and tf tabulation. |
Module Contents#
- class deepmd.utils.tabulate.BaseTabulate(descrpt, neuron, type_one_side, exclude_types, is_pt)[source]#
Bases:
abc.ABCA base class for pt and tf tabulation.
- build(min_nbor_dist: float, extrapolate: float, stride0: float, stride1: float) tuple[dict[str, int], dict[str, int]][source]#
Build the tables for model compression.
- Parameters:
- min_nbor_dist
The nearest distance between neighbor atoms
- extrapolate
The scale of model extrapolation
- stride0
The uniform stride of the first table
- stride1
The uniform stride of the second table
- Returns:
- abstract _make_data(xx, idx) tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray][source]#
Generate tabulation data for the given input.
- Parameters:
- xx
np.ndarray Input values to tabulate
- idx
int Index for accessing the correct network parameters
- xx
- Returns:
tuple[np.ndarray,np.ndarray,np.ndarray]Values, first derivatives, and second derivatives