Hi, I’m trying to generate 2Dpharmacophore fingerprints as described here
https://www.rdkit.org/docs/GettingStartedInPython.html#d-pharmacophore-fingerprints <https://www.rdkit.org/docs/GettingStartedInPython.html#d-pharmacophore-fingerprints> For the majority of molecules this works fine but for a few I get this error, any idea what the issue is? Chris qmol = Chem.MolFromSmiles('COc1ccc(C(C)C)cc1CN[C@H]1C2CCN(CC2)[C@H]1C(c1ccccc1)c1ccccc1') fpquery = Generate.Gen2DFingerprint(qmol,sigFactory) fpquery --------------------------------------------------------------------------- ValueError Traceback (most recent call last) ~/miniconda3/lib/python3.7/site-packages/rdkit/Chem/Pharm2D/SigFactory.py in GetBitIdx(self, featIndices, dists, sortIndices) 248 print('\tbins:', repr(self._bins), type(self._bins)) --> 249 bin_ = self._findBinIdx(dists, self._bins, self._scaffolds[len(dists)]) 250 except ValueError: ~/miniconda3/lib/python3.7/site-packages/rdkit/Chem/Pharm2D/SigFactory.py in _findBinIdx(self, dists, bins, scaffolds) 167 whichBins[i] = where --> 168 res = scaffolds.index(tuple(whichBins)) 169 if _verbose: ValueError: (0, 2, 0) is not in list During handling of the above exception, another exception occurred: IndexError Traceback (most recent call last) <ipython-input-23-254e36ab25ba> in <module> 1 qmol = Chem.MolFromSmiles('COc1ccc(C(C)C)cc1CN[C@H]1C2CCN(CC2)[C@H]1C(c1ccccc1)c1ccccc1') ----> 2 fpquery = Generate.Gen2DFingerprint(qmol,sigFactory) 3 fpquery ~/miniconda3/lib/python3.7/site-packages/rdkit/Chem/Pharm2D/Generate.py in Gen2DFingerprint(mol, sigFactory, perms, dMat, bitInfo) 160 for match in matchesToMap: 161 if sigFactory.shortestPathsOnly: --> 162 idx = _ShortestPathsMatch(match, perm, sig, dMat, sigFactory) 163 if idx is not None and bitInfo is not None: 164 l = bitInfo.get(idx, []) ~/miniconda3/lib/python3.7/site-packages/rdkit/Chem/Pharm2D/Generate.py in _ShortestPathsMatch(match, featureSet, sig, dMat, sigFactory) 71 dist[i] = d 72 ---> 73 idx = sigFactory.GetBitIdx(featureSet, dist, sortIndices=False) 74 if _verbose: 75 print('\t', dist, minD, maxD, idx) ~/miniconda3/lib/python3.7/site-packages/rdkit/Chem/Pharm2D/SigFactory.py in GetBitIdx(self, featIndices, dists, sortIndices) 252 fams = [fams[x] for x in featIndices] 253 raise IndexError('distance bin not found: feats: %s; dists=%s; bins=%s; scaffolds: %s' % --> 254 (fams, dists, self._bins, self._scaffolds)) 255 256 return startIdx + offset + bin_ IndexError: distance bin not found: feats: ['Acceptor', 'Aromatic', 'Hydrophobe']; dists=[1, 5, 1]; bins=[(0, 2), (2, 5), (5, 8)]; scaffolds: [0, [(0,), (1,), (2,)], 0, [(0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 1, 1), (0, 1, 2), (0, 2, 1), (0, 2, 2), (1, 0, 0), (1, 0, 1), (1, 0, 2), (1, 1, 0), (1, 1, 1), (1, 1, 2), (1, 2, 0), (1, 2, 1), (1, 2, 2), (2, 0, 1), (2, 0, 2), (2, 1, 0), (2, 1, 1), (2, 1, 2), (2, 2, 0), (2, 2, 1), (2, 2, 2)], 0]
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss