deepmd.pt.utils.env_mat_stat

Module Contents

Classes

EnvMatStat

A base class to store and calculate the statistics of the environment matrix.

EnvMatStatSe

Environmental matrix statistics for the se_a/se_r environemntal matrix.

class deepmd.pt.utils.env_mat_stat.EnvMatStat[source]

Bases: deepmd.utils.env_mat_stat.EnvMatStat

A base class to store and calculate the statistics of the environment matrix.

compute_stat(env_mat: Dict[str, torch.Tensor]) Dict[str, deepmd.utils.env_mat_stat.StatItem][source]

Compute the statistics of the environment matrix for a single system.

Parameters:
env_mattorch.Tensor

The environment matrix.

Returns:
Dict[str, StatItem]

The statistics of the environment matrix.

class deepmd.pt.utils.env_mat_stat.EnvMatStatSe(descriptor: deepmd.pt.model.descriptor.DescriptorBlock)[source]

Bases: EnvMatStat

Environmental matrix statistics for the se_a/se_r environemntal matrix.

Parameters:
descriptorDescriptorBlock

The descriptor of the model.

iter(data: List[Dict[str, torch.Tensor | List[Tuple[int, int]]]]) Iterator[Dict[str, deepmd.utils.env_mat_stat.StatItem]][source]

Get the iterator of the environment matrix.

Parameters:
dataList[Dict[str, Union[torch.Tensor, List[Tuple[int, int]]]]]

The data.

Yields:
Dict[str, StatItem]

The statistics of the environment matrix.

get_hash() str[source]

Get the hash of the environment matrix.

Returns:
str

The hash of the environment matrix.

__call__()[source]