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.Atomsinto a list ofChemicalSystemobjects.This reader class is useful to reuse the
GraphDatasetBuilderpipeline programmatically, e.g. to batch graphs fromase.Atomsobjects 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.