vibesketch.document.coordinates¶
Species from 3D structures other programs wrote: QVF sections, XYZ frames.
A vibe-qc result, a structure vibe-view saved or exported, or an XYZ file carries atoms and Cartesian coordinates, sometimes with a charge, a multiplicity, a SMILES, a compound number and a name, and sometimes the steps of a reaction scheme. This module turns them into a document:
each structure’s bonds are perceived (
vibesketch.chem.perceive), with the stated charge, or the one its SMILES implies, else neutral;the molecules are laid out in 2D, the scheme’s steps as reaction rows and the rest in a row below, and the document is derived from that drawing;
each species keeps its coordinates as an
importedconformer, with the stated multiplicity, compound number and name.
What cannot be done is said in the warnings: a structure without bonds that fit, a SMILES the coordinates contradict, a spin the electrons cannot have.
Functions
|
A document drawn from |
Classes
|
One reaction step between structures, by chemical role (QVF § 5.14). |
|
One structure as another program wrote it. |
Exceptions
No structure could be drawn. |
- exception vibesketch.document.coordinates.NothingDrawn¶
Bases:
ValueErrorNo structure could be drawn.
- class vibesketch.document.coordinates.Step(id, reactants, products, reagents=<factory>, arrow='forward', conditions=<factory>, yield_text=None)¶
Bases:
objectOne reaction step between structures, by chemical role (QVF § 5.14).
- Parameters:
- class vibesketch.document.coordinates.Structure(id, symbols, positions, charge=None, multiplicity=None, label=None, name=None, smiles=None)¶
Bases:
objectOne structure as another program wrote it.
- Parameters:
- vibesketch.document.coordinates.from_structures(structures, *, steps=None, warnings=None, source='imported')¶
A document drawn from
structures, thestepsas reaction rows.warningsare the caller’s so far, kept first.sourceis what a stated name records as its origin. RaisesNothingDrawnwhen no structure can be drawn.