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 a conformer named after where they came from (
importedby default), with the stated multiplicity, compound number and name. Frames of one molecule, a trajectory or an optimisation, are kept as its conformers, the last first and the others named<method>:frame-<n>(#86).
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[source]¶
Bases:
ValueErrorNo structure could be drawn.
- class vibesketch.document.coordinates.Step(id, reactants, products, reagents=<factory>, arrow='forward', conditions=<factory>, yield_text=None)[source]¶
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, method='imported')[source]¶
Bases:
objectOne structure as another program wrote it.
- Parameters:
- vibesketch.document.coordinates.from_structures(structures, *, steps=None, warnings=None, source='imported', bond_orders=False)[source]¶
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. Withbond_orders, for files that state the charge, a structure whose bond orders do not fit is left out instead of drawn with single bonds. RaisesNothingDrawnwhen no structure can be drawn.