candidates()
The stereocenter candidates of a species or a TS, with their neighbors.
Usage
candidates(
symbols,
connectivity,
)An atom candidate has at least 3 neighbors and neighbors + lone pairs = 4, except a nitrogen with 3 neighbors whose lone pair is conjugated (D41). An atom with 3 neighbors in a 3-membered ring is a candidate whatever its conjugation, which includes a carbon radical whose neighbors are saturated (D42). A bond candidate is rigid and planar, has a neighbor on each side, is in no ring of fewer than 8 atoms, and doesn’t join two atom candidates. The neighbors are listed hydrogens first, then the other atoms, each by ascending index (D21).
For a TS, the rules apply to each side, except that a nitrogen conjugated on one side is a candidate on neither: its TS geometry can be exactly planar (D41). An atom’s neighbors are those of the reactant side if it is a candidate there, else of the product side; an atom that is a candidate on both sides with different neighbors also gets the product-side ones in reverse_atoms (D26). A bond’s neighbors are united over the sides where it is rigid and planar, and the ring test follows the bonds of the whole TS, leaving and reaching the bond through its listed neighbors only.
Examples
>>> import amchi
>>> # CHFClBr and FN=NF
>>> connectivity = amchi.Connectivity(bonds=[(0, 1), (0, 2), (0, 3), (0, 4)])
>>> amchi.candidates(["C", "F", "Cl", "Br", "H"], connectivity).atoms{0: (4, 1, 2, 3)}
>>> connectivity = amchi.Connectivity(bonds=[(0, 1), (1, 2), (2, 3)])
>>> amchi.candidates(["F", "N", "N", "F"], connectivity).bonds{(1, 2): ((0,), (3,))}
>>> # An F atom moves from one C of CH3F to the other in the TS F...CH3...F
>>> connectivity = amchi.Connectivity(
... bonds=[(0, 1), (0, 2), (0, 3)], breaking=[(0, 4)], forming=[(0, 5)]
... )
>>> result = amchi.candidates(["C", "H", "H", "H", "F", "F"], connectivity)
>>> result.atoms, result.reverse_atoms({0: (1, 2, 3, 4)}, {0: (1, 2, 3, 5)})