ase.Atoms Reader

This reader expects the data to be a list of ase.Atoms objects, and converts it to a list of ChemicalSystem objects.

with open(input_xyz_path) as xyz_file:
    atoms = ase_read(xyz_file, index=":")

reader = ASEAtomsReader(atoms)
systems = reader.load()

See below for the API reference to the associated loader class.

class mlip.data.chemical_systems_readers.ase_atoms_reader.ASEAtomsReader(atoms_list: list[Atoms], num_to_load: int | None = None, property_name_mapping: dict[str, str] | None = None)

Transforms a list of ase.Atoms into a list of ChemicalSystem objects.

This reader class is useful to reuse the GraphDatasetBuilder pipeline programmatically, e.g. to batch graphs from ase.Atoms objects returned by a simulation or relaxation stage.

__init__(atoms_list: list[Atoms], num_to_load: int | None = None, property_name_mapping: dict[str, str] | None = None)
load() list[ChemicalSystem]

Converts a single list[ase.Atoms] to a list of ChemicalSystems.