Open bp-kelley opened 12 months ago
This was noted in discussion #6881
Here's a more compact form of this (generated using v2023.09.3):
smi = "NC(F)C(I)C(F)N"
Chem.SetUseLegacyStereoPerception(False)
m = Chem.MolFromSmiles(smi)
print('\n'.join([Chem.MolToSmiles(x) for x in EnumerateStereoisomers(m)]))
Chem.SetUseLegacyStereoPerception(True)
m = Chem.MolFromSmiles(smi)
print('\n'.join([Chem.MolToSmiles(x) for x in EnumerateStereoisomers(m)]))
Output is:
N[C@H](F)[C@H](I)[C@@H](N)F
N[C@@H](F)[C@H](I)[C@@H](N)F
N[C@H](F)[C@@H](I)[C@@H](N)F
N[C@@H](F)[C@@H](I)[C@@H](N)F
N[C@H](F)[C@H](I)[C@H](N)F
N[C@H](F)[C@@H](I)[C@H](N)F
and
N[C@H](F)C(I)[C@@H](N)F
N[C@@H](F)C(I)[C@@H](N)F
N[C@H](F)C(I)[C@H](N)F
Accepting for the moment that we don't correctly deal with meso compounds, I believe that the correct answer here is:
N[C@H](F)[C@H](I)[C@@H](N)F
N[C@H](F)[C@@H](I)[C@@H](N)F
N[C@@H](F)C(I)[C@@H](N)F
N[C@H](F)C(I)[C@H](N)F
So neither of them is actually providing the correct answer
I didn't think we supported the last two forms of chirality yet.
I didn't think we supported the last two forms of chirality yet.
I'm not sure what you mean by this. Which last two forms?
I was talking about mess compound (the first two).
Ignoring the central Carbon, I think these are all unique
N[C@H](F)C(I)[C@@H](N)F
N[C@@H](F)C(I)[C@@H](N)F
N[C@H](F)C(I)[C@H](N)F
Visual inspection seems to agree, but I'll need to break out the model kit to be sure...
This issue was marked as stale because it has been open for 90 days with no activity.
Example of the issue:
Outputs 6 for non legacy stereo (incorrect) and 3 for legacy stereo (correct)
I believe that this is caused by a change in steps. The legacy stereo perception also created CIP codes so the central Carbon would be noted to not be chiral. The newer code does this later in the sanitization step.
If we add a sanitization to EnumerateStereoisomers (line 340), this fixes the behavior.