Hi Phil, The behavior you are seeing is by design. Here's the github issue where the change was made; it includes some discussion of why it's there: https://github.com/rdkit/rdkit/issues/553
A solution for you would be to temporarily remove the atom map numbers before calling AssignStereochemistry: In [12]: s_mapped = '[OH:1]CC([OH:4])CO' In [13]: mol = Chem.MolFromSmiles(s_mapped) In [14]: mol.GetAtomWithIdx(2).SetChiralTag(Chem.CHI_TETRAHEDRAL_CCW) In [17]: mapnos = [] In [18]: for at in mol.GetAtoms(): ...: mapnos.append(at.GetAtomMapNum()) ...: at.SetAtomMapNum(0) ...: In [19]: Chem.AssignStereochemistry(mol,force=True,cleanIt=True) In [21]: for i,mapno in enumerate(mapnos): ...: if mapno: ...: mol.GetAtomWithIdx(i).SetAtomMapNum(mapno) ...: In [22]: Chem.MolToSmiles(mol) Out[22]: 'OCC(C[OH:1])[OH:4]' Best, -greg On Mon, Apr 1, 2019 at 9:23 PM Phillip Yen via Rdkit-discuss < rdkit-discuss@lists.sourceforge.net> wrote: > Hello, > > > > I have a question stereocenters in symmetrical compounds. > > I’ve found that if I take a flat, mapped, symmetrical compound and > artificially set the chiral tag of the center carbon to form a > stereocenter, it won’t “correct itself” and remove the stereocenter when I > run AssignStereochemistry: > > > > s_mapped = [OH:1][CH2:2][CH:3]([OH:4])[CH2:5][OH:6] > > mol = Chem.MolFromSmiles(s_mapped) > > mol.GetAtomWithIdx(2).SetChiralTag(Chem.CHI_TETRAHEDRAL_CCW) > > Chem.AssignStereochemistry(mol, cleanIt=True, force=True) > > print(Chem.MolToSmiles(mol)) > > > > Output (still has the artifically introduced stereocenter): > > [OH:1][CH2:2][C@H:3]([OH:4])[CH2:5][OH:6] > > > > On the other hand, if I use an unmapped SMILES to create the mol and do > the exact same steps, then AssignStereochemistry does successfully remove > the artificially introduced stereocenter (which is what I want to happen > with the mapped mol too). > > > > s_unmapped = 'OCC(O)CO' > > mol = Chem.MolFromSmiles(s_unmapped) > > mol.GetAtomWithIdx(2).SetChiralTag(Chem.CHI_TETRAHEDRAL_CCW) > > Chem.AssignStereochemistry(mol, cleanIt=True, force=True) > > print(Chem.MolToSmiles(mol)) > > OCC(O)CO > > > > Is this normal rdkit behavior (to have this difference between using an > unmapped vs mapped mol)? How can I get it so that the mapped mol doesn’t > have that chiral tag anymore? > > > > Thanks for the help. > > > > Phil > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss