Chemical Systems Reader: Interface¶
- class mlip.data.chemical_systems_readers.chemical_systems_reader.ChemicalSystemsReader(filepaths: str | PathLike | list[str | PathLike], data_download_fun: Callable[[str | PathLike, str | PathLike], None] | None = None, num_to_load: int | None = None, property_name_mapping: dict[str, str] | None = None)¶
Abstract base class for reading data from disk into the internal format of lists of
ChemicalSystemobjects, one list for training data, one for validation, and one for test data.- __init__(filepaths: str | PathLike | list[str | PathLike], data_download_fun: Callable[[str | PathLike, str | PathLike], None] | None = None, num_to_load: int | None = None, property_name_mapping: dict[str, str] | None = None)¶
Constructor.
- Parameters:
filepaths – Path or paths to file from which ChemicalSystem objects will be read.
data_download_fun – Optional function to download the data from
filepath(source) to a local target path.num_to_load – Optional limit on the number of systems to load per file. If
None, all systems are loaded.property_name_mapping – Optional mapping from canonical names (
"forces","energy","stress") to the keys used in the data files. By default, it will be mapped to the same names. Any entries provided will override the corresponding defaults.
- abstractmethod load() list[ChemicalSystem]¶
Loads chemical systems from all filepaths.
- Returns:
A list of
ChemicalSystemobjects.