Adsorption Finder#
The scm.structures.builder.adsorption module finds adsorption sites and generates adsorbate structures on periodic
slabs. It uses the same implementation as the AMSinput Adsorption Finder.
Basic usage#
from scm.base import ChemicalSystem
from scm.structures.builder.adsorption import (
AdsorptionFinderOptions,
analyze_adsorption_sites,
find_adsorption_structures,
)
substrate = ChemicalSystem.from_in("surface.in")
options = AdsorptionFinderOptions(
binding_count=1,
binding_atom_indices=(0,),
binding_distance_scale=1.05,
soap_equivalence_threshold=0.06,
)
analysis = analyze_adsorption_sites(substrate, options)
result = find_adsorption_structures(
substrate,
smiles="CO",
options=options,
analysis=analysis,
)
structure = result.accepted_candidates[0].candidate_system
Binding atom indices are zero-based and refer to the adsorbate with explicit hydrogen atoms. If you omit
binding_atom_indices, the finder infers the requested number of binding atoms. Input systems are not modified.
Options#
SOAP reduction is enabled by default with an equivalence threshold of 0.06. Sites are compared with a SOAP-like
power spectrum of their local environment within 6 Å. With the default threshold, ideal slabs reduce to their
symmetry-distinct sites, also for stepped surfaces, and random displacements of up to about 0.05 Å do not split
equivalent sites. You can also select site families,
change conformer and collision settings, and limit the number of accepted candidates or total placement attempts.
The target distance for each binding/support pair is binding_distance_scale times the sum of the two covalent
radii from scm.base.Elements. Its default value is 1.05. The finder translates the complete adsorbate
along the site normal so no binding/support pair is shorter than its target. Site geometry can make some pairs
longer. The collision check can subsequently lift the complete adsorbate farther along the normal.
Note
This version supports one or two binding atoms on the upper face of a slab with two or three periodic lattice vectors.
API#
- class AdsorptionFinderOptions(*, binding_count: Literal[1, 2] = 1, binding_atom_indices: Tuple[int, ...] | None = None, conformer_count: int = 8, reduce_sites: bool = True, site_families: Tuple[Literal['top', 'bridge', 'hollow'], ...] = ('top', 'bridge', 'hollow'), soap_equivalence_threshold: float = 0.06, top_layer_tolerance: float = 1.25, site_deduplication_tolerance: float = 0.55, collision_scale: float = 1.0, binding_distance_scale: float = 1.05, max_candidates: int = 100, max_attempts: int = 72)#
Options shared by adsorption-site analysis and adsorbate placement.
Binding atom indices are zero-based and refer to the adsorbate with explicit hydrogens. When omitted, the requested number of binding atoms is inferred.
- model_config: ClassVar[ConfigDict] = {'frozen': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- analyze_adsorption_sites(substrate: ChemicalSystem, options: AdsorptionFinderOptions | None = None) AdsorptionSurfaceAnalysis#
Find adsorption sites on the upper face of a periodic substrate.
- filter_adsorption_sites(substrate: ChemicalSystem, analysis: AdsorptionSurfaceAnalysis, options: AdsorptionFinderOptions | None = None, allowed_filters: Set[Tuple[str, Tuple[str, ...]]] | None = None) AdsorptionSurfaceAnalysis#
Apply site-equivalence and support-element filters to an existing site analysis.
- find_adsorption_structures(substrate: ChemicalSystem, adsorbate: ChemicalSystem | None = None, *, smiles: str = '', options: AdsorptionFinderOptions | None = None, analysis: AdsorptionSurfaceAnalysis | None = None, emit_progress: Callable[[AdsorptionFinderProgress], None] | None = None, cancel_event: Event | None = None) AdsorptionFinderResult#
Generate adsorption structures for a substrate and adsorbate.
Supply either
adsorbateorsmiles, but not both.