Re: [Rdkit-discuss] GetSubstructMatches
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
From: Jean-Marc N. <jm....@un...> - 2016-12-14 16:50:44
|
Sure, it works! Thanks, Greg. Jean-Marc Le 14/12/2016 à 17:43, Greg Landrum a écrit : > Hi Jean-Marc, > > The answer is in the error message, once you know how to read it, > which isn't really trivial: > > On Wed, Dec 14, 2016 at 5:35 PM, Jean-Marc Nuzillard > <jm....@un... <mailto:jm....@un...>> wrote: > > > Traceback (most recent call last): > File "glmap.py", line 11, in <module> > matches = mol.GetSubstructMatches(skel) > Boost.Python.ArgumentError: Python argument types in > Mol.GetSubstructMatches(Mol, str) > did not match C++ signature: > GetSubstructMatches(class RDKit::ROMol self, class RDKit::ROMol > query, bool uniquify=True, bool useChirality=False, bool > useQueryQueryMatches=False, unsigned int maxMatches=1000) > > > It's telling you that you called Mol.GetSubstructMatches was called > with a Mol and a string (the "Mol" is the object you're calling "mol" > and the string is the object you are calling "skel"). It expects, > however, to be called with a Mol and a Mol. > > If you convert skel into an RDKit molecule everything should work. > > -greg > -- Jean-Marc Nuzillard Institut de Chimie Moléculaire de Reims CNRS UMR 7312 Moulin de la Housse CPCBAI, Bâtiment 18 BP 1039 51687 REIMS Cedex 2 France Tel : 03 26 91 82 10 Fax : 03 26 91 31 66 http://www.univ-reims.fr/ICMR http://www.univ-reims.fr/LSD/ http://www.univ-reims.fr/LSD/JmnSoft/ |