Utility functions#
The functions in scm.structures.system_utils operate on
ChemicalSystem objects directly.
Adding a vacuum gap#
with_vacuum_gap() takes a two-dimensional
system and returns a three-dimensional periodic copy. The new lattice vector
is perpendicular to the two in-plane vectors. Its length is the atomic
thickness plus the requested vacuum gap. center=True places half the gap
on each side of the slab.
from scm.structures.system_utils import with_vacuum_gap
calculation_system = with_vacuum_gap(surface.system, vacuum=10.0, center=True)
- with_vacuum_gap(system: ChemicalSystem, vacuum: float, *, center: bool = True) ChemicalSystem#
Return a 3D periodic copy of a 2D system with a vacuum gap.
The new lattice vector is normal to the two existing vectors. Its length is the atomic thickness along that normal plus
vacuumÅ, so periodic images are separated by that gap. Withcenter=True, half the gap is on each side; otherwise the lowest atom lies in the lattice plane. The input system is not modified.