Hi all, No error on rdkit 2022.09.04 boost 1_78 (Ubuntu 20.04). However I am able to reproduce the error on 2022.03.2, here it is:
**** Invariant Violation no eligible neighbors for chiral center Violation occurred on line 238 in file /project/build/temp.linux-x86_64-cpython-39/rdkit/Code/GraphMol/FileParsers/MolFileStereochem.cpp Failed Expression: nbrScores.size() **** ---------------------------------------------------------------------------RuntimeError Traceback (most recent call last)<ipython-input-2-b7212a330f82> in <module> 3 for m1 in Chem.SDMolSupplier("full.sdf", removeHs=False): 4 m2=Chem.RemoveHs(m1)----> 5 print (Chem.MolToMolBlock(m2)) RuntimeError: Invariant Violation no eligible neighbors for chiral center Violation occurred on line 238 in file Code/GraphMol/FileParsers/MolFileStereochem.cpp Failed Expression: nbrScores.size() RDKIT: 2022.03.2 BOOST: 1_75 In fact, just rendering m2 in the jupyter notebook using display() causes a crash RuntimeError: Invariant Violation no eligible neighbors for chiral center Violation occurred on line 238 in file Code/GraphMol/FileParsers/MolFileStereochem.cpp Failed Expression: nbrScores.size() RDKIT: 2022.03.2 BOOST: 1_75 This seems to be related to sulfoxide stereochemistry assignment, see this issue https://github.com/rdkit/rdkit/issues/2227 In any case, it seems like it is fixed in up-to-date rdkit. However, it looks like there is still a subtle stereochemistry related issue: if i convert m2 to SMILES I get: C[C@@H]1[C@@H](C)[C@H](C=C[At])[S@](=O)[C@@H]1*[SH]*=O I.e. the second sulfur (bolded) is not assigned stereochemistry, but the first one is. Both are asymmetric. best wishes wim On Wed, Feb 22, 2023 at 4:20 PM Greg Landrum <greg.land...@gmail.com> wrote: > Hi Ling, > > I can't reproduce this problem on windows using the most recent version of > the RDKit. > Which version of the RDKit are you using and how did you install it? > > Please also share exactly what you see for an error message. > > -greg > > > On Tue, Feb 21, 2023 at 7:03 AM Ling Chan <lingtrek...@gmail.com> wrote: > >> Dear colleagues, >> >> Don't know if this is a bug, or if my input molecule is not good. I >> suspect that it is the former. >> >> If you run the following on the file "full.sdf", it will crash at the >> MolToMolBlock line. >> >> for m1 in Chem.SDMolSupplier(inputsdf, removeHs=False): >> m2=Chem.RemoveHs(m1) >> print (Chem.MolToMolBlock(m2)) >> >> You can confirm that the problem is due to the stereo definition of the >> double bond, since if you edit the bond line " 4 5 2 3" to " 4 5 2 0" it >> will not crash. >> >> I tried to simplify the situation by boiling the molecule down to >> "simple.sdf". Unfortunately it does not crash any more. >> >> Thanks. >> >> 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 >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss