data.oc.core.adsorbate#

Classes#

Adsorbate

Initializes an adsorbate object in one of 4 ways:

Functions#

randomly_rotate_adsorbate(adsorbate_atoms[, mode, ...])

Module Contents#

class data.oc.core.adsorbate.Adsorbate(adsorbate_atoms: ase.Atoms = None, adsorbate_id_from_db: int | None = None, adsorbate_smiles_from_db: str | None = None, adsorbate_db_path: str = ADSORBATE_PKL_PATH, adsorbate_db: dict[int, tuple[Any, Ellipsis]] | None = None, adsorbate_binding_indices: list | None = None)#

Initializes an adsorbate object in one of 4 ways: - Directly pass in an ase.Atoms object.

For this, you should also provide the index of the binding atom.

  • Pass in index of adsorbate to select from adsorbate database.

  • Pass in the SMILES string of the adsorbate to select from the database.

  • Randomly sample an adsorbate from the adsorbate database.

Parameters:
  • adsorbate_atoms (ase.Atoms) – Adsorbate structure.

  • adsorbate_id_from_db (int) – Index of adsorbate to select.

  • adsorbate_smiles_from_db (str) – A SMILES string of the desired adsorbate.

  • adsorbate_db_path (str) – Path to adsorbate database.

  • adsorbate_binding_indices (list) – The index/indices of the adsorbate atoms which are expected to bind.

adsorbate_id_from_db#
adsorbate_db_path#
__len__()#
__str__()#

Return str(self).

__repr__()#

Return repr(self).

_get_adsorbate_from_random(adsorbate_db)#
_load_adsorbate(adsorbate: tuple[Any, Ellipsis]) None#

Saves the fields from an adsorbate stored in a database. Fields added after the first revision are conditionally added for backwards compatibility with older database files.

data.oc.core.adsorbate.randomly_rotate_adsorbate(adsorbate_atoms: ase.Atoms, mode: str = 'random', binding_idx: int | None = None)#