vibesketch.document.renders¶
Same-orientation renders of a recipe campaign’s stages, from its archived artifacts (#42).
For one species of a compiled campaign this gathers the starting geometry (the sketch’s prepared conformer, from the campaign’s pinned sources) and the geometry every stage’s validator accepted (from vibe-queue’s verified artifacts), with each optimisation’s trajectory where its result carries one. Nothing is taken on trust: every artifact is checked against the manifest digest vibe-queue’s journal records for the producing attempt, and every file against its manifest entry, before it is read. A stage that was not accepted is listed and never rendered.
One frame for all. The start geometry is put in its principal-axes frame (centroid at the origin, axes by decreasing spread, signs fixed by the coordinates’ skew, a proper rotation), and every accepted geometry and every trajectory frame is superposed on it by the rotation that minimises the RMSD (W. Kabsch, Acta Cryst. A32, 922-923 (1976); A34, 827-828 (1978)), never a reflection, so chirality is kept. A rigid drift of the optimiser therefore does not turn the molecule between figures, and the RMSD to the start says how far each stage moved it.
Each geometry is written as a QVF archive of its own (<species>-<stage>.qvf,
the aligned structure and, for an optimisation, the aligned trajectory),
beside renders.json, which records for every figure the artifact it came
from: node, attempt, manifest digest and result digest. The images are
vibe-view’s: vibe-view capture draws each archive with one fixed
isometric camera and vibe-view animate --kind trajectory each
trajectory, so vibe-sketch prepares the geometry and imports no rendering
stack (the shared scope decision). Without vibe-view the archives and the
record are still written, and the warning gives the command to run.
Functions
|
|
|
Renders of one species' start and accepted stages, in one orientation. |
|
|
Classes
|
What was written: the record, the files, and what needs attention. |
Exceptions
|
The renders cannot be made as asked; the reasons say why. |
- exception vibesketch.document.renders.RendersRefused(reasons)[source]¶
Bases:
ValueErrorThe renders cannot be made as asked; the reasons say why.
- class vibesketch.document.renders.StageRenders(directory, record, files=<factory>, warnings=<factory>)[source]¶
Bases:
objectWhat was written: the record, the files, and what needs attention.
- vibesketch.document.renders.aligned_frame(points)[source]¶
pointsin their principal-axes frame, and the centroid they were moved from.The axes run by decreasing spread; each axis points where the coordinates are skewed (the larger tail), ties broken by the first atom that is off the plane; the third axis completes a right-handed frame.
- Parameters:
points (NDArray[float64])
- Return type:
tuple[NDArray[float64], NDArray[float64]]
- vibesketch.document.renders.render_stages(document, recipe_id, campaign_id, species_id, directory, *, size=(900, 600), publication=False, images=True)[source]¶
Renders of one species’ start and accepted stages, in one orientation.
Writes into
directory(new or empty) the aligned archives, the record and, whenimagesand vibe-view is installed, a PNG per geometry (sizein pixels, vibe-view’s publication preset withpublication) and a GIF per trajectory. RaisesRendersRefusedwhen the campaign, species or directory does not fit, or an artifact is not the one vibe-queue verified. A campaign’s files that are missing, unreadable or point outside it are refused too, and a failure leaves the directory as it was given (#69).