Skip to content

local_sites_finder_around_atom_STABLE_BEST

esta.general.local_sites_finder_around_atom_STABLE_BEST

Local Adsorption Site Finder Around a Given Atom

Finds Atop, Bridge, and Hollow sites locally around a specified atom index. Works on tilted, curved, or irregular surfaces by: - Using local surface normal - 2D projection perpendicular to that normal - Voronoi tessellation in the local plane

get_local_surface_normal(slab: Atoms, atom_index: int, cutoff: float = 5.0)

Compute approximate local surface normal around a given atom using neighbors.

get_local_surface_normal2(slab: Atoms, atom_index: int, cutoff: float = 5.5, min_neighbors: int = 6)

Improved local surface normal estimation.

Features: - Uses fixed cutoff distance (more consistent than natural_cutoffs) - Includes more neighbors for better statistics - Robust handling for edge atoms or low-coordination sites - Weighted plane fitting (closer atoms have higher weight)

Note:

Flat surfaces: cutoff=4.5 ~ 5.5 Å Tilted / stepped surfaces: cutoff=5.5 ~ 7.0 Å Highly curved (nanoparticles): cutoff=6.0 ~ 8.0 Å

project_to_local_plane(points: np.ndarray, normal: np.ndarray, origin: np.ndarray)

Project 3D points onto 2D plane perpendicular to normal.

find_local_sites_around_atom(slab: Atoms, atom_index: int, height: float = 1.8, neighbor_cutoff: float = 4.0)

Main function: Find local Atop, Bridge, Hollow sites around a given atom.

find_local_sites_around_atom_2(slab: Atoms, atom_index: int, height: float = 1.8, neighbor_cutoff: float = 4.0)

Finds local Atop, Bridge, and Hollow sites strictly around a target atom in a periodic, potentially tilted slab using 2D Voronoi tessellation.

Handles PBC wrapping automatically for edge atoms.

find_sites_by_neighbor_graph(slab: Atoms, atom_index: int, height: float = 1.8)

Alternative method: Purely graph-based (no Voronoi). Uses coordination numbers of neighbors.