Created
August 14, 2020 20:31
-
-
Save ptosco/36574d7f025a932bc1b8db221903a8d2 to your computer and use it in GitHub Desktop.
CanonicalReordering
Here's a more compact way using numpy:
m_neworder = tuple(np.argsort(Chem.CanonicalRankAtoms(m)))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks @ptosco, the gist saves the day!
For those who, like me, find it taxing to parse the expression in cells 5 and 6, here's the expression somewhat unpacked: