core.datasets.oc22_lmdb_dataset#
Copyright (c) Meta, Inc. and its affiliates.
This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
Classes#
Dataset class to load from LMDB files containing relaxation |
Module Contents#
- class core.datasets.oc22_lmdb_dataset.OC22LmdbDataset(config, transform=None)#
Bases:
fairchem.core.datasets.base_dataset.BaseDataset
Dataset class to load from LMDB files containing relaxation trajectories or single point computations.
Useful for Structure to Energy & Force (S2EF), Initial State to Relaxed State (IS2RS), and Initial State to Relaxed Energy (IS2RE) tasks.
The keys in the LMDB must be integers (stored as ascii objects) starting from 0 through the length of the LMDB. For historical reasons any key named “length” is ignored since that was used to infer length of many lmdbs in the same folder, but lmdb lengths are now calculated directly from the number of keys.
- Parameters:
config (dict) – Dataset configuration
transform (callable, optional) – Data transform function. (default:
None
)
- path#
- data2train#
- key_mapping#
- transforms#
- train_on_oc20_total_energies#
- __len__() int #
- __getitem__(idx)#
- connect_db(lmdb_path=None)#
- close_db() None #