data.oc.core.bulk#
Classes#
Initializes a bulk object in one of 4 ways: |
Module Contents#
- class data.oc.core.bulk.Bulk(bulk_atoms: ase.Atoms = None, bulk_id_from_db: int | None = None, bulk_src_id_from_db: str | None = None, bulk_db_path: str = BULK_PKL_PATH, bulk_db: list[dict[str, Any]] | None = None)#
Initializes a bulk object in one of 4 ways: - Directly pass in an ase.Atoms object. - Pass in index of bulk to select from bulk database. - Pass in the src_id of the bulk to select from the bulk database. - Randomly sample a bulk from bulk database if no other option is passed.
- Parameters:
bulk_atoms (ase.Atoms) – Bulk structure.
bulk_id_from_db (int) – Index of bulk in database pkl to select.
bulk_src_id_from_db (int) – Src id of bulk to select (e.g. “mp-30”).
bulk_db_path (str) – Path to bulk database.
bulk_db (List[Dict[str, Any]]) – Already-loaded database.
- bulk_id_from_db#
- bulk_db_path#
- _get_bulk_from_random(bulk_db)#
- set_source_dataset_id(src_id: str)#
- set_bulk_id_from_db(bulk_id_from_db: int)#
- get_slabs(max_miller=2, precomputed_slabs_dir=None)#
Returns a list of possible slabs for this bulk instance.
- __len__()#
- __str__()#
- __repr__()#
- __eq__(other) bool #