Hi,
First of all, thanks to the rdkit developers for making available this
incredibly powerful package.
I am trying to get an example script taken from the rdkit documentation to
work, and it is generating an "Invariant Violation" error. The example script
and the exact error message it generates is listed below. Any ideas on what is
causing this error?
Best regards,
Konrad
Environment: Rdkit version 2014.09.2, Python 2.7.9, running on Mac OS X,
installed with “brew install --HEAD rdkit”.
Example script taken from: "identify fragments that distinguish actives from
inactive”, Getting Started with the RDKit in Python, Release 2015.09.1, page 54.
======== begin active_fragments.py =======
import os
from rdkit import Chem
from rdkit.ML.InfoTheory import InfoBitRanker
from rdkit.Chem import FragmentCatalog
from rdkit import RDConfig
fName=os.path.join(RDConfig.RDDataDir,'FunctionalGroups.txt')
fparams = FragmentCatalog.FragCatParams(1,6,fName)
# fparams.GetNumFuncGroups()
fcat = FragmentCatalog.FragCatalog(fparams)
fpgen = FragmentCatalog.FragFPGenerator()
suppl = Chem.SDMolSupplier('bzr.sdf')
sdms = [x for x in suppl]
acts = [float(x.GetProp('ACTIVITY')) for x in sdms]
fps = [fpgen.GetFPForMol(x,fcat) for x in sdms]
ranker = InfoBitRanker(len(fps[0]),2)
for i,fp in enumerate(fps):
act = int(acts[i]>7)
ranker.AccumulateVotes(fp,act)
top5 = ranker.GetTopN(5)
for id,gain,n0,n1 in top5:
print(int(id),'%.3f '%gain,int(n0),int(n1))
======== end active_fragments.py =======
****
Invariant Violation
catalog does not contain any entries of the order specified
Violation occurred on line 424 in file /tmp/rdkit-UIZPcR/Code/Catalogs/Catalog.h
Failed Expression: elem!=d_orderMap.end()
****
Traceback (most recent call last):
File "active_fragments.py", line 18, in <module>
fps = [fpgen.GetFPForMol(x,fcat) for x in sdms]
RuntimeError: Invariant Violation
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss