vibesketch.chem.species¶
Identity and properties of one species, from an RDKit molecule.
Module Attributes
their spin state cannot be read off a drawing. |
|
An atom property marking a radical the drawing or file states, which is kept as given. |
Functions
|
The identity of a sanitized RDKit molecule. |
|
Mark the radicals |
|
An RDKit molecule from SMILES; raises |
|
Formula, masses and InChI of a sanitized RDKit molecule. |
|
An atom's unpaired electrons, with the inert pair of Ga to Bi kept paired (#147). |
|
A copy without explicit hydrogens, quietly: a lone H or H+ stays, unremarked. |
Classes
|
What identifies a species and what a calculation needs from the drawing. |
|
- class vibesketch.chem.species.Identity(smiles, inchikey, charge, multiplicity, electrons, has_transition_metal, has_stereo)[source]¶
Bases:
objectWhat identifies a species and what a calculation needs from the drawing.
- Parameters:
- class vibesketch.chem.species.Properties(formula: 'str', average_mass: 'float', monoisotopic_mass: 'float', inchi: 'str | None')[source]¶
Bases:
object
- vibesketch.chem.species.TRANSITION_METALS = frozenset({21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112})¶
their spin state cannot be read off a drawing.
- Type:
d-block and f-block elements
- vibesketch.chem.species.DRAWN_RADICAL = 'vibesketchDrawnRadical'¶
An atom property marking a radical the drawing or file states, which is kept as given.
- vibesketch.chem.species.inert_pair_radicals(mol, drawn=None)[source]¶
Mark the radicals
drawn(index)says were drawn, and set the others tounpaired().The counts set last only until RDKit sanitizes the molecule again;
unpaired()gives them at any time.
- vibesketch.chem.species.mol_from_smiles(smiles)[source]¶
An RDKit molecule from SMILES; raises
ValueErrorwhen RDKit refuses it.
- vibesketch.chem.species.properties(mol)[source]¶
Formula, masses and InChI of a sanitized RDKit molecule.
- Parameters:
mol (Any)
- Return type:
- vibesketch.chem.species.unpaired(atom)[source]¶
An atom’s unpaired electrons, with the inert pair of Ga to Bi kept paired (#147).
RDKit’s valence model gives a bare Pb²⁺ two radical electrons, a triplet, and re-assigns them whenever a molecule is sanitized; the ion is [Xe]4f¹⁴5d¹⁰6s², a singlet. For the elements above, the electrons left after the charge and the bonds fill the ns² pair first and then the np shell by Hund’s rule: Pb²⁺, Sn²⁺, In⁺ and Bi³⁺ have none unpaired, a Pb atom two (³P), a Bi atom three (⁴S), a Ga atom one (²P). A radical marked as drawn (
DRAWN_RADICAL) is kept as given.