Hi Ling, The initial smiles you wrote represents radical carbons with 3 unpaired valence electrons each as they don't have hydrogens and hence even after removing the isotope information, the smiles reflect this. I believe you wanted to write ethane with isotope 13 carbons: '[13CH3][13CH3]'. Your code is correct and you will obtain 'CC' as you are expecting with the ethane smiles.
Cheers, Fio On Sat, Apr 17, 2021 at 4:05 PM Ling Chan <lingtrek...@gmail.com> wrote: > Hello colleagues, > > I am trying to "unisotope" a molecule. When I print out the smiles of the > processed molecule, the atoms that were unisotoped were surrounded by > square brackets. Is there any way to get rid of these brackets? > > >>> m = Chem.MolFromSmiles("[13C][13C]") > >>> for a in m.GetAtoms(): > ... a.SetIsotope(0) > ... > >>> Chem.MolToSmiles(m) > '[C][C]' > > Thank you. > > Ling > > _______________________________________________ > 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