vibesketch.chem.species

Identity and properties of one species, from an RDKit molecule.

Module Attributes

TRANSITION_METALS

their spin state cannot be read off a drawing.

Functions

identity(mol)

The identity of a sanitized RDKit molecule.

mol_from_smiles(smiles)

An RDKit molecule from SMILES; raises ValueError when RDKit refuses it.

properties(mol)

Formula, masses and InChI of a sanitized RDKit molecule.

without_hydrogens(mol)

A copy without explicit hydrogens, quietly: a lone H or H+ stays, unremarked.

Classes

Identity(smiles, inchikey, charge, ...)

What identifies a species and what a calculation needs from the drawing.

Properties(formula, average_mass, ...)

class vibesketch.chem.species.Identity(smiles, inchikey, charge, multiplicity, electrons, has_transition_metal, has_stereo)

Bases: object

What identifies a species and what a calculation needs from the drawing.

Parameters:
  • smiles (str)

  • inchikey (str | None)

  • charge (int)

  • multiplicity (int)

  • electrons (int)

  • has_transition_metal (bool)

  • has_stereo (bool)

smiles: str
inchikey: str | None
charge: int
multiplicity: int

unpaired radical electrons + 1.

Type:

The multiplicity the drawing implies

electrons: int
has_transition_metal: bool
has_stereo: bool
property key: str

What two drawings of the same species share.

class vibesketch.chem.species.Properties(formula: 'str', average_mass: 'float', monoisotopic_mass: 'float', inchi: 'str | None')

Bases: object

Parameters:
  • formula (str)

  • average_mass (float)

  • monoisotopic_mass (float)

  • inchi (str | None)

formula: str
average_mass: float
monoisotopic_mass: float
inchi: str | None
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.identity(mol)

The identity of a sanitized RDKit molecule.

Parameters:

mol (Any)

Return type:

Identity

vibesketch.chem.species.mol_from_smiles(smiles)

An RDKit molecule from SMILES; raises ValueError when RDKit refuses it.

Parameters:

smiles (str)

Return type:

Any

vibesketch.chem.species.properties(mol)

Formula, masses and InChI of a sanitized RDKit molecule.

Parameters:

mol (Any)

Return type:

Properties