deepmd.utils.env_mat_stat
Module Contents
Classes
A class to store the statistics of the environment matrix. | |
A base class to store and calculate the statistics of the environment matrix. |
Attributes
- class deepmd.utils.env_mat_stat.StatItem(number: int = 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.ABC
A 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
- abstract iter(data: List[Dict[str, numpy.ndarray]]) 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