Indigo icon indicating copy to clipboard operation
Indigo copied to clipboard

CountStereocenters does not include non-resolved stereocenters

Open boglet opened this issue 1 year ago • 3 comments

Steps to Reproduce Simple Winforms application written in C# IndigoObject mol = indigo.loadMolecule("ClC(Br)CC"); int nstereo = mol.countStereocenters(); Console.WriteLine("Stereo = " + nstereo);

Expected behavior Would expect the unresolved chiral centre to be counted (Stereo = 1)

Actual behavior Result is: Stereo = 0

Indigo version
Indigo 1.12.0

Additional context This has been the behaviour since the earliest versions of Indigo. Chrial centers are only counted if they have a wedge or hash bond (or SMILES @/@@). If backward compatibility is required, perhaps a new method could be introduced? E.g. mol.countChiralCenters()

boglet avatar Jul 27 '23 10:07 boglet

Hello, @boglet. This is correct that chiral centers are only counted if they have a wedge or hash. It's only possible to guess if there is a chiral center without a 100% guarantee using some basic patterns. To detect the chiral centers without wedges and @ at least it's necessary to have correct 3D coordinates of atoms in the molecule.

If you want to count probable chiral centers we can add extra function like: mol.countPossibleChiralCenters

even1024 avatar Aug 09 '23 16:08 even1024

Many thanks for the reply @even1024 - your email implies that any wedge or hash bond will be included in the CountStereocenters algorithm. I've investigated further and can confirm this - even if it makes no sense (i.e. if the centre isn't chiral). For example: C[C@@H](C)CCl There are two methyl groups attached to the centre, meaning that it cannot be chiral but CountSetereocenters returns a count of 1.

I agree that to determine (R) or (S) then you would need a 3D structure if the connection table doesn't have chiral indicators, but to determine that the centre is chiral doesn't need this (it just needs to know that the centre has 4 different things attached to it (in the case of tetrahedral chirality). What is slightly more challenging is knowing if groups are different (particularly in the case of fairly symmetrical molecules). Nonetheless, it is still possible (RDkit and the Daylight toolkits both allow this).

Your suggestion of a new function "mol.countPossibleChiralCenters" would be an ideal addition. Perhaps it could be used to reject the example that I mentioned and indicate that the representation is incorrect?

boglet avatar Aug 10 '23 14:08 boglet

Moved to Refined Backlog since no fix over 6 versions

AlexeyGirin avatar Apr 18 '24 07:04 AlexeyGirin