deepmd.pt.model.descriptor.descriptor
Module Contents
Classes
The building block of descriptor. |
Functions
|
Attributes
- class deepmd.pt.model.descriptor.descriptor.DescriptorBlock(*args, **kwargs)[source]
Bases:
torch.nn.Module
,abc.ABC
,make_plugin_registry
('DescriptorBlock'
)The building block of descriptor. Given the input descriptor, provide with the atomic coordinates, atomic types and neighbor list, calculate the new descriptor.
- abstract compute_input_stats(merged: Callable[[], List[dict]] | List[dict], path: deepmd.utils.path.DPPath | None = None)[source]
Compute the input statistics (e.g. mean and stddev) for the descriptors from packed data.
- Parameters:
- merged
Union
[Callable
[[],List
[dict
]],List
[dict
]] - List[dict]: A list of data samples from various data systems.
Each element, merged[i], is a data dictionary containing keys: torch.Tensor originating from the i-th data system.
- Callable[[], List[dict]]: A lazy function that returns data samples in the above format
only when needed. Since the sampling process can be slow and memory-intensive, the lazy function helps by only sampling once.
- path
Optional
[DPPath
] The path to the stat file.
- merged
- abstract get_stats() Dict[str, deepmd.utils.env_mat_stat.StatItem] [source]
Get the statistics of the descriptor.
Share the parameters of self to the base_class with shared_level during multitask training. If not start from checkpoint (resume is False), some seperated parameters (e.g. mean and stddev) will be re-calculated across different classes.