From: Noel O'B. <bao...@gm...> - 2008-05-27 12:53:43
|
See http://openbabel.org/wiki/Install_%28source_code%29: """ If you are compiling directly from the Subversion repository, then you need to create the Python/Perl bindings yourself. To do so, you need to install the latest version of SWIG and to run configure as "configure --enable-maintainer-mode" """ It should work then, Noel 2008/5/27 Nick England <nic...@gm...>: > Thanks Chris, > > When testing this new SVN version, I get the following error when > trying to build the python bindings with > > python setup.py build > > file openbabel.py (for module openbabel) not found > file openbabel.py (for module openbabel) not found > running build_ext > building '_openbabel' extension > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall > -Wstrict-prototypes -fPIC -I../../include > -I/home/nwe23/bin/include/python2.5 -c openbabel_python.cpp -o > build/temp.linux-x86_64-2.5/openbabel_python.o > gcc: openbabel_python.cpp: No such file or directory > gcc: no input files > error: command 'gcc' failed with exit status 1 > > openbabel.py > openbabel_python.cpp > > are missing from the /scripts/python dir in the SVN repository, but > are listed in the MANIFEST file. > > Do these need to be built from SWIG or something? > > - Nick > > 2008/5/23 Chris Morley <c.m...@ds...>: >> Nick England wrote: >>> 2008/5/23 Noel O'Boyle <bao...@gm...>: >>>> 2008/5/23 Chris Morley <c.m...@ds...>: >>>>> I think Nick's suggestion is a good idea. >>>>> There could be a C++ function >>>>> >>>>> bool OBConversion::OpenInAndOutFiles(std::string infilename, std::string >>>>> outfilename); >> >> I've now added this to the development code. Here it is making an index >> and then substructure searching it. (Note that my Python is rather shaky.) >> I don't think the CloseOutFile() is necessary here but may be sometimes. >> It is a bit tedious compared with the babel command line, but maybe >> Pybel could help? >> >> >>> import openbabel >> >>> conv=openbabel.OBConversion() >> >>> conv.OpenInAndOutFiles("1200mols.smi","index.fs") >> True >> >>> conv.SetInAndOutFormats("smi","fs") >> True >> >>> conv.Convert() >> This will prepare an index of 1200mols.smi and may take some time... >> It took 6 seconds >> 1192 >> >>> conv.CloseOutFile() >> >>> conv.OpenInAndOutFiles("index.fs","results.smi") >> True >> >>> conv.SetInAndOutFormats("fs","smi") >> True >> >>> conv.AddOption("s",conv.GENOPTIONS,"C=CC#N") >> >>> conv.Convert() >> 10 candidates from fingerprint search phase >> 1202 >> >>> f=open("results.smi") >> >>> f.read() >> 'OC(=O)C(=Cc1ccccc1)C#N\t298\nN#CC(=Cc1ccccc1)C#N\t490\nO=N(=O)c1cc(ccc1)C=C(C#N >> )C#N\t491\nClc1ccc(cc1)C=C(C#N)C#N\t492\nClc1ccc(c(c1)Cl)C=C(C#N)C#N\t493\nClc1c >> cc(cc1Cl)C=C(C#N)C#N\t494\nBrc1ccc(cc1)C=C(C#N)C#N\t532\nClc1ccccc1C=C(C#N)C#N\t >> 542\nN#CC(=CC=Cc1occc1)C#N\t548\nCCOC(=O)C(C#N)=C(C)C\t1074\n' >> >>> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> OpenBabel-scripting mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |