Hi guys,
i hope some can help.
I am trying to run the code from
<
https://www.mail-archive.com/[email protected]/msg00479.html
>
from rdkit import Chem
from rdkit.Chem import BRICS
base = Chem.MolFromSmiles("n1cncnc1OCC(C1CC1)OC1CNC1")
catalog = BRICS.BRICSDecompose(base)
print catalog
ms = BRICS.BRICSBuild(catalog)
ms = list(ms)
len(ms)
for m in ms[:5]: print Chem.MolToSmiles(m)
Brics is decomposing molecules correctly (as shown by print catalog)
and ms reports as a
<generator object BRICSBuild at 0x0000000009CBCA68>
But I get errors whenever I try to get structures from ms (see the
following trackback)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"C:\Anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py",
line 580, in runfile
execfile(filename, namespace)
File "//
ads.bris.ac.uk/filestore/myfiles/staff14/chxcja/Desktop/brics-test.py",
line 11, in <module>
ms = list(ms)
File "c:\RDKit\rdkit\Chem\BRICS.py", line 532, in BRICSBuild
if seed.HasSubstructMatch(rxn._matchers[0]):
AttributeError: 'str' object has no attribute 'HasSubstructMatch'
I am using Anaconda Python (Py2.7) on windows with RDKit_2014_09_02
Can anyone suggest what I'm doing wrong?
Thanks
Chris
--
Dr Christopher J. Arthur
School of Chemistry
University of Bristol
BRISTOL, BS8 1TS, UK
E-mail: [email protected]
Office: (+44 117) 331 7192
Mass Spectrometry Lab: (+44 117) 331 7358.
FAX: (+44 117) 927 7985
WWW URL: http://www.chm.bris.ac.uk/staff/carthur.htm
LinkedIn Profile: https://www.linkedin.com/in/drchrisarthur
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss