vibesketch.naming

Names for drawn species, through vibe-qc’s naming engine when it is there.

vibeqc_naming is optional: it ships inside vibe-qc today (vibe-qc #536), so naming hides behind an install hint when it cannot be imported.

The engine’s names are checked before they are shown (vibe-qc #539 lists high-confidence wrong names). A name is mapped back to a structure and compared with the drawing by the connectivity block of the InChIKey, in two ways, because each of the engine’s back-mappings has faults of its own:

  1. the engine’s 3D structure for the name (structure_from_name), with bonds perceived by RDKit (rdDetermineBonds.DetermineBonds, RDKit’s implementation of xyz2mol: Kim and Kim, Bull. Korean Chem. Soc. 2015, 36, 1769);

  2. the engine’s SMILES for the name (smiles_from_name), which mangles carbonyl groups (vibe-qc #539).

The outcome:

  • verified: either mapping gives the drawn constitution;

  • rejected: the 3D structure gives a different, valid molecule, so the name describes something else and is not shown;

  • unverified: no mapping could check it (only a SMILES mismatch, or none at all), so it is shown as a suggestion with that caveat;

  • not-applicable: an ion or a radical, which the engine cannot name yet (it takes no charge or spin);

  • unavailable or failed: no engine, or no 3D structure to give it.

Names carry no stereodescriptors until the engine accepts them (vibe-qc #537); a verified name for a stereo-defined species says so in its note.

Functions

install_hint()

name_for(smiles[, charge, multiplicity])

The checked name of the species with this SMILES, charge and multiplicity.

naming_available()

smiles_for_name(name)

The SMILES the engine knows for name, or None; raises NamingUnavailable.

Classes

NameResult(status[, value, source, ...])

Exceptions

NamingUnavailable()

vibeqc_naming cannot be imported.

class vibesketch.naming.NameResult(status: 'Status', value: 'str | None' = None, source: 'str | None' = None, confidence: 'str | None' = None, note: 'str | None' = None)

Bases: object

Parameters:
  • status (Literal['verified', 'unverified', 'rejected', 'not-applicable', 'unavailable', 'failed'])

  • value (str | None)

  • source (str | None)

  • confidence (str | None)

  • note (str | None)

status: Literal['verified', 'unverified', 'rejected', 'not-applicable', 'unavailable', 'failed']
value: str | None = None
source: str | None = None
confidence: str | None = None
note: str | None = None
property shown: bool

Whether the name may be shown to the user at all.

exception vibesketch.naming.NamingUnavailable

Bases: RuntimeError

vibeqc_naming cannot be imported.

Return type:

None

vibesketch.naming.install_hint()
Return type:

str

vibesketch.naming.name_for(smiles, charge=0, multiplicity=1)

The checked name of the species with this SMILES, charge and multiplicity.

Parameters:
  • smiles (str)

  • charge (int)

  • multiplicity (int)

Return type:

NameResult

vibesketch.naming.naming_available()
Return type:

bool

vibesketch.naming.smiles_for_name(name)

The SMILES the engine knows for name, or None; raises NamingUnavailable.

Parameters:

name (str)

Return type:

str | None