saturate
- sisl.geom.saturate(geometry, rules)
Saturate missing bonds of atoms with other atoms
Each rule is a pair
(selector, saturation). An atom gets the saturation of the first rule that selects it. All rules use the input geometry, thus the added atoms do not change the selection of other rules.- Parameters:
geometry (Geometry) – the geometry to saturate
rules (Sequence[tuple[SelectorLike, SaturateLike]]) – pairs of
(selector, saturation). A selector is a category, a dict forAtomCategory, or atomic indices. A saturation is aSaturate, or an atom ("H"equalsSaturate("H")).
- Returns:
the input geometry with the added atoms at the end, in the order of the rules
- Return type:
Geometry
Examples
Saturate the edges of a zigzag nanoribbon with hydrogen:
>>> ribbon = sisl.geom.zgnr(4) >>> edge = AtomNeighbors(max=2, R=1.5) >>> saturated = saturate(ribbon, [(edge, Saturate("H", bond=1.09, R=1.5))]) >>> saturated.na - ribbon.na 2
The first rule that selects an atom is used:
>>> rules = [ ... (edge & AtomOdd(), Saturate("F", bond=1.35, R=1.5)), ... (edge, Saturate("H", bond=1.09, R=1.5)), ... ] >>> saturate(ribbon, rules).atoms.Z[ribbon.na:].tolist() [9, 1]
See also
Saturatethe bond geometry and the defaults