data.oc.core.multi_adsorbate_slab_config#
Classes#
Class to represent a slab with multiple adsorbates on it. This class only |
Functions#
|
Given a new site and the adsorbate we plan on placing there, |
Module Contents#
- class data.oc.core.multi_adsorbate_slab_config.MultipleAdsorbateSlabConfig(slab: fairchem.data.oc.core.slab.Slab, adsorbates: list[fairchem.data.oc.core.adsorbate.Adsorbate], num_sites: int = 100, num_configurations: int = 1, interstitial_gap: float = 0.1, mode: str = 'random_site_heuristic_placement')#
Bases:
fairchem.data.oc.core.adsorbate_slab_config.AdsorbateSlabConfig
Class to represent a slab with multiple adsorbates on it. This class only returns a fixed combination of adsorbates placed on the surface. Unlike AdsorbateSlabConfig which enumerates all possible adsorbate placements, this problem gets combinatorially large.
- Parameters:
slab (Slab) – Slab object.
adsorbates (List[Adsorbate]) – List of adsorbate objects to place on the slab.
num_sites (int) – Number of sites to sample.
num_configurations (int) – Number of configurations to generate per slab+adsorbate(s) combination. This corresponds to selecting different site combinations to place the adsorbates on.
interstitial_gap (float) – Minimum distance, in Angstroms, between adsorbate and slab atoms as well as the inter-adsorbate distance.
mode (str) –
“random”, “heuristic”, or “random_site_heuristic_placement”. This affects surface site sampling and adsorbate placement on each site.
In “random”, we do a Delaunay triangulation of the surface atoms, then sample sites uniformly at random within each triangle. When placing the adsorbate, we randomly rotate it along xyz, and place it such that the center of mass is at the site.
In “heuristic”, we use Pymatgen’s AdsorbateSiteFinder to find the most energetically favorable sites, i.e., ontop, bridge, or hollow sites. When placing the adsorbate, we randomly rotate it along z with only slight rotation along x and y, and place it such that the binding atom is at the site.
In “random_site_heuristic_placement”, we do a Delaunay triangulation of the surface atoms, then sample sites uniformly at random within each triangle. When placing the adsorbate, we randomly rotate it along z with only slight rotation along x and y, and place it such that the binding atom is at the site.
In all cases, the adsorbate is placed at the closest position of no overlap with the slab plus interstitial_gap along the surface normal.
- slab#
- adsorbates#
- num_sites#
- interstitial_gap#
- mode#
- sites#
- place_adsorbates_on_sites(sites: list, num_configurations: int = 1, interstitial_gap: float = 0.1)#
Place the adsorbate at the given binding sites.
This method generates a fixed number of configurations where sites are selected to ensure that adsorbate binding indices are at least a fair distance away from each other (covalent radii + interstitial gap). While this helps prevent adsorbate overlap it does not gaurantee it since non-binding adsorbate atoms can overlap if the right combination of angles is sampled.
- get_metadata_dict(ind)#
Returns a dict containing the atoms object and metadata for one specified config, used for writing to files.
- data.oc.core.multi_adsorbate_slab_config.update_distance_map(prev_distance_map, site_idx, adsorbate, pseudo_atoms)#
Given a new site and the adsorbate we plan on placing there, update the distance mapping to reflect the new distances from sites to nearest adsorbates. We incorporate the covalent radii of the placed adsorbate binding atom in our distance calculation to prevent atom overlap.