The schnetpack.transform module provides a suite of transformation classes used to manipulate atomistic data (coordinates, species, etc.) during data loading or preprocessing. These transformations are typically applied to datasets to ensure physical consistency or to prepare data for specific model architectures.
Atomistic Transformations
These classes modify the physical properties of the system:
AddOffsets: Adds offsets to coordinates.RemoveOffsets: Removes offsets from coordinates.SubtractCenterOfMass: Translates the system so the center of mass is at the origin.SubtractCenterOfGeometry: Translates the system so the geometric center is at the origin.
Casting Transformations
These classes manage data types (precision) for tensors:
CastMap: Maps specific keys to specific types.CastTo32: Casts tensors to float32.CastTo64: Casts tensors to float64.
Neighbor List Transformations
These classes handle the construction and filtering of neighbor lists, which are critical for message-passing neural networks:
MatScipyNeighborList: Uses SciPy for neighbor list construction.ASENeighborList: ASE-based neighbor list.VesinNeighborList: Vesin-based neighbor list.TorchNeighborList: PyTorch-native neighbor list.CachedNeighborList: A neighbor list that caches results.CountNeighbors: Counts the number of neighbors for each atom.FilterNeighbors: Filters neighbors based on specific criteria.WrapPositions: Wraps positions according to periodic boundary conditions.CollectAtomTriples: Collects atom triples for specific interaction types.