vibesketcher.render.schematic¶
Schematic aids for periodic publication figures (#233).
Every function here reads the 3D model and returns drawing data; none of them
changes a structure. The figure in vibesketcher.render.periodic uses
them for heights, coordination polyhedra and slab layer schematics.
Functions
|
Cartesian positions of the atoms bonded to an atom at |
|
0, ½, ¼, 0.37: a height in the projection, as crystallographers write it. |
|
Height labels of the atoms toward the viewer, and what they measure. |
|
Faces (vertex indices, ordered around the face) of the convex hull of a few points. |
|
Stacking letter (A, B, C, ...) of each site's atomic plane in a slab. |
|
The shortest lattice vector along the view direction, if one exists (indices up to 6). |
- vibesketcher.render.schematic.view_period(structure, direction)[source]¶
The shortest lattice vector along the view direction, if one exists (indices up to 6).
- Parameters:
structure (PeriodicStructure)
direction (ndarray)
- Return type:
ndarray | None
- vibesketcher.render.schematic.fraction_text(value)[source]¶
0, ½, ¼, 0.37: a height in the projection, as crystallographers write it.
- vibesketcher.render.schematic.heights(structure, positions, toward)[source]¶
Height labels of the atoms toward the viewer, and what they measure.
Along a lattice direction the heights are fractions of that period; otherwise (for example across a slab’s vacuum) they are in angstrom above the lowest atom.
- Parameters:
structure (PeriodicStructure)
positions (ndarray)
toward (ndarray)
- Return type:
- vibesketcher.render.schematic.hull_faces(points, tolerance=0.001)[source]¶
Faces (vertex indices, ordered around the face) of the convex hull of a few points.
- vibesketcher.render.schematic.coordination(structure, centre, centre_symbol, radius, scale=1.15)[source]¶
Cartesian positions of the atoms bonded to an atom at
centre(all images).
- vibesketcher.render.schematic.stacking_letters(structure, tolerance=0.3)[source]¶
Stacking letter (A, B, C, …) of each site’s atomic plane in a slab.
Planes are grouped by height along the normal; two planes get the same letter when their in-plane fractional positions coincide modulo the surface lattice.
- Parameters:
structure (PeriodicStructure)
tolerance (float)
- Return type: