vibesketch.document.qvf¶
QVF, the vibyverse’s file format, as vibe-sketch’s document format.
Every program of the vibe family keeps its files as QVF (the qvf repository’s spec/qvf-format-spec.md, toolkit release 0.4). A vibe-sketch QVF holds:
a vendor section
x_vibesketch.document, not critical, its namespace declared in the manifest’sextensions, with the membersdocument(the vibe-sketch document, schemavibe-sketch/1, drawing included),species(each species’ identifiers, including those without a 3D structure) andsdf(the species as an SD file);a
preview(spec § 5.15): a PNG of the species as the thumbnail, at most 1024 pixels on its longest side, and the scheme as SVG;one
structuresection per species that has a 3D conformer, namedstructure_<species id>, with its bonds and its identity (§ 5.1): charge, multiplicity, SMILES, InChI, InChIKey, a checked name and the compound number aslabel;a
reaction.scheme(§ 5.14) with the steps whose reactants and products all have a structure section;a
job.spec(§ 5.9) for each calculation on such a species, a job set whose jobs name their structure.
So any QVF reader shows the molecules, knows which is which and what the scheme and its calculations are, without knowing vibe-sketch.
Reading takes the document from x_vibesketch.document when there is
one. A QVF from another program, such as a vibe-qc result, contributes its
structure sections as species: bonds perceived from the 3D coordinates
with the charge the section states (or its SMILES implies), a 2D layout for
the drawing, the coordinates kept as the conformer, and the section’s
multiplicity, label and name. qvf-writer, which provides the qvf_writer and qvf_reader
modules, is an optional dependency installed from the qvf checkout.
Module Attributes
|
The version of the |
|
the |
QVF's registered media type (the qvf repository's spec/file-type). |
Functions
|
The document a QVF archive holds; raises |
Whether qvf-writer is installed, so QVF can be read and written. |
|
|
One species as a QVF of its own: one structure with its identity. |
|
The document as a QVF archive; raises |
Exceptions
A QVF that vibe-sketch cannot read, or cannot write. |
|
|
qvf-writer is not installed, or is older than the supported toolkit release. |
- vibesketch.document.qvf.MEDIA_TYPE = 'application/vnd.vibe-qc.qvf+zip'¶
QVF’s registered media type (the qvf repository’s spec/file-type).
- exception vibesketch.document.qvf.QvfError¶
Bases:
ValueErrorA QVF that vibe-sketch cannot read, or cannot write.
Bases:
QvfErrorqvf-writer is not installed, or is older than the supported toolkit release.
- Parameters:
found (str)
- Return type:
None
- vibesketch.document.qvf.from_qvf(data)¶
The document a QVF archive holds; raises
QvfError.- Parameters:
data (bytes)
- Return type:
- vibesketch.document.qvf.qvf_available()¶
Whether qvf-writer is installed, so QVF can be read and written.
- Return type:
- vibesketch.document.qvf.species_qvf(document, species_id)¶
One species as a QVF of its own: one structure with its identity.
This is the file a 3D viewer opens. The charge and multiplicity are on the structure section and, as the spec asks of a single structure, in
provenancetoo. RaisesKeyErrorfor an unknown species,QvfErrorfor one without a conformer.
- vibesketch.document.qvf.to_qvf(document, *, preview=True)¶
The document as a QVF archive; raises
QvfUnavailable.