Surface workflows¶
Slab configuration, deposition, and validation for supported-cluster runs.
Deposition and adsorbate initialization¶
create_deposited_cluster() builds initial
structures for surface_cluster and surface_cluster_adsorbate:
Plain cluster — gas-phase seed via
scgo.initialization(init_modeonSurfaceSystemConfig), then rotate/translate above the slab with covalent-radius connectivity height heuristics.Cluster + adsorbate — hierarchical core + fragment placement (hull sites, ranked steric candidates), then deposit with surface-biased rotation.
Adsorbate-only mobile region (empty
core_symbols) — fragments placed directly on slab top-layer hull sites viaplace_fragment_on_cluster().
- class scgo.surface.config.SurfaceSystemConfig(slab, *, adsorption_height_min=<object object>, adsorption_height_max=<object object>, height_min=<object object>, height_max=<object object>, surface_normal_axis=2, fix_all_slab_atoms=True, n_fix_bottom_slab_layers=None, n_relax_top_slab_layers=None, comparator_use_mic=True, cluster_init_vacuum=8.0, init_mode='smart', max_placement_attempts=200, structure_connectivity_factor=1.4)[source]¶
Bases:
objectDescribe a fixed slab plus a movable adsorbate cluster for GA.
Atom ordering in combined systems must be
slabatoms first, then thelen(composition)adsorbate atoms (matching ASE GA patches:n_toptrailing atoms are optimized). Pass the same instance to TS search (get_ts_search_params(..., surface_config=...)orrun_ts_search(..., ts_params=..., system_type=..., surface_config=...)) so NEB uses the identical slabFixAtomspolicy as local relaxation. At runtime,scgo.surface.validation.validate_surface_config_slab_prefix()checks that combined systems still begin withslab’s symbols in order.Height may be set via
adsorption_height_*or aliasheight_*.Slab motion during local relaxation (three common modes;
Lis the number of distinct slab coordinate layers alongsurface_normal_axis):Intent
Settings
Full slab frozen
fix_all_slab_atoms=True(default)Frozen except top N slab layers
fix_all_slab_atoms=Falseand eithern_relax_top_slab_layers=N, orn_fix_bottom_slab_layers=L - NNothing on the slab frozen
fix_all_slab_atoms=False,n_fix_bottom_slab_layers=None,n_relax_top_slab_layers=NoneFor a typical slab with vacuum along
z, the adsorbate sits on the high-zside; fixing the bottomL - Ndistinct layers is the same as leaving only the topNlayers free to relax.Do not set
n_relax_top_slab_layerstogether withn_fix_bottom_slab_layers, or together withfix_all_slab_atoms=True.- slab: Atoms¶
- property height_min: float¶
Alias for
adsorption_height_min.
- property height_max: float¶
Alias for
adsorption_height_max.
- scgo.surface.make_surface_config(slab, *, adsorption_height_min=2.0, adsorption_height_max=3.5, fix_all_slab_atoms=True, comparator_use_mic=True, max_placement_attempts=500)[source]¶
Build a
SurfaceSystemConfigfrom an arbitrary ASE slab.- Return type:
- scgo.surface.make_graphite_surface_config(*, slab_layers=5, slab_repeat_xy=4, vacuum=12.0, structure_connectivity_factor=1.4)[source]¶
Graphite slab preset (top layer relaxes with adsorbate during GO/NEB).
- Return type:
- scgo.surface.describe_surface_config(cfg)[source]¶
Summarize key surface/deposition fields for logging and provenance.
- Return type:
- scgo.surface.create_deposited_cluster(composition, slab, blmin, rng, config, previous_search_glob='**/*.db', adsorbate_definition=None, adsorbate_fragment_template=None, cluster_adsorbate_config=None, batch_site_counts=None)[source]¶
One adsorbate+slab structure, or None if placement fails.
For non-adsorbate runs: build one gas-phase cluster for
composition, then place above slab. For adsorbate runs: build hierarchical core+fragment first.- Return type:
Atoms|None
- scgo.surface.create_deposited_cluster_batch(composition, slab, blmin, n_structures, rng, config, *, previous_search_glob='**/*.db', n_jobs=1, adsorbate_definition=None, adsorbate_fragment_template=None, cluster_adsorbate_config=None, batch_site_counts=None)[source]¶
Generate multiple deposited structures (sequential or threaded).
- Return type:
list[Atoms]
- scgo.surface.adsorption_energy(e_adsorbate_slab, e_slab, e_isolated_cluster)[source]¶
Classical adsorption energy: E(ads+slab) - E(slab) - E(cluster).
Negative values usually indicate binding.
- Parameters:
- Return type:
- Returns:
Adsorption energy in the same units as inputs (typically eV).
Composition builders for campaigns live in scgo.runner_api
(build_one_element_compositions, build_two_element_compositions);
high-level runners are in API Reference.