vibesketch.chem.perceive¶
Molecules from 3D coordinates: bonds, bond orders, charges and radicals.
Programs of the vibe family hand structures over as atoms and Cartesian
coordinates: a QVF structure section, an XYZ file. The sketcher needs a
molecule to draw, so the bonds are perceived, in this order:
A single atom keeps the stated charge, and its unpaired electrons from its valence: N is a quartet, Cl a doublet, Cl⁻ a singlet.
A template. When the file names the species by SMILES, the bonds come from the coordinates and the bond orders and charges from the SMILES (RDKit’s
AssignBondOrdersFromTemplate). The atoms stay in the file’s order, so the coordinates are kept.Perception with the stated charge: RDKit’s
DetermineBonds, the xyz2mol algorithm of Kim and Kim, Bull. Korean Chem. Soc. 36, 1769 (2015), with Hückel connectivity off.Connectivity alone, for a neutral structure the bond orders of which cannot be assigned, such as a radical or a metal hydride: single bonds, the unpaired electrons where valences are left open, and two neighbours’ unpaired electrons paired into a further bond (N=O). The caller says so, because the drawing may need checking.
Functions
|
The molecule the coordinates show, or |
Classes
|
A sanitized RDKit molecule, hydrogens explicit, in the coordinates' atom order. |
- class vibesketch.chem.perceive.Perceived(mol, how)¶
Bases:
objectA sanitized RDKit molecule, hydrogens explicit, in the coordinates’ atom order.
- vibesketch.chem.perceive.perceive(symbols, positions, *, charge=0, template=None)¶
The molecule the coordinates show, or
Nonewhen no step gives one.templateis an RDKit molecule for the species, from the SMILES a file states; it is used only when it fits the atoms.