This list is closed, nobody may subscribe to it.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
(10) |
Dec
(22) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(3) |
Feb
(10) |
Mar
(5) |
Apr
(12) |
May
(8) |
Jun
(9) |
Jul
(3) |
Aug
(11) |
Sep
|
Oct
(26) |
Nov
(21) |
Dec
(20) |
2007 |
Jan
(10) |
Feb
(32) |
Mar
(14) |
Apr
(13) |
May
(44) |
Jun
(13) |
Jul
(18) |
Aug
(26) |
Sep
(17) |
Oct
(3) |
Nov
(10) |
Dec
(8) |
2008 |
Jan
(20) |
Feb
(8) |
Mar
(28) |
Apr
(18) |
May
(22) |
Jun
(13) |
Jul
(4) |
Aug
(2) |
Sep
(19) |
Oct
(17) |
Nov
(8) |
Dec
(10) |
2009 |
Jan
(4) |
Feb
(3) |
Mar
(12) |
Apr
(15) |
May
(7) |
Jun
(1) |
Jul
(13) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(14) |
Dec
(13) |
2010 |
Jan
(9) |
Feb
(6) |
Mar
(21) |
Apr
(12) |
May
(4) |
Jun
|
Jul
(2) |
Aug
(15) |
Sep
(3) |
Oct
(1) |
Nov
(18) |
Dec
(6) |
2011 |
Jan
(7) |
Feb
(13) |
Mar
(17) |
Apr
(7) |
May
(16) |
Jun
(21) |
Jul
(15) |
Aug
(11) |
Sep
(12) |
Oct
(3) |
Nov
(14) |
Dec
(4) |
2012 |
Jan
(10) |
Feb
(4) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(3) |
Dec
(1) |
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Eiso AB <e....@ch...> - 2007-08-27 12:25:42
|
hi if I import pybel , my python session seqfaults on exit. I can do stuff with pybel before exit as normal. without importing pybel exit is also normal []$ python2.3 Python 2.3.4 (#1, Oct 9 2006, 18:22:22) [GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pybel >>> [Crtl-D] Segmentation fault the same happens for python2.4 []$ python2.4 Python 2.4.2 (#8, Jan 25 2006, 19:03:28) [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pybel >>> [Crtl-D] Segmentation fault can anyone give me a clue how I can prevent or find the cause of this behaviour. thanks in advance, Eiso AB |
From: Noel O'B. <bao...@gm...> - 2007-08-26 17:27:54
|
On 26/08/07, Felix Plasser <fel...@gm...> wrote: > hi, > the problem was that the file iconf.dll is not contained in the openbabel > for python distribution. Oh, oh - sorry about that. I should have tested this better. > what I did is changing the BABELDATA_DIR to the > folder where the regular openbabel was already installed. then I could a= lso > erase all the .dll files and the openbabel_data folder and it still works > and I like it. > > it may be a good idea if one could just download the python packages and > would not have to download everything else again. Sure - this is what we want to do. I will try to reproduce this problem and fix it. > Felix > > -----Urspr=FCngliche Nachricht----- > Von: Noel O'Boyle [mailto:bao...@gm...] > Gesendet: Samstag, 25. August 2007 19:40 > An: Felix Plasser > Cc: ope...@li... > Betreff: Re: [Open Babel] Open Babel in Python > > (I've moved this thread to openbabel-scripting instead) > > On 24/08/07, Felix Plasser <fel...@gm...> wrote: > > I installed the Open Babel for Python 2.5 > > (openbabel-python-1.2.1.py2.5.exe) on my Windows XP > > Professional machine. > > > > My problem is that there is an error when I try "import openbabel": > > > > the module _openbabel is not found. when I check the folder, there real= ly > is > > no _openbabel file there. the only file like it is _openbabel.pyd (whic= h > is > > not a Python file). > > On my computer, in C:\Program Files\Python2.5\Lib\site-packages I have: > OpenBabelDLL.dll, _openbabel.pyd, and openbabel.py. > > The most common problem is a mix up between different versions of the > installed python. Can you make sure that: (a) you have Python2.5 > installed, (b) that you have installed the Python 2.5 version of OB > (which you seem to have done), and (c) that you are running this > particular version when you are typing "import openbabel". You may > find it helpful to use "python -v" when starting python, and > doublecheck all the paths. > > It really should work first time, so let us know if there is still a > problem. > > Noel > > > > > > ------- > > > > Felix Plasser > > > > fel...@gm... > > > > www.chemical-quantum-images.blogspot.com > > > > > > -----------------------------------------------------------------------= -- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > OpenBabel-discuss mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss > > > > > > |
From: Noel O'B. <bao...@gm...> - 2007-08-25 17:40:21
|
(I've moved this thread to openbabel-scripting instead) On 24/08/07, Felix Plasser <fel...@gm...> wrote: > I installed the Open Babel for Python 2.5 > (openbabel-python-1.2.1.py2.5.exe) on my Windows XP > Professional machine. > > My problem is that there is an error when I try "import openbabel": > > the module _openbabel is not found. when I check the folder, there really is > no _openbabel file there. the only file like it is _openbabel.pyd (which is > not a Python file). On my computer, in C:\Program Files\Python2.5\Lib\site-packages I have: OpenBabelDLL.dll, _openbabel.pyd, and openbabel.py. The most common problem is a mix up between different versions of the installed python. Can you make sure that: (a) you have Python2.5 installed, (b) that you have installed the Python 2.5 version of OB (which you seem to have done), and (c) that you are running this particular version when you are typing "import openbabel". You may find it helpful to use "python -v" when starting python, and doublecheck all the paths. It really should work first time, so let us know if there is still a problem. Noel > > > ------- > > Felix Plasser > > fel...@gm... > > www.chemical-quantum-images.blogspot.com > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > OpenBabel-discuss mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss > > |
From: <an...@av...> - 2007-08-23 08:49:48
|
Dear members and subscribers, I am interested in cleaving a host of chemical compound structures to the smallest fragment possible.I would like to have script for doing the same. Regards Anand |
From: Dieden R. <Rei...@uc...> - 2007-08-21 12:22:30
|
Hello, Hadn't too many problems with installation but when I try out the exampe script I get : perl /usr/local/src/openbabel-2.1.1/scripts/perl/examples/example.pl *** glibc detected *** free(): invalid pointer: 0x09b9d1d4 *** Aborted Any hint ? Cheers, Reiner ---------------------------------------------------------=20 Legal Notice: This electronic mail and its attachments are intended = solely for the person(s) to whom they are addressed and contain = information which is confidential or otherwise protected from = disclosure, except for the purpose for which they are intended. = Dissemination, distribution, or reproduction by anyone other than the = intended recipients is prohibited and may be illegal. If you are not an = intended recipient, please immediately inform the sender and return the = electronic mail and its attachments and destroy any copies which may be = in your possession. UCB screens electronic mails for viruses but does = not warrant that this electronic mail is free of any viruses. UCB = accepts no liability for any damage caused by any virus transmitted by = this electronic mail. ---------------------------------------------------------=20 |
From: Noel O'B. <bao...@gm...> - 2007-08-09 09:32:36
|
Sorry - I've no idea, and our resident perl expert is away at the moment. But... (1) Did you run "make install" first? (2) Is babel working correctly? (i.e. does babel -H list all of the formats) (3) If so...maybe $obConversion wasn't created correctly... Change: $obConversion->SetInAndOutFormats("smi", "mdl"); to $myperlvariable = $obConversion->SetInAndOutFormats("smi", "mdl"); and then test that the value of $myperlvariable is TRUE. Regards, Noel On 08/08/07, David Rose <tom...@gm...> wrote: > Hi: > > I've just installed openbabel-2.1.1 from source without incident (though > make and configure outputs are attached), and when I then create the perl > makefile and run make, I also experience no errors). However, when I run > 'make test', the conversion test fails: > > > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > t/atom.............ok > t/bond.............ok > t/conversion.......FAILED tests 5-6, 8 > > Failed 3/9 tests, 66.67% okay > t/data.............ok > t/format...........ok > > t/internalcoord....ok > t/mol..............ok > t/residue..........ok > > Failed Test Stat Wstat Total Fail Failed List of Failed > ------------------------------------------------------------------------------- > t/conversion.t 9 3 33.33% 5-6 8 > Failed 1/8 test scripts, 87.50% okay. 3/35 subtests failed, 91.43% okay. > make: *** [test_dynamic] Error 2 > Doing a little debugging of the conversion test script, it looks like the > line: > > > $obConversion->ReadString($obMol,"C1=CC=CS1"); > > > is failing silently as it creates an empty $obMol object, with no atoms. > Also, the line: > > $obConversion->WriteFile($obMol, "test.mdl"); > > appears to be failing silently as no file is created. > > Any ideas about what might be going on? I am installing on an Apple XServe > (G5) running Mac OS X Server 10.4.10. > > > thanks, > David > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > > |
From: Noel O'B. <bao...@gm...> - 2007-08-05 13:06:55
|
QWN0dWFsbHksIGl0IGFsbCBsb29rcyBmaW5lIC0gSSBnZXQgdGhlIHNhbWUgd2FybmluZyBtZXNz YWdlcy4KRGVwZW5kaW5nIG9uIHRoZSBhbW91bnQgb2YgUkFNIGF2YWlsYWJsZSBpdCBjYW4gdGFr ZSBhIGdvb2QgZmV3Cm1pbnV0ZXMgdG8gY29tcGlsZSB0aGUgYmluZGluZ3MuCgpOb2VsCgpPbiAw NC8wOC8w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W5kbGljaGVuIEdyw7zDn2VuL3JlY3VlcmRvcy9tZWlsbGV1cmVzIHNhbHV0YXRpb25zLwpkaXN0 aW50aSBzYWx1dGkvc2lvbmcvZHXDrCB5w7ov0L/RgNC40LLQtdGCCgpKdXJnZW5zIGRlIEJydWlu Cg== |
From: Noel O'B. <bao...@gm...> - 2007-08-02 15:25:30
|
Here are three different ways to access this data from Python, hopefully one of which can be modified to work from Perl. If these don't work, I'm sure that Geoff will be able to help once he gets back from a well-deserved break: >>> c = smarts.obsmarts.GetUMapList() >>> dir(c) ['__class__', '__del__', '__delattr__', '__delitem__', '__delslice__', '__dict__ ', '__doc__', '__getattr__', '__getattribute__', '__getitem__', '__getslice__', '__hash__', '__init__', '__iter__', '__len__', '__module__', '__new__', '__nonze ro__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setitem__', '__setslice__', '__str__', '__swig_destroy__', '__swig_getmethods__', '__swig_se tmethods__', '__weakref__', 'append', 'assign', 'back', 'begin', 'capacity', 'cl ear', 'empty', 'end', 'erase', 'front', 'get_allocator', 'insert', 'iterator', ' pop', 'pop_back', 'push_back', 'rbegin', 'rend', 'reserve', 'resize', 'size', 's wap', 'this'] >>> c <openbabel.vvInt; proxy of <Swig Object of type 'std::vector<std::vector<int,std ::allocator<int > >,std::allocator<std::vector<int,std::allocator<int > > > > *' at 0x125bc18> > ****** Method 1 (by index) ******* >>> c[0] (1, 2) >>> c[1] (4, 5) >>> c[2] (6, 7) >>> c.size() 3 ****** Method 2 (by std::vector iterator) ******* >>> c.begin() <openbabel.PySwigIterator; proxy of <Swig Object of type 'swig::PySwigIterator * ' at 0x125d938> > >>> d = c.begin() >>> d.next() (1, 2) >>> d.next() (4, 5) >>> d.next() (6, 7) ****** Method 3 (by Python iterator) ******* >>> for x in c: ... print x ... (1, 2) (4, 5) (6, 7) Noel On 02/08/07, Kieron Taylor <kr...@so...> wrote: > Duangrudee Tanramluk wrote: > > Thanks a lot Noel. My problem is not about matching, but about how to retreive > > the data from the maplist. I have tried treating it as an array but it > > doesn't seem to be either a simple array or a 2D array. > > > > Duangrudee > > > >>>> > >>>> my $obsmartpattern = new > >>>> Chemistry::OpenBabel::OBSmartsPattern; > >>>> > >>>> $obsmartpattern->Init('n1c2ccccc2ccc1'); > >>>> > >>>> $obsmartpattern->Match($obMol); > >>>> > >>>> > >>>> I guess the next step should be: > >>>> > >>>> my $maplist = $obsmartpattern->GetUMapList(); > > If I had to guess, I would say $maplist might be a pointer rather than > an array in its own right. My suggestions for you to try: > > 1) Check the boolean result of $obsmartpattern->Match($obMol); > > If it's not matching anything, then there may not be a list to return. > > 2) Try dereferencing $maplist in some way. > > The documentation says the method returns: > std::vector< std::vector< int > > > > In Perl you might have to interpret this as: > $maplist->[$index1]->[$index2] > > Alternatively you can try forcing treatment as an array eg. > @{$maplist}[$index1]....... > > In any case, when fighting with APIs, I find it very helpful to use a > live debugger to look at the memory structures. ddd or ptkdb can do this > for you. > > Once you've worked out what you're dealing with, you can write neater > code to catch the data structure you're receiving from Babel. Without an > appropriate object, you will struggle to use the iterator class used in > the sample code. > > 3) Find the secret or generic class for iterators that will give you > something to drop the output of $obsmartpattern->BeginMList() into. I've > not had much luck looking for it so far. It may not exist, since the c++ > sample code already seems to understand what an iterator is. > > > Good luck, > > Kieron > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Kieron T. <kr...@so...> - 2007-08-02 15:09:44
|
Duangrudee Tanramluk wrote: > Thanks a lot Noel. My problem is not about matching, but about how to retreive > the data from the maplist. I have tried treating it as an array but it > doesn't seem to be either a simple array or a 2D array. > > Duangrudee > >>>> >>>> my $obsmartpattern = new >>>> Chemistry::OpenBabel::OBSmartsPattern; >>>> >>>> $obsmartpattern->Init('n1c2ccccc2ccc1'); >>>> >>>> $obsmartpattern->Match($obMol); >>>> >>>> >>>> I guess the next step should be: >>>> >>>> my $maplist = $obsmartpattern->GetUMapList(); If I had to guess, I would say $maplist might be a pointer rather than an array in its own right. My suggestions for you to try: 1) Check the boolean result of $obsmartpattern->Match($obMol); If it's not matching anything, then there may not be a list to return. 2) Try dereferencing $maplist in some way. The documentation says the method returns: std::vector< std::vector< int > > In Perl you might have to interpret this as: $maplist->[$index1]->[$index2] Alternatively you can try forcing treatment as an array eg. @{$maplist}[$index1]....... In any case, when fighting with APIs, I find it very helpful to use a live debugger to look at the memory structures. ddd or ptkdb can do this for you. Once you've worked out what you're dealing with, you can write neater code to catch the data structure you're receiving from Babel. Without an appropriate object, you will struggle to use the iterator class used in the sample code. 3) Find the secret or generic class for iterators that will give you something to drop the output of $obsmartpattern->BeginMList() into. I've not had much luck looking for it so far. It may not exist, since the c++ sample code already seems to understand what an iterator is. Good luck, Kieron |
From: Duangrudee T. <dt...@ca...> - 2007-08-02 14:30:28
|
Thanks a lot Noel. My problem is not about matching, but about how to retreive the data from the maplist. I have tried treating it as an array but it doesn't seem to be either a simple array or a 2D array. Duangrudee On Wednesday 01 August 2007 16:43, you wrote: > Why not try an easier example to begin with? > > In the Python docs, the example I use is the SMILES string for > triethylamine "CCN(CC)CC", in which I search for ethyl groups (Smarts > pattern "[#6][#6]"), and the result is three matches, one for each > ethyl: > [(1, 2), (4, 5), (6, 7)] > > (Note that OpenBabel indexes atoms from 1) > > Noel > > On 01/08/07, Noel O'Boyle <bao...@gm...> wrote: > > On 01/08/07, Duangrudee Tanramluk <DT...@ca...> wrote: > > First of all, I'm delighted to see someone (else!) using Open Babel in > > Cambridge. > > > > > I am trying to print out a list of atom index and a mol2 file > > > containing the substructure which matches the SMARTS query. > > > > > > > > > > > > Below is what I have written so far: > > > > > > > > > > > > my $file_to_read = "test.pdb"; > > > > > > my $obMol = new Chemistry::OpenBabel::OBMol; > > > > > > my $obConverter = new Chemistry::OpenBabel::OBConversion; > > > > > > $obConverter->SetInAndOutFormats("pdb","mol2"); > > > > > > $obConverter->ReadFile($obMol,$file_to_read); > > > > > > > > > > > > my $obsmartpattern = new > > > Chemistry::OpenBabel::OBSmartsPattern; > > > > > > $obsmartpattern->Init('n1c2ccccc2ccc1'); > > > > > > $obsmartpattern->Match($obMol); > > > > > > > > > > > > I guess the next step should be: > > > > > > > > > > > > my $maplist = $obsmartpattern->GetUMapList(); > > > > > > > > > > > > However, I have no success in iterating through the maplist to print > > > out which atoms match the SMARTS by using Perl. Any suggestion of how > > > to print out the atoms would be greatly appreciated. > > > > Well, you're doing everything correctly and it should work. $maplist > > should be a list of a list of integers. In Perl, I think you should be > > using @maplist and not $maplist. But I'm not a Perl programmer. Maybe > > someone else can comment. > > > > Noel |
From: Pascoe, S \(Stephen\) <S.P...@rl...> - 2007-08-02 13:42:31
|
=20 Many thanks for these valuable links. I worked out that my real problem was a lack of understanding of how to use fingerprints. I cam across this excellent introduction: http://www.daylight.com/dayhtml/doc/theory/theory.finger.html Which made everything clear. I think for my application it is overkill to use an embedded OpenBabel in the database (although It's good to know implementations are being developed). I can just fold the fingerprints down to a reasonable number of bytes, store them raw and use bit logic in my SQL queries to select molecules that might contain a substructure. Cheers, Stephen. --- Stephen Pascoe +44 (0)1235 445980 British Atmospheric Data Centre Rutherford Appleton Laboratory -----Original Message----- From: Noel O'Boyle [mailto:bao...@gm...]=20 Sent: 01 August 2007 14:09 To: Pascoe, S (Stephen) Subject: Re: [OpenBabel-scripting] FastSearchIndexer from python Here is some more discussion on the OpenBabel lists: http://www.nabble.com/Mychem-t3656537.html On 01/08/07, Noel O'Boyle <bao...@gm...> wrote: > Well, first of all, check out the solutions that people have already used. See: > http://depth-first.com/articles/2007/04/13/roll-your-own-chemical-data > base-with-free-components and especially the comments by Rajarshi. > > There's Mychem at: > http://mychem.sourceforge.net/ > I suggest you contact Jerome Pansanel for more info if interested. > > Also, http://www.unm.edu/~tharun/smdb.html > > If you want to do it yourself, you will need to add some sort of field > for holding bits (or lots of fields with binary values) and set the=20 > field based on myfp.bits. Hopefully, the other options provide simpler > solutions for substructure searching. You may be able to do clever=20 > things like sort the bits by which help subdivide the space as quickly > as possible if you want to max out on speed. > > Noel > > On 01/08/07, Pascoe, S (Stephen) <S.P...@rl...> wrote: > > I have a MySQL database containing SMILES strings and want to do=20 > > substructure search on them. I decided that the best way to do this > > would be to build a FastSearch index file that mirrors the=20 > > information in the database. > > > > Of course I could dump the SMILES string to a file and use the babel > > command line program but I was hoping that it would be possible to=20 > > do completely within the python bindings. > > > > I read that FastSearch uses fingerprints but I have no idea how=20 > > these are used. Maybe there is a way to store fingerprints in MySQL > > for use in substructure searching? > > > > Many Thanks, > > Stephen. > > > > > > --- > > Stephen Pascoe +44 (0)1235 445980 > > British Atmospheric Data Centre > > Rutherford Appleton Laboratory > > > > -----Original Message----- > > From: Noel O'Boyle [mailto:bao...@gm...] > > Sent: 01 August 2007 13:30 > > To: Pascoe, S (Stephen) > > Cc: ope...@li... > > Subject: Re: [OpenBabel-scripting] FastSearchIndexer from python > > > > Python doesn't do streams, at least not in the C++ sense. So the=20 > > current FastSearchIndexer is a no go. However, perhaps you could=20 > > describe the exact problem and I can try to help you up with a=20 > > general solution from Python. > > > > Noel > > > > On 01/08/07, Pascoe, S (Stephen) <S.P...@rl...> wrote: > > > I am trying to build a FastSearch index file from Python. There=20 > > > appears to be a openbabel.FastSearchIndexer class but I have so=20 > > > far failed to instantiate it. The class requires an ostream=20 > > > object, which > > > > > I recognise from C++ but don't know how to create in python. E.g. > > > > > > >>> fs =3D openbabel.FastSearchIndexer('test.smi', fh, 'FP2', 0) > > > Traceback (most recent call last): > > > File "<stdin>", line 1, in <module> > > > File=20 > > > "/opt/python-2.5.1/lib/python2.5/site-packages/openbabel.py", > > > line 2115, in __init__ > > > > > > _openbabel.FastSearchIndexer_swiginit(self,_openbabel.new_FastSear > > > chIn > > > de > > > xer(*args)) > > > NotImplementedError: Wrong number of arguments for overloaded=20 > > > function > > > > > 'new_FastSearchIndexer'. > > > Possible C/C++ prototypes are: > > > OpenBabel::FastSearchIndexer(std::string &,std::ostream=20 > > > *,std::string &,int) > > > OpenBabel::FastSearchIndexer(std::string &,std::ostream=20 > > > *,std::string &) > > > OpenBabel::FastSearchIndexer(OpenBabel::FptIndex=20 > > > *,std::ostream *) > > > > > > Where fh is a python file object. Can anyone help? > > > > > > Thanks, > > > Stephen. > > > > > > --- > > > Stephen Pascoe +44 (0)1235 445980 British Atmospheric Data Centre > > > Rutherford Appleton Laboratory > > > > > > ------------------------------------------------------------------ > > > ---- > > > --- This SF.net email is sponsored by: Splunk Inc. > > > Still grepping through log files to find problems? Stop. > > > Now Search log events and configuration files using AJAX and a > > browser. > > > Download your FREE copy of Splunk now >> http://get.splunk.com/=20 > > > _______________________________________________ > > > OpenBabel-scripting mailing list > > > Ope...@li... > > > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > > > > > |
From: Noel O'B. <bao...@gm...> - 2007-08-01 15:43:34
|
Why not try an easier example to begin with? In the Python docs, the example I use is the SMILES string for triethylamine "CCN(CC)CC", in which I search for ethyl groups (Smarts pattern "[#6][#6]"), and the result is three matches, one for each ethyl: [(1, 2), (4, 5), (6, 7)] (Note that OpenBabel indexes atoms from 1) Noel On 01/08/07, Noel O'Boyle <bao...@gm...> wrote: > On 01/08/07, Duangrudee Tanramluk <DT...@ca...> wrote: > First of all, I'm delighted to see someone (else!) using Open Babel in > Cambridge. > > > I am trying to print out a list of atom index and a mol2 file containing the > > substructure which matches the SMARTS query. > > > > > > > > Below is what I have written so far: > > > > > > > > my $file_to_read = "test.pdb"; > > > > my $obMol = new Chemistry::OpenBabel::OBMol; > > > > my $obConverter = new Chemistry::OpenBabel::OBConversion; > > > > $obConverter->SetInAndOutFormats("pdb","mol2"); > > > > $obConverter->ReadFile($obMol,$file_to_read); > > > > > > > > my $obsmartpattern = new > > Chemistry::OpenBabel::OBSmartsPattern; > > > > $obsmartpattern->Init('n1c2ccccc2ccc1'); > > > > $obsmartpattern->Match($obMol); > > > > > > > > I guess the next step should be: > > > > > > > > my $maplist = $obsmartpattern->GetUMapList(); > > > > > > > > However, I have no success in iterating through the maplist to print out > > which atoms match the SMARTS by using Perl. Any suggestion of how to print > > out the atoms would be greatly appreciated. > > > Well, you're doing everything correctly and it should work. $maplist > should be a list of a list of integers. In Perl, I think you should be > using @maplist and not $maplist. But I'm not a Perl programmer. Maybe > someone else can comment. > > Noel > |
From: Noel O'B. <bao...@gm...> - 2007-08-01 15:38:48
|
On 01/08/07, Duangrudee Tanramluk <DT...@ca...> wrote: First of all, I'm delighted to see someone (else!) using Open Babel in Cambridge. > I am trying to print out a list of atom index and a mol2 file containing the > substructure which matches the SMARTS query. > > > > Below is what I have written so far: > > > > my $file_to_read = "test.pdb"; > > my $obMol = new Chemistry::OpenBabel::OBMol; > > my $obConverter = new Chemistry::OpenBabel::OBConversion; > > $obConverter->SetInAndOutFormats("pdb","mol2"); > > $obConverter->ReadFile($obMol,$file_to_read); > > > > my $obsmartpattern = new > Chemistry::OpenBabel::OBSmartsPattern; > > $obsmartpattern->Init('n1c2ccccc2ccc1'); > > $obsmartpattern->Match($obMol); > > > > I guess the next step should be: > > > > my $maplist = $obsmartpattern->GetUMapList(); > > > > However, I have no success in iterating through the maplist to print out > which atoms match the SMARTS by using Perl. Any suggestion of how to print > out the atoms would be greatly appreciated. > Well, you're doing everything correctly and it should work. $maplist should be a list of a list of integers. In Perl, I think you should be using @maplist and not $maplist. But I'm not a Perl programmer. Maybe someone else can comment. Noel |
From: Noel O'B. <bao...@gm...> - 2007-08-01 13:05:38
|
Well, first of all, check out the solutions that people have already used. See: http://depth-first.com/articles/2007/04/13/roll-your-own-chemical-database-with-free-components and especially the comments by Rajarshi. There's Mychem at: http://mychem.sourceforge.net/ I suggest you contact Jerome Pansanel for more info if interested. Also, http://www.unm.edu/~tharun/smdb.html If you want to do it yourself, you will need to add some sort of field for holding bits (or lots of fields with binary values) and set the field based on myfp.bits. Hopefully, the other options provide simpler solutions for substructure searching. You may be able to do clever things like sort the bits by which help subdivide the space as quickly as possible if you want to max out on speed. Noel On 01/08/07, Pascoe, S (Stephen) <S.P...@rl...> wrote: > I have a MySQL database containing SMILES strings and want to do > substructure search on them. I decided that the best way to do this > would be to build a FastSearch index file that mirrors the information > in the database. > > Of course I could dump the SMILES string to a file and use the babel > command line program but I was hoping that it would be possible to do > completely within the python bindings. > > I read that FastSearch uses fingerprints but I have no idea how these > are used. Maybe there is a way to store fingerprints in MySQL for use > in substructure searching? > > Many Thanks, > Stephen. > > > --- > Stephen Pascoe +44 (0)1235 445980 > British Atmospheric Data Centre > Rutherford Appleton Laboratory > > -----Original Message----- > From: Noel O'Boyle [mailto:bao...@gm...] > Sent: 01 August 2007 13:30 > To: Pascoe, S (Stephen) > Cc: ope...@li... > Subject: Re: [OpenBabel-scripting] FastSearchIndexer from python > > Python doesn't do streams, at least not in the C++ sense. So the current > FastSearchIndexer is a no go. However, perhaps you could describe the > exact problem and I can try to help you up with a general solution from > Python. > > Noel > > On 01/08/07, Pascoe, S (Stephen) <S.P...@rl...> wrote: > > I am trying to build a FastSearch index file from Python. There > > appears to be a openbabel.FastSearchIndexer class but I have so far > > failed to instantiate it. The class requires an ostream object, which > > > I recognise from C++ but don't know how to create in python. E.g. > > > > >>> fs = openbabel.FastSearchIndexer('test.smi', fh, 'FP2', 0) > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > File "/opt/python-2.5.1/lib/python2.5/site-packages/openbabel.py", > > line 2115, in __init__ > > > > _openbabel.FastSearchIndexer_swiginit(self,_openbabel.new_FastSearchIn > > de > > xer(*args)) > > NotImplementedError: Wrong number of arguments for overloaded function > > > 'new_FastSearchIndexer'. > > Possible C/C++ prototypes are: > > OpenBabel::FastSearchIndexer(std::string &,std::ostream > > *,std::string &,int) > > OpenBabel::FastSearchIndexer(std::string &,std::ostream > > *,std::string &) > > OpenBabel::FastSearchIndexer(OpenBabel::FptIndex *,std::ostream *) > > > > Where fh is a python file object. Can anyone help? > > > > Thanks, > > Stephen. > > > > --- > > Stephen Pascoe +44 (0)1235 445980 > > British Atmospheric Data Centre > > Rutherford Appleton Laboratory > > > > ---------------------------------------------------------------------- > > --- This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a > browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > OpenBabel-scripting mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > > |
From: Noel O'B. <bao...@gm...> - 2007-08-01 12:45:35
|
(For the record, this has been resolved by reinstalling) ---------- Forwarded message ---------- From: David Lagorce <dav...@un...> Date: 01-Aug-2007 13:32 Subject: Re: [OpenBabel-scripting] Developping in Python and problem import pybel modules To: Noel O'Boyle <bao...@gm...> Ok Noel, I succeeded to install everything on Fedora 6. With your advices I have deleted all the "OPenBabel stuff" and I have re-installed the last package. Have re-compiled the pybel module.... No probs to import openbabel and pybel ! For the CentOS xml is not a problem...I wanted right your opinion for these errors=85 Thanks a lot for these advices and the speed of your response... Best Regards David Lagorce Noel O'Boyle wrote: >On 01/08/07, David Lagorce <dav...@un...> wrote: > > >>I installed these two distributions, that I got from the official >>distributions websites, in two separate computers. >> >> >OK, I was just wondering whether you got them from your package manager. > > > >>With root permissions I compiled in "/usr/local/programs/" the last >>package Openbabel 2.1.1 that I downloaded on Openbabel SourceForge websit= e. >>In the /scripts/python directory, with root permissions I compiled the >>pybel module. >>I declared the LD_LIBRARY_PATH in my bash_profile in "/usr/local/lib" >>(checked, there are here...) >> >> >Usually, you shouldn't compile anything as root. You should just >install as root. It's possible that there is some problem with the >permissions due to this. If this is true, I cannot really help fix it. > >For the moment, let's assume that permissions are not the problem. > >On the CentOS system, it looks like everything is working except for >two file formats. Both of these file formats are XML-based file >formats. This means that they need libxml, a library for reading and >writing XML files. You should look at the output of configure. Was it >able to find libxml? If so, I don't know why it is unable to find it >now. > >On Fedora 5, the error you describe is typically due to a mixup >between the installed OpenBabel and the OpenBabel you compile the >Python bindings against. There are many ways this can happen, but if >you delete everything, and start again, it should work. > >The normal way of compiling things is to make a folder in your home >directory, run configure and make. Then, as root, run "make install". >Then, exit from root, and compile the Python bindings. Then as root, >install the Python bindings. > >Hope this helps. Overall, I recommend that you delete everything with >the word OpenBabel on your system, and follow through the instructions >once more, keeping a copy of all of the output. It really should work! > >Noel > > > >> >> >> >> >> >>>Where did you install these from? Did you compile them yourself from >>>the latest distributions? >>> >>>On 31/07/07, Lagorce David <dav...@un...> wrote: >>> >>> >>> >>> >>>>Hi, >>>>I want to use the openbabel and pybel modules but I have some different= s >>>>problems when I import them. >>>>It depend on the OS I use: >>>> >>>>1) install on Fedora 6 up to date >>>> >>>>Python 2.5 (r25:51908, Jan 30 2007, 17:11:32) >>>>[GCC 4.1.1 20070105 (Red Hat 4.1.1-51)] on linux2 >>>>Type "help", "copyright", "credits" or "license" for more information. >>>> >>>> >>>> >>>> >>>>>>>import openbabel >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>Traceback (most recent call last): >>>> File "<stdin>", line 1, in <module> >>>> File "openbabel.py", line 11, in <module> >>>> import _openbabel >>>>ImportError: /usr/local/lib/python2.5/site-packages/_openbabel.so: >>>>undefined symbol: _ZN9OpenBabel5ResNoE >>>> >>>> >>>> >>>> >>>>>>>import pybel >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>Traceback (most recent call last): >>>> File "<stdin>", line 1, in <module> >>>> File "/usr/local/lib/python2.5/site-packages/pybel.py", line 1, in <mo= dule> >>>> import openbabel as ob >>>> File "/usr/local/lib/python2.5/site-packages/openbabel.py", line 11, i= n >>>><module> >>>> import _openbabel >>>>ImportError: /usr/local/lib/python2.5/site-packages/_openbabel.so: >>>>undefined symbol: _ZN9OpenBabel5ResNoE >>>> >>>> >>>> >>>> >>>> >>>>>>> >>>>>>> >>>>2) install on CentOS 5 up to date >>>> >>>>Python 2.5.1 (r251:54863, Jul 27 2007, 15:51:54) >>>>[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2 >>>>Type "help", "copyright", "credits" or "license" for more information. >>>> >>>> >>>> >>>> >>>>>>>import openbabel >>>>>>>import pybel >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >>>>*** Open Babel Error in LoadFormatFiles >>>> /usr/local/lib/openbabel/chemdrawformat.so did not load properly >>>>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >>>>*** Open Babel Error in LoadFormatFiles >>>> /usr/local/lib/openbabel/xcmlformat.so did not load properly >>>> >>>> >>>>what is wrong ?? >>>> >>>>thanks a lot >>>> >>>>David >>>> >>>> >>>> >>>> >>>>-----------------------------------------------------------------------= -- >>>>This SF.net email is sponsored by: Splunk Inc. >>>>Still grepping through log files to find problems? Stop. >>>>Now Search log events and configuration files using AJAX and a browser. >>>>Download your FREE copy of Splunk now >> http://get.splunk.com/ >>>>_______________________________________________ >>>>OpenBabel-scripting mailing list >>>>Ope...@li... >>>>https://lists.sourceforge.net/lists/listinfo/openbabel-scripting >>>> >>>> >>>> >>>> >>>> >>> >>> >>> >> >> > > > |
From: Pascoe, S \(Stephen\) <S.P...@rl...> - 2007-08-01 12:44:02
|
I have a MySQL database containing SMILES strings and want to do substructure search on them. I decided that the best way to do this would be to build a FastSearch index file that mirrors the information in the database. Of course I could dump the SMILES string to a file and use the babel command line program but I was hoping that it would be possible to do completely within the python bindings. I read that FastSearch uses fingerprints but I have no idea how these are used. Maybe there is a way to store fingerprints in MySQL for use in substructure searching? Many Thanks, Stephen. --- Stephen Pascoe +44 (0)1235 445980 British Atmospheric Data Centre Rutherford Appleton Laboratory -----Original Message----- From: Noel O'Boyle [mailto:bao...@gm...]=20 Sent: 01 August 2007 13:30 To: Pascoe, S (Stephen) Cc: ope...@li... Subject: Re: [OpenBabel-scripting] FastSearchIndexer from python Python doesn't do streams, at least not in the C++ sense. So the current FastSearchIndexer is a no go. However, perhaps you could describe the exact problem and I can try to help you up with a general solution from Python. Noel On 01/08/07, Pascoe, S (Stephen) <S.P...@rl...> wrote: > I am trying to build a FastSearch index file from Python. There=20 > appears to be a openbabel.FastSearchIndexer class but I have so far=20 > failed to instantiate it. The class requires an ostream object, which > I recognise from C++ but don't know how to create in python. E.g. > > >>> fs =3D openbabel.FastSearchIndexer('test.smi', fh, 'FP2', 0) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/opt/python-2.5.1/lib/python2.5/site-packages/openbabel.py", > line 2115, in __init__ > > _openbabel.FastSearchIndexer_swiginit(self,_openbabel.new_FastSearchIn > de > xer(*args)) > NotImplementedError: Wrong number of arguments for overloaded function > 'new_FastSearchIndexer'. > Possible C/C++ prototypes are: > OpenBabel::FastSearchIndexer(std::string &,std::ostream=20 > *,std::string &,int) > OpenBabel::FastSearchIndexer(std::string &,std::ostream=20 > *,std::string &) > OpenBabel::FastSearchIndexer(OpenBabel::FptIndex *,std::ostream *) > > Where fh is a python file object. Can anyone help? > > Thanks, > Stephen. > > --- > Stephen Pascoe +44 (0)1235 445980 > British Atmospheric Data Centre > Rutherford Appleton Laboratory > > ---------------------------------------------------------------------- > --- This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/=20 > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Noel O'B. <bao...@gm...> - 2007-08-01 12:30:25
|
Python doesn't do streams, at least not in the C++ sense. So the current FastSearchIndexer is a no go. However, perhaps you could describe the exact problem and I can try to help you up with a general solution from Python. Noel On 01/08/07, Pascoe, S (Stephen) <S.P...@rl...> wrote: > I am trying to build a FastSearch index file from Python. There appears > to be a openbabel.FastSearchIndexer class but I have so far failed to > instantiate it. The class requires an ostream object, which I recognise > from C++ but don't know how to create in python. E.g. > > >>> fs = openbabel.FastSearchIndexer('test.smi', fh, 'FP2', 0) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/opt/python-2.5.1/lib/python2.5/site-packages/openbabel.py", > line 2115, in __init__ > > _openbabel.FastSearchIndexer_swiginit(self,_openbabel.new_FastSearchInde > xer(*args)) > NotImplementedError: Wrong number of arguments for overloaded function > 'new_FastSearchIndexer'. > Possible C/C++ prototypes are: > OpenBabel::FastSearchIndexer(std::string &,std::ostream > *,std::string &,int) > OpenBabel::FastSearchIndexer(std::string &,std::ostream > *,std::string &) > OpenBabel::FastSearchIndexer(OpenBabel::FptIndex *,std::ostream *) > > Where fh is a python file object. Can anyone help? > > Thanks, > Stephen. > > --- > Stephen Pascoe +44 (0)1235 445980 > British Atmospheric Data Centre > Rutherford Appleton Laboratory > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Pascoe, S \(Stephen\) <S.P...@rl...> - 2007-08-01 11:48:30
|
I am trying to build a FastSearch index file from Python. There appears to be a openbabel.FastSearchIndexer class but I have so far failed to instantiate it. The class requires an ostream object, which I recognise from C++ but don't know how to create in python. E.g. =20 >>> fs =3D openbabel.FastSearchIndexer('test.smi', fh, 'FP2', 0) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/python-2.5.1/lib/python2.5/site-packages/openbabel.py", line 2115, in __init__ =20 _openbabel.FastSearchIndexer_swiginit(self,_openbabel.new_FastSearchInde xer(*args)) NotImplementedError: Wrong number of arguments for overloaded function 'new_FastSearchIndexer'. Possible C/C++ prototypes are: OpenBabel::FastSearchIndexer(std::string &,std::ostream *,std::string &,int) OpenBabel::FastSearchIndexer(std::string &,std::ostream *,std::string &) OpenBabel::FastSearchIndexer(OpenBabel::FptIndex *,std::ostream *) Where fh is a python file object. Can anyone help? Thanks, Stephen. =20 --- Stephen Pascoe +44 (0)1235 445980 British Atmospheric Data Centre Rutherford Appleton Laboratory |
From: Duangrudee T. <DT...@ca...> - 2007-07-31 23:12:36
|
Hi All, I am trying to print out a list of atom index and a mol2 file containing = the substructure which matches the SMARTS query.=20 Below is what I have written so far:=20 my $file_to_read =3D "test.pdb"; my $obMol =3D new Chemistry::OpenBabel::OBMol; my $obConverter =3D new Chemistry::OpenBabel::OBConversion; $obConverter->SetInAndOutFormats("pdb","mol2"); $obConverter->ReadFile($obMol,$file_to_read); my $obsmartpattern =3D new Chemistry::OpenBabel::OBSmartsPattern; $obsmartpattern->Init('n1c2ccccc2ccc1'); $obsmartpattern->Match($obMol); I guess the next step should be: my $maplist =3D $obsmartpattern->GetUMapList(); However, I have no success in iterating through the maplist to print out = which atoms match the SMARTS by using Perl. Any suggestion of how to = print out the atoms would be greatly appreciated. =20 Duangrudee =20 |
From: Noel O'B. <bao...@gm...> - 2007-07-31 15:47:01
|
Where did you install these from? Did you compile them yourself from the latest distributions? On 31/07/07, Lagorce David <dav...@un...> wrote: > Hi, > I want to use the openbabel and pybel modules but I have some differents > problems when I import them. > It depend on the OS I use: > > 1) install on Fedora 6 up to date > > Python 2.5 (r25:51908, Jan 30 2007, 17:11:32) > [GCC 4.1.1 20070105 (Red Hat 4.1.1-51)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import openbabel > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "openbabel.py", line 11, in <module> > import _openbabel > ImportError: /usr/local/lib/python2.5/site-packages/_openbabel.so: > undefined symbol: _ZN9OpenBabel5ResNoE > >>> > >>> import pybel > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/local/lib/python2.5/site-packages/pybel.py", line 1, in <module> > import openbabel as ob > File "/usr/local/lib/python2.5/site-packages/openbabel.py", line 11, in > <module> > import _openbabel > ImportError: /usr/local/lib/python2.5/site-packages/_openbabel.so: > undefined symbol: _ZN9OpenBabel5ResNoE > > >>> > >>> > > > 2) install on CentOS 5 up to date > > Python 2.5.1 (r251:54863, Jul 27 2007, 15:51:54) > [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import openbabel > >>> import pybel > ============================== > *** Open Babel Error in LoadFormatFiles > /usr/local/lib/openbabel/chemdrawformat.so did not load properly > ============================== > *** Open Babel Error in LoadFormatFiles > /usr/local/lib/openbabel/xcmlformat.so did not load properly > >>> > > > what is wrong ?? > > thanks a lot > > David > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Lagorce D. <dav...@un...> - 2007-07-31 10:35:27
|
Hi, I want to use the openbabel and pybel modules but I have some differents problems when I import them. It depend on the OS I use: 1) install on Fedora 6 up to date Python 2.5 (r25:51908, Jan 30 2007, 17:11:32) [GCC 4.1.1 20070105 (Red Hat 4.1.1-51)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import openbabel Traceback (most recent call last): File "<stdin>", line 1, in <module> File "openbabel.py", line 11, in <module> import _openbabel ImportError: /usr/local/lib/python2.5/site-packages/_openbabel.so: undefined symbol: _ZN9OpenBabel5ResNoE >>> >>> import pybel Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.5/site-packages/pybel.py", line 1, in <module> import openbabel as ob File "/usr/local/lib/python2.5/site-packages/openbabel.py", line 11, in <module> import _openbabel ImportError: /usr/local/lib/python2.5/site-packages/_openbabel.so: undefined symbol: _ZN9OpenBabel5ResNoE >>> >>> 2) install on CentOS 5 up to date Python 2.5.1 (r251:54863, Jul 27 2007, 15:51:54) [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import openbabel >>> import pybel ============================== *** Open Babel Error in LoadFormatFiles /usr/local/lib/openbabel/chemdrawformat.so did not load properly ============================== *** Open Babel Error in LoadFormatFiles /usr/local/lib/openbabel/xcmlformat.so did not load properly >>> what is wrong ?? thanks a lot David |
From: Andrew F. <fa...@po...> - 2007-07-17 14:15:14
|
Thanks Noel, I was worried about which version of the shared objects the perl and python wrappers would find. (I've been burned once too often by LD_LIBRARY_PATH parse issues). Thanks for the heads up on the debchem people. I had seen information about debian science, but I had missed that there was a chemistry specific group as well. Thanks again. Andy Noel O'Boyle wrote: > I don't think there'd be any difference between installing a .deb and > compiling it yourself. If you follow the instructions on the OpenBabel > install page, there's a recipe for local installation. This won't > interfere with the official .deb installation, and will allow you to > use the scripting support. > > Otherwise, the debichem people are working on getting 2.1.1 into > Ubuntu/Debian, so they might be able to help: > http://lists.alioth.debian.org/mailman/listinfo/debichem-devel > > Noel |
From: Noel O'B. <bao...@gm...> - 2007-07-17 08:25:53
|
I don't think there'd be any difference between installing a .deb and compiling it yourself. If you follow the instructions on the OpenBabel install page, there's a recipe for local installation. This won't interfere with the official .deb installation, and will allow you to use the scripting support. Otherwise, the debichem people are working on getting 2.1.1 into Ubuntu/Debian, so they might be able to help: http://lists.alioth.debian.org/mailman/listinfo/debichem-devel Noel On 16/07/07, Andrew D. Fant <fa...@po...> wrote: > Perchance, does anyone have a .deb kicking around for openbabel 2.1 with > the scripting support installed? I've started using Ubuntu to try it > for an upcoming project. Sadly its package for openbabel is old enough > that scripting support isn't included. I'd just build it and install it > myself, but there are a few other applications that I need that have > openbabel as a prerequsite and I don't want to have to build them from > scratch as well. > > Thanks, > Andy > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Andrew D. F. <fa...@po...> - 2007-07-16 18:53:47
|
Perchance, does anyone have a .deb kicking around for openbabel 2.1 with the scripting support installed? I've started using Ubuntu to try it for an upcoming project. Sadly its package for openbabel is old enough that scripting support isn't included. I'd just build it and install it myself, but there are a few other applications that I need that have openbabel as a prerequsite and I don't want to have to build them from scratch as well. Thanks, Andy |