deepmd.utils.env_mat_stat#
Attributes#
Classes#
A class to store the statistics of the environment matrix. | |
A base class to store and calculate the statistics of the environment matrix. |
Module Contents#
- class deepmd.utils.env_mat_stat.StatItem(number: float = 0, sum: float = 0, squared_sum: float = 0)[source]#
A class to store the statistics of the environment matrix.
- Parameters:
- class deepmd.utils.env_mat_stat.EnvMatStat[source]#
Bases:
abc.ABCA base class to store and calculate the statistics of the environment matrix.
- compute_stats(data: list[dict[str, numpy.ndarray]]) None[source]#
Compute the statistics of the environment matrix.
- Parameters:
- data
list[dict[str,np.ndarray]] The environment matrix.
- data
- abstractmethod iter(data: list[dict[str, numpy.ndarray]]) collections.abc.Iterator[dict[str, StatItem]][source]#
Get the iterator of the environment matrix.
- save_stats(path: deepmd.utils.path.DPPath) None[source]#
Save the statistics of the environment matrix.
- Parameters:
- path
DPPath The path to save the statistics of the environment matrix.
- path
- load_stats(path: deepmd.utils.path.DPPath) None[source]#
Load the statistics of the environment matrix.
- Parameters:
- path
DPPath The path to load the statistics of the environment matrix.
- path
- load_or_compute_stats(data: list[dict[str, numpy.ndarray]], path: deepmd.utils.path.DPPath | None = None) None[source]#
Load the statistics of the environment matrix if it exists, otherwise compute and save it.
- Parameters:
- path
DPPath The path to load the statistics of the environment matrix.
- data
list[dict[str,np.ndarray]] The environment matrix.
- path