mattertune.configs.data.db
- class mattertune.configs.data.db.DBDatasetConfig(*, type='db', src, energy_key=None, forces_key=None, stress_key=None, preload=True)[source]
Configuration for a dataset stored in an ASE database.
- Parameters:
type (Literal['db'])
src (Database | str | Path)
energy_key (str | None)
forces_key (str | None)
stress_key (str | None)
preload (bool)
- type: Literal['db']
Discriminator for the DB dataset.
- src: Database | str | Path
Path to the ASE database file or a database object.
- energy_key: str | None
Key for the energy label in the database.
- forces_key: str | None
Key for the force label in the database.
- stress_key: str | None
Key for the stress label in the database.
- preload: bool
Whether to load all the data at once or not.
- class mattertune.configs.data.db.DatasetConfigBase[source]
- prepare_data()[source]
Prepare the dataset for training.
Use this to download and prepare data. Downloading and saving data with multiple processes (distributed settings) will result in corrupted data. Lightning ensures this method is called only within a single process, so you can safely add your downloading logic within this method.