core.datasets.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.

Attributes#

Classes#

LmdbDataset

Base Dataset class for all OCP datasets.

Functions#

Module Contents#

core.datasets.lmdb_dataset.T_co#
class core.datasets.lmdb_dataset.LmdbDataset(config)#

Bases: fairchem.core.datasets.base_dataset.BaseDataset

Base Dataset class for all OCP datasets.

sharded: bool#

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. :param config: Dataset configuration :type config: dict

path#
key_mapping#
transforms#
__getitem__(idx: int) T_co#
connect_db(lmdb_path: pathlib.Path | None = None) lmdb.Environment#
__del__()#
sample_property_metadata(num_samples: int = 100)#
core.datasets.lmdb_dataset.data_list_collater(data_list: list[torch_geometric.data.data.BaseData], otf_graph: bool = False, to_dict: bool = False) torch_geometric.data.data.BaseData | dict[str, torch.Tensor]#