geometry_mismatches()
Where the graph and the geometry disagree, atom i on atom i.
Usage
geometry_mismatches(
gra,
geo,
)Bonds are perceived from covalent radii as from_geometry perceives them, and each determined LS’s parity is read with from_geometry’s readers. An LS the coordinates don’t decide (a flat centre, a double bond twisted by about 90°) is not a mismatch, and neither is an undetermined LS.
A reaction graph’s geometry is its TS’s: the bonds that neither break nor form are compared, the breaking and forming bonds must be partial (reacting_bonds), and the LS that don’t change and the determined ts slots are read, a slot on its listed neighbours (P69). An end point is checked on its side: geometry_mismatches(products(ts), geo).
>>> from protomol import embed, examples, from_smiles
>>> gra = examples.species()
>>> geometry_mismatches(gra, embed(gra))GeometryMismatches(missing_bonds=(), extra_bonds=(), reacting_bonds=(), stereo=())
>>> bool(geometry_mismatches(gra, embed(gra)))False
>>> geometry_mismatches(gra, embed(from_smiles(r"C[C@H](O)/C=C/C"))).stereo(1,)
Raises
GraphError-
If the geometry’s symbols differ from the graph’s.
NotImplementedError- For an LS kind the readers don’t read (only Tetrahedral, TrigonalBipyramidal, PlanarBond and AtropBond are read).