Hello, I found two issues which are reproducible in 2016.09 and 2017.3 conda builds.
0. The first issue is related to PostgreSQL. If I try to install it from conda it asks me to downgrade rdkit to 2016.3. After downgrading of rdkit psql works well. 1. Generation of 2D pharmacophore fingerprints using default parameters returns errors for some molecules. However if I add trianglePruneBins=False option to initialization procedure of a signature factory it starts working. It seems that Gen2DFingerprint ignores trianglePruneBins parameter. Below is a code example: from rdkit import Chem from rdkit import RDConfig from rdkit.Chem.Pharm2D.SigFactory import SigFactory from rdkit.Chem.Pharm2D import Generate import os fdefName = os.path.join(RDConfig.RDDataDir,'BaseFeatures.fdef') factory = ChemicalFeatures.BuildFeatureFactory(fdefName) sigFactory = SigFactory(factory, minPointCount=2, maxPointCount=3, trianglePruneBins=True) # replace to False and the error will disappear(True is a default value) sigFactory.SetBins([(0,2),(2,5),(5,8)]) sigFactory.Init() mol = Chem.MolFromSmiles('Cc1nc(CN(C)c2ncnc3ccc(-c4ccc5c(c4)OCO5)cc23)cs1') fp = Generate.Gen2DFingerprint(mol, sigFactory) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) /home/pavlo/anaconda3/envs/rdk_2017_3/lib/python3.6/site-packages/rdkit/Chem/Pharm2D/SigFactory.py in GetBitIdx(self, featIndices, dists, sortIndices) 249 print('\tbins:', repr(self._bins), type(self._bins)) --> 250 bin_ = self._findBinIdx(dists, self._bins, self._scaffolds[len(dists)]) 251 except ValueError: /home/pavlo/anaconda3/envs/rdk_2017_3/lib/python3.6/site-packages/rdkit/Chem/Pharm2D/SigFactory.py in _findBinIdx(self, dists, bins, scaffolds) 169 whichBins[i] = where --> 170 res = scaffolds.index(tuple(whichBins)) 171 if _verbose: ValueError: (2, 0, 0) is not in list During handling of the above exception, another exception occurred: IndexError Traceback (most recent call last) <ipython-input-8-0e6b1a52de56> in <module>() 1 # from rdkit.Chem.Pharm2D import Generate 2 mol = Chem.MolFromSmiles('Cc1nc(CN(C)c2ncnc3ccc(-c4ccc5c(c4)OCO5)cc23)cs1') ----> 3 fp = Generate.Gen2DFingerprint(mol, sigFactory) /home/pavlo/anaconda3/envs/rdk_2017_3/lib/python3.6/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, []) /home/pavlo/anaconda3/envs/rdk_2017_3/lib/python3.6/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) /home/pavlo/anaconda3/envs/rdk_2017_3/lib/python3.6/site-packages/rdkit/Chem/Pharm2D/SigFactory.py in GetBitIdx(self, featIndices, dists, sortIndices) 253 fams = [fams[x] for x in featIndices] 254 raise IndexError('distance bin not found: feats: %s; dists=%s; bins=%s; scaffolds: %s' % --> 255 (fams, dists, self._bins, self._scaffolds)) 256 257 return startIdx + offset + bin_ IndexError: distance bin not found: feats: ['Acceptor', 'Aromatic', 'Aromatic']; dists=[5, 1, 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] Kind regards, Pavel. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss