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: Luis F. <ld...@mi...> - 2007-05-31 08:34:49
|
Hello, I'm using Open Babel 2.1.0 to convert the structure of molecules in cml format to inchi or to smi in order to cross-check information. I started to write a simple script in Perl (Perl 5.8.8) to read a file containing the structures of several compounds and convert them to inchi. But I got a "Segmentation fault" error message after running the script using as input a file containing a single structure. Then I tried to convert the structure inside this file using babel command and it worked good, without any error. After some debugging process I did not find the solution for this problem and I decided to move to Python (Python 2.5). Then I wrote a simple script to do the same thing: # #!/usr/bin/python # # import openbabel # import sys # import re # # file = sys.argv[1] # infile = open(file,"r") # # while infile: # line = infile.readline() # if re.search("<molecule",line): # molecule = line # elif re.search("</molecule",line): # molecule += line # obConversion = openbabel.OBConversion() # obConversion.SetInAndOutFormats("cml", "inchi") # mol = openbabel.OBMol() # obConversion.ReadString(mol, molecule) # outMDL = obConversion.WriteString(mol) # print outMDL # break # elif len (molecule) > 1: # molecule += line But the result is the same a "Segmentation fault" error. I can get the right conversion as in Perl but the script breaks after one conversion. I can convert everything using a temporary file and convert it using the command line, though it would be a brute force approach that I want to avoid. Best greetings Luís Figueiredo |
From: Noel O'B. <bao...@gm...> - 2007-05-30 10:13:18
|
WWVzIGFuZCBuby4KCkl0IGhhcyByZWNlbnRseSBiZWVuIGFkZGVkIGFzIGRlc2NyaWJlZCBoZXJl OgpodHRwOi8vd3d3Lm5hYmJsZS5jb20vUmUlM0EtcGVybC11c2Utb2YtZ2V0U1NTUiUyQy1PQlJp bmctcDEwMzc1Mzgz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oaXMg U0YubmV0IGVtYWlsIGlzIHNwb25zb3JlZCBieSBEQjIgRXhwcmVzcwo+IERvd25sb2FkIERCMiBF eHByZXNzIEMgLSB0aGUgRlJFRSB2ZXJzaW9uIG9mIERCMiBleHByZXNzIGFuZCB0YWtlCj4gY29u dHJvbCBvZiB5b3VyIFhNTC4gTm8gbGltaXRzLiBKdXN0IGRhdGEuIENsaWNrIHRvIGdldCBpdCBu b3cuCj4gaHR0cDovL3NvdXJjZWZvcmdlLm5ldC9wb3dlcmJhci9kYjIvCj4gX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KPiBPcGVuQmFiZWwtc2NyaXB0aW5n IG1haWxpbmcgbGlzdAo+IE9wZW5CYWJlbC1zY3JpcHRpbmdAbGlzdHMuc291cmNlZm9yZ2UubmV0 Cj4gaHR0cHM6Ly9saXN0cy5zb3VyY2Vmb3JnZS5uZXQvbGlzdHMvbGlzdGluZm8vb3BlbmJhYmVs LXNjcmlwdGluZwo+Cj4K |
From: Jurgens de B. <deb...@gm...> - 2007-05-30 10:04:16
|
SGkKCkkgd2FzIHdvbmRlcmluZyBpZiBpdCB3b3VsZCBiZSBwb3NzaWJsZSB0byBkZXRlcm1pbmUg dGhlIG51bWJlciBvZiByaW5ncyBpbgphIG1vbGVjdWxlIHdpdGhpbiBhIHB5dGhvbiBzY3JpcHRz LgoKVGhhbngKCi0tIApSZWdhcmRzL0dyb2V0ZS9NaXQgZnJldW5kbGljaGVuIEdyw7zDn2VuL3Jl Y3VlcmRvcy9tZWlsbGV1cmVzIHNhbHV0YXRpb25zLwpkaXN0aW50aSBzYWx1dGkvc2lvbmcvZHXD rCB5w7ov0L/RgNC40LLQtdGCCgpKdXJnZW5zIGRlIEJydWluCg== |
From: Noel O'B. <bao...@gm...> - 2007-05-28 08:17:32
|
SnVzdCBsb29rZWQgYXQgdGhlIGRvY3VtZW50YXRpb24sIGFuZCBJIHNlZSB0aGUgZXJyb3IgdGhh dCBjYXVz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ZXQvcG93ZXJiYXIvZGIyLwo+IF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fCj4gT3BlbkJhYmVsLXNjcmlwdGluZyBtYWlsaW5nIGxpc3QKPiBPcGVu QmFiZWwtc2NyaXB0aW5nQGxpc3RzLnNvdXJjZWZvcmdlLm5ldAo+IGh0dHBzOi8vbGlzdHMuc291 cmNlZm9yZ2UubmV0L2xpc3RzL2xpc3RpbmZvL29wZW5iYWJlbC1zY3JpcHRpbmcKPgo+Cg== |
From: Jurgens de B. <deb...@gm...> - 2007-05-22 15:47:41
|
VG8gd2hvbSBpdCBtYXkgY29uY2VybjoKCkkgd291bGQgbGlrZSB0byBpbnN0YWxsIE9wZW5iYWJl bCBhbmQgcHliZWwgb24gNjRiaXQgbWFjaGluZXMgYnV0IEkgZW5kIHVwCmdldHRpbmcgYSBidWls ZCBlcnJvciBpcyB0aGVpciBhIHdheSBhcm91bmQgdGhpcy4KClRoYW54CgotLSAKUmVnYXJkcy9H cm9ldGUvTWl0IGZyZXVuZGxpY2hlbiBHcsO8w59lbi9yZWN1ZXJkb3MvbWVpbGxldXJlcyBzYWx1 dGF0aW9ucy8KZGlzdGludGkgc2FsdXRpL3Npb25nL2R1w6wgecO6L9C/0YDQuNCy0LXRggoKSnVy Z2VucyBkZSBCcnVpbgo= |
From: Geoffrey H. <ge...@ge...> - 2007-05-21 04:04:43
|
On May 20, 2007, at 2:49 PM, Kieron Taylor wrote: >> I convert SMI string into MOL (or MDL) format on Perl. The convertion >> runs normally, but in result mol-format all coordinates (x, y and z) >> of all atoms are (0,0,0). Why? > > The process of turning a smiles string into anything else requires > some > form of geometry optimisation. OpenBabel doesn't do this by default > and > I am do not believe it can do it at all, since that was not its > purpose. I'd say it's not so much an issue of "purpose," but more that generating coordinates for SMILES is a difficult problem. For example, if you request 3D coordinates for a SMILES string with unspecified chirality, what do you do? As Keiron mentioned, there are other programs which can generate coordinates for SMILES strings -- but Open Babel will eventually have support for this in the future. We're laying the groundwork now. Cheers, -Geoff |
From: Kieron T. <kr...@so...> - 2007-05-20 18:49:53
|
Yesipenko A. wrote: > I convert SMI string into MOL (or MDL) format on Perl. The convertion > runs normally, but in result mol-format all coordinates (x, y and z) > of all atoms are (0,0,0). Why? The process of turning a smiles string into anything else requires some form of geometry optimisation. OpenBabel doesn't do this by default and I am do not believe it can do it at all, since that was not its purpose. It is meant for recognising connectivity. Other programs such as Marvin have limited capabilities for creating a 3d geometry, you might like to look into them. Kieron |
From: Jens T. <j.m...@dl...> - 2007-05-18 15:24:20
|
Hello, I've hit what I think is a bug with the readers for NWChem and Gaussian output files, although it manifests itself through my using pybel. At least I think it's a bug - I could of course just be using the python interface incorrectly, in which case I'd appreciate any pointers on the correct way to use it! I've been using the pybel readfile method to extract geometries from the output files for various quantum chemistry codes. Unfortunately, when looking at the output files, readfile just hung. The problem seems to be that these readers (e.g NWChemOutputFormat::ReadMolecule) never return "false". They just trundle through the output looking for the coordinates block and replacing the old molecule with the new one until they hit the end of the file. Hence if you call the OBConversion ReadFile method on them, you just get the final geometry and a return state of "true". Subsequent calls to the OBConversion Read method just return an empty molecule and the reader returns a state of "true". Hence the following block of code in pybel: obmol = ob.OBMol() notatend = obconversion.ReadFile(obmol,filename) while notatend: yield Molecule(obmol) obmol = ob.OBMol() notatend = obconversion.Read(obmol) just keeps looping forever. I can get this to work for me by calling NumAtoms() on the returned molecule and breaking if this is None. I've included a block of code below that demonstrates what I mean and have also attached a zipped NWChem output file that I used for testing this. Best wishes, Jens import sys import openbabel as ob filename = 'optim_c6h6.nwo' # NWChem output file #filename = '3d.head.sdf' # Sample SDF file where the original method works obconversion = ob.OBConversion() format = obconversion.FormatFromExt( filename ) formatok = obconversion.SetInFormat(format) if not formatok: raise ValueError,"%s is not a recognised OpenBabel format" % format obmol = ob.OBMol() notatend = obconversion.ReadFile(obmol,filename) i=0 while notatend: # Need to check natoms or we go on forever. natoms = obmol.NumAtoms() if not natoms: print "Molecule has no atoms!" break atom = obmol.GetFirstAtom() print "Got 1st coords ",atom.x(),atom.y(), atom.z() obmol = ob.OBMol() notatend = obconversion.Read(obmol) i+=1 print "Found %s molecules" % i |
From: Noel O'B. <bao...@gm...> - 2007-05-17 11:46:12
|
On 17/05/07, Jens Thomas <j.m...@dl...> wrote: > Hi Noel, > > I've just worked out that the problem arose because I hadn't installed > anything and was running it directly from the build directory. I assume > it looks in a set directory for the files to dynamically configure the > supported formats. Can this be changed with an environment variable? The answer is yes.You need to set LD_LIBRARY_PATH to point to the directory containing libopenbabel.so, etc. You still need to run "make install" beforehand, though, to install all the formats to the correct location. I describe both "local" and "global" intalls on the wiki page. > Anyway, it's not important as once I'd installed everything into a > directory structure it then worked fine. > I should probably mention that I hit problems with the default version > of SWIG on Ubuntu wasn't able to handle the "-naturalvar" flag, so I had > to install swig 1.3.31 to get the build to work. I will add this to the install notes. > Many thanks for your help. > > Jens > > Noel O'Boyle wrote: > > The good news is that all the Python stuff seems to be working fine > > (no initialisation necessary). The bad news is that the C++ stuff > > isn't working properly. > > > > I'm betting that if you try "babel -H" and look under "The following > > file formats are recognized", you will see nothing there. Which is > > what you're also seeing in python. To verify, try to convert a file > > using babel. This is because the file formats are loaded dynamically > > as plugins, so there can be problems if you compile with particular > > settings. > > > > How exactly are you compiling the software? Did you follow the > > instructions on the web exactly (see > > http://openbabel.sourceforge.net/wiki/Install_%28source_code%29), or > > are you doing something different? I'm using an old version of Ubuntu > > myself, so there's no reason we can't get it to work. > > > > Regards > > Noel > > > > On 15/05/07, Jens Thomas <j.m...@dl...> wrote: > >> Hello! > >> > >> It's taken me a little while to grind through all the usual little > >> hiccups that come when building an unfamiliar code straight out of the > >> repository, but I've now got what (I think) is the correct version. > >> > >> I checked out the code at r1954 and patched with r1958 as suggested > >> by Noel. > >> > >> However, I'm not getting anything from pybel.informats or > >> OBConversion.GetSupportedInputFormats as shown below: > >> > >> > >> Python 2.4.3 (#2, Oct 6 2006, 07:52:30) > >> [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 > >> Type "help", "copyright", "credits" or "license" for more information. > >> >>> import pybel > >> >>> pybel.informats > >> {} > >> >>> pybel.outformats > >> {} > >> >>> import openbabel > >> >>> obc = openbabel.OBConversion() > >> >>> i= obc.GetSupportedInputFormat() > >> >>> print i > >> () > >> >>> dir(i) > >> ['__add__', '__class__', '__contains__', '__delattr__', '__doc__', > >> '__eq__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', > >> '__getslice__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', > >> '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', > >> '__reduce_ex__', '__repr__', '__rmul__', '__setattr__', '__str__'] > >> > >> > >> Is there some sort of initialisation I need to do to get the dictionary > >> populated? > >> > >> Many thanks, > >> > >> Jens > >> > >> Noel O'Boyle wrote: > >> > I've already noticed that the latest SVN is not compatible with SWIG > >> > due to changes introducted at r1954. You'll need to check out r1953, > >> > and use "svn merge -r 1957:1958" to patch with r1958. > >> > > >> > Noel > >> > > >> > On 14/05/07, Jens Thomas <j.m...@dl...> wrote: > >> >> Hi Noel, Jerome and Chris, > >> >> > >> >> Firstly, many thanks for the quick response and warm welcome to the > >> >> list! Please accept my apologies for not replying sooner, but I've > >> been > >> >> away without access to email. > >> >> > >> >> I've tried checking out the latest version of openbabel from SVN > >> onto my > >> >> Ubuntu box (Dapper on a Pentium 4) so that I can try some of the > >> changes > >> >> you've committed. I ran a normal configure (./configure), but the > >> make > >> >> currently fails with: > >> >> > >> >> make[2]: Leaving directory `/home/jmht/openbabel/test/cmltest' > >> >> make[2]: Entering directory `/home/jmht/openbabel/test' > >> >> g++ -DHAVE_CONFIG_H -I. -I../src -I../include > >> >> -DTESTDATADIR="\"../test/files/\"" -g -O2 -MT roundtrip.o -MD > >> -MP -MF > >> >> .deps/roundtrip.Tpo -c -o roundtrip.o roundtrip.cpp > >> >> mv -f .deps/roundtrip.Tpo .deps/roundtrip.Po > >> >> /bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -o roundtrip > >> >> roundtrip.o ../src/libopenbabel.la -ldl -lm > >> >> mkdir .libs > >> >> g++ -g -O2 -o .libs/roundtrip roundtrip.o > >> ../src/.libs/libopenbabel.so > >> >> -ldl -lm -Wl,--rpath -Wl,/usr/local/lib > >> >> ../src/.libs/libopenbabel.so: undefined reference to > >> >> `OpenBabel::OBFormat::FormatFromMIME(char const*)' > >> >> ../src/.libs/libopenbabel.so: undefined reference to > >> >> `OpenBabel::OBPlugin::Display(std::basic_string<char, > >> >> std::char_traits<char>, std::allocator<char> >&, char const*, char > >> >> const*)' > >> >> ../src/.libs/libopenbabel.so: undefined reference to `vtable for > >> >> OpenBabel::OBDescriptor' > >> >> ../src/.libs/libopenbabel.so: undefined reference to > >> >> `OpenBabel::OBDescriptor::Compare(OpenBabel::OBBase*, > >> >> std::basic_istream<char, std::char_traits<char> >&, bool)' > >> >> ../src/.libs/libopenbabel.so: undefined reference to `vtable for > >> >> OpenBabel::OBPlugin' > >> >> ../src/.libs/libopenbabel.so: undefined reference to > >> >> `OpenBabel::OBPlugin::ListAsVector(char const*, char const*, > >> >> std::vector<std::basic_string<char, std::char_traits<char>, > >> >> std::allocator<char> >, std::allocator<std::basic_string<char, > >> >> std::char_traits<char>, std::allocator<char> > > >&)' > >> >> ../src/.libs/libopenbabel.so: undefined reference to `typeinfo for > >> >> OpenBabel::OBPlugin' > >> >> ../src/.libs/libopenbabel.so: undefined reference to > >> >> `OpenBabel::OBDescriptor::AddProperties(OpenBabel::OBBase*, > >> >> std::basic_string<char, std::char_traits<char>, > >> std::allocator<char> > > >> >> const&)' > >> >> ../src/.libs/libopenbabel.so: undefined reference to > >> >> `OpenBabel::OBDescriptor::GetStringValue(OpenBabel::OBBase*, > >> >> std::basic_string<char, std::char_traits<char>, std::allocator<char> > >> >> >&)' > >> >> ../src/.libs/libopenbabel.so: undefined reference to > >> >> `OpenBabel::OBDescriptor::FilterCompare(OpenBabel::OBBase*, > >> >> std::basic_istream<char, std::char_traits<char> >&, bool)' > >> >> ../src/.libs/libopenbabel.so: undefined reference to > >> >> `OpenBabel::OBFormat::RegisterFormat(char const*, char const*)' > >> >> ../src/.libs/libopenbabel.so: undefined reference to `typeinfo for > >> >> OpenBabel::OBDescriptor' > >> >> ../src/.libs/libopenbabel.so: undefined reference to > >> >> `OpenBabel::OBDescriptor::DeleteProperties(OpenBabel::OBBase*, > >> >> std::basic_string<char, std::char_traits<char>, > >> std::allocator<char> > > >> >> const&)' > >> >> collect2: ld returned 1 exit status > >> >> make[2]: *** [roundtrip] Error 1 > >> >> > >> >> I'm not that familiar with C++ and so am bit stuck as to how to sort > >> >> this one out. > >> >> > >> >> Do you have any suggestions? > >> >> > >> >> Best wishes, > >> >> > >> >> Jens > >> >> > >> >> > >> >> Noel O'Boyle wrote: > >> >> > On 12/05/07, Chris Morley <c.m...@ds...> wrote: > >> >> > > >> >> >> In the revamped code for formats (and other plugins) recently > >> >> committed > >> >> >> to SVN HEAD (for the next OB version) I tried to maintain backward > >> >> >> compatibility as far as possible. So > >> >> OBConversion::SupportedInputFormat() > >> >> >> works as before but, you'll be pleased to hear, without the > >> >> '[Read-only]'. > >> >> >> > >> >> > Sounds good but SWIG doesn't like the new code. When I try to > >> compile > >> >> > openbabel_python.cpp, I get: > >> >> > > >> >> > ../../include/openbabel/fingerprint.h:48: error: 'static > >> >> > std::map<const char*, OpenBabel::OBPlugin*, > >> >> > OpenBabel::OBPlugin::CharPtrLess, std::allocator<std::pair<const > >> char* > >> >> > const, OpenBabel::OBPlugin*> > >& OpenBabel::OBFingerprint::Map()' > >> >> > cannot be overloaded > >> >> > ../../include/openbabel/fingerprint.h:43: error: with 'static > >> >> > std::map<const char*, OpenBabel::OBPlugin*, > >> >> > OpenBabel::OBPlugin::CharPtrLess, std::allocator<std::pair<const > >> char* > >> >> > const, OpenBabel::OBPlugin*> > >& OpenBabel::OBFingerprint::Map()' > >> >> > ../../include/openbabel/fingerprint.h:53: error: 'static > >> >> > OpenBabel::OBFingerprint*& OpenBabel::OBFingerprint::Default()' > >> cannot > >> >> > be overloaded > >> >> > ../../include/openbabel/fingerprint.h:43: error: with 'static > >> >> > OpenBabel::OBFingerprint*& OpenBabel::OBFingerprint::Default()' > >> >> > ../../include/openbabel/fingerprint.h: In constructor > >> >> > 'OpenBabel::OBFingerprint::OBFingerprint(std::string, bool)': > >> >> > ../../include/openbabel/fingerprint.h:63: error: no match for > >> >> > 'operator[]' in 'OpenBabel::OBFingerprint::Map()[ID]' > >> >> > /usr/include/c++/4.0.2/bits/stl_map.h:331: note: candidates are: > >> _Tp& > >> >> > std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const _Key&) > >> [with > >> >> > _Key = const char*, _Tp = OpenBabel::OBPlugin*, _Compare = > >> >> > OpenBabel::OBPlugin::CharPtrLess, _Alloc = > >> >> > std::allocator<std::pair<const char* const, > >> OpenBabel::OBPlugin*> >] > >> >> > > >> >> > > >> >> >> But in an effort to provide more choice on the form of the output, > >> >> there > >> >> >> are three functions which provide a list of formats(or other > >> plugin > >> >> >> classes): OBPlugin::ListAsVector, ListAsString and List. The first > >> >> two > >> >> >> were intended to be compatible with scripting, although I need > >> some > >> >> >> advice here. ListAsString returns a (big) std::string, but > >> >> ListAsVector > >> >> >> has a parameter which is a reference to a std::vector. If this is > >> >> >> incompatible with scripting languages I should change it. > >> >> >> > >> >> > There's no problem with vectors in general; these are simply > >> >> > translated to lists by SWIG. > >> >> > > >> >> > > >> >> >> All three have a parameter which can control what is in the > >> >> output. For > >> >> >> example if it contains "verbose" it output the whole > >> description, not > >> >> >> just the first line. So it would be easy to add code (4 extra > >> >> lines) to > >> >> >> output only the IDs if that would be useful: > >> >> >> ListAsVector("formats","in/ids", stringvector) > >> >> >> > >> >> >> Post-processing in pybel I'm sure is useful, but if the C++ > >> code was > >> >> >> adequate it could serve other scripting languages as well. > >> >> >> > >> >> > I think so too. In the meanwhile, I would like to push out a > >> Windows > >> >> > Python release based on 2.1.0 with the current pybel > >> enhancements. I'm > >> >> > going to try to get this together this weekend and do some testing. > >> >> > > >> >> > Noel > >> >> > > >> >> > > >> >> >> Chris > >> >> >> > >> >> >> Noel O'Boyle wrote: > >> >> >> > >> >> >>> After looking at the C++ code, I realise that maybe returning > >> a list > >> >> >>> of strings is the only choice for SupportedInputFormat. Anyway, > >> >> in the > >> >> >>> meanwhile I've added some code to pybel, so that if you access > >> >> >>> pybel.informats or outformats, you will get a dictionary of > >> >> supported > >> >> >>> formats. > >> >> >>> > >> >> >>> On 12/05/07, Noel O'Boyle <bao...@gm...> wrote: > >> >> >>> > >> >> >>>> Actually, a vector of std::strings had not yet been > >> swigified, so I > >> >> >>>> needed to added to a line to openbabel-python.i to set it up > >> >> (not yet > >> >> >>>> checked in). However, there's an additional problem, which > >> >> Jerome may > >> >> >>>> like to address. > >> >> >>>> > >> >> >>>> The data that's returned is similar to: > >> >> >>>> ('acr -- ACR format [Read-only]', 'alc -- Alchemy format', ... ) > >> >> >>>> > >> >> >>>> whereas it would make more sense to me either to return: > >> >> >>>> ('acr', 'alc', ...) > >> >> >>>> or > >> >> >>>> a std::map (i.e. a Python dict) of ['acr' : 'ACR format', 'alc': > >> >> >>>> 'Alchemy format'] > >> >> >>>> > >> >> >>>> Note that the text [Read-only] is not really necessary in a > >> list of > >> >> >>>> supported input formats. > >> >> >>>> > >> >> >>>> Since this function was added for the benefit of scripting > >> >> interfaces, > >> >> >>>> it makes sense to make it as easy as possible to access the > >> list of > >> >> >>>> formats. > >> >> >>>> > >> >> >>>> Noel > >> >> >>>> > >> >> >>>> On 11/05/07, Noel O'Boyle <bao...@gm...> wrote: > >> >> >>>> > >> >> >>>>> Hello again Jens, > >> >> >>>>> > >> >> >>>>> Good to hear from you on this list... :-) > >> >> >>>>> > >> >> >>>>> On 10/05/07, Jens Thomas <j.m...@dl...> wrote: > >> >> >>>>> > >> >> >>>>>> Hi, > >> >> >>>>>> > >> >> >>>>>> I'm trying to enable our ccp1gui code > >> >> >>>>>> (http://sourceforge.net/projects/ccp1gui/) to use openbabel so > >> >> that we > >> >> >>>>>> no longer have to support so many formats. > >> >> >>>>>> > >> >> >>>>>> I've got most of the machinery in place, but am a bit stuck on > >> >> how to > >> >> >>>>>> dynamically determine what input formats are supported by > >> >> openbabel. > >> >> >>>>>> > >> >> >>>>>> I originally tried to use OBConversion.GetNextFormat, but ran > >> >> into the > >> >> >>>>>> ground fairly quickly. I then discovered the post at: > >> >> >>>>>> > >> >> >>>>>> > >> >> > >> http://sourceforge.net/mailarchive/forum.php?thread_name=200702191105.25888.j.pansanel%40pansanel.net&forum_name=openbabel-scripting > >> > >> >> > >> >> >>>>>> > >> >> >>>>>> which suggest that I should be able to get what I want using > >> >> >>>>>> GetSupportedInputFormat(), however, I'm currently pretty > >> >> clueless as to > >> >> >>>>>> how I extract the information from the object. I get something > >> >> back as > >> >> >>>>>> shown below, but I'd appreciated any advice on what I then > >> >> need to do > >> >> >>>>>> with it. > >> >> >>>>>> > >> >> >> > >> >> > >> ------------------------------------------------------------------------- > >> > >> >> > >> >> >> 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 > >> >> >> > >> >> >> > >> >> > > >> >> > > >> >> > >> ------------------------------------------------------------------------- > >> > >> >> > >> >> > 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: Jens T. <j.m...@dl...> - 2007-05-17 11:21:02
|
Hi Noel, I've just worked out that the problem arose because I hadn't installed anything and was running it directly from the build directory. I assume it looks in a set directory for the files to dynamically configure the supported formats. Can this be changed with an environment variable? Anyway, it's not important as once I'd installed everything into a directory structure it then worked fine. I should probably mention that I hit problems with the default version of SWIG on Ubuntu wasn't able to handle the "-naturalvar" flag, so I had to install swig 1.3.31 to get the build to work. Many thanks for your help. Jens Noel O'Boyle wrote: > The good news is that all the Python stuff seems to be working fine > (no initialisation necessary). The bad news is that the C++ stuff > isn't working properly. > > I'm betting that if you try "babel -H" and look under "The following > file formats are recognized", you will see nothing there. Which is > what you're also seeing in python. To verify, try to convert a file > using babel. This is because the file formats are loaded dynamically > as plugins, so there can be problems if you compile with particular > settings. > > How exactly are you compiling the software? Did you follow the > instructions on the web exactly (see > http://openbabel.sourceforge.net/wiki/Install_%28source_code%29), or > are you doing something different? I'm using an old version of Ubuntu > myself, so there's no reason we can't get it to work. > > Regards > Noel > > On 15/05/07, Jens Thomas <j.m...@dl...> wrote: >> Hello! >> >> It's taken me a little while to grind through all the usual little >> hiccups that come when building an unfamiliar code straight out of the >> repository, but I've now got what (I think) is the correct version. >> >> I checked out the code at r1954 and patched with r1958 as suggested >> by Noel. >> >> However, I'm not getting anything from pybel.informats or >> OBConversion.GetSupportedInputFormats as shown below: >> >> >> Python 2.4.3 (#2, Oct 6 2006, 07:52:30) >> [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import pybel >> >>> pybel.informats >> {} >> >>> pybel.outformats >> {} >> >>> import openbabel >> >>> obc = openbabel.OBConversion() >> >>> i= obc.GetSupportedInputFormat() >> >>> print i >> () >> >>> dir(i) >> ['__add__', '__class__', '__contains__', '__delattr__', '__doc__', >> '__eq__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', >> '__getslice__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', >> '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', >> '__reduce_ex__', '__repr__', '__rmul__', '__setattr__', '__str__'] >> >> >> Is there some sort of initialisation I need to do to get the dictionary >> populated? >> >> Many thanks, >> >> Jens >> >> Noel O'Boyle wrote: >> > I've already noticed that the latest SVN is not compatible with SWIG >> > due to changes introducted at r1954. You'll need to check out r1953, >> > and use "svn merge -r 1957:1958" to patch with r1958. >> > >> > Noel >> > >> > On 14/05/07, Jens Thomas <j.m...@dl...> wrote: >> >> Hi Noel, Jerome and Chris, >> >> >> >> Firstly, many thanks for the quick response and warm welcome to the >> >> list! Please accept my apologies for not replying sooner, but I've >> been >> >> away without access to email. >> >> >> >> I've tried checking out the latest version of openbabel from SVN >> onto my >> >> Ubuntu box (Dapper on a Pentium 4) so that I can try some of the >> changes >> >> you've committed. I ran a normal configure (./configure), but the >> make >> >> currently fails with: >> >> >> >> make[2]: Leaving directory `/home/jmht/openbabel/test/cmltest' >> >> make[2]: Entering directory `/home/jmht/openbabel/test' >> >> g++ -DHAVE_CONFIG_H -I. -I../src -I../include >> >> -DTESTDATADIR="\"../test/files/\"" -g -O2 -MT roundtrip.o -MD >> -MP -MF >> >> .deps/roundtrip.Tpo -c -o roundtrip.o roundtrip.cpp >> >> mv -f .deps/roundtrip.Tpo .deps/roundtrip.Po >> >> /bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -o roundtrip >> >> roundtrip.o ../src/libopenbabel.la -ldl -lm >> >> mkdir .libs >> >> g++ -g -O2 -o .libs/roundtrip roundtrip.o >> ../src/.libs/libopenbabel.so >> >> -ldl -lm -Wl,--rpath -Wl,/usr/local/lib >> >> ../src/.libs/libopenbabel.so: undefined reference to >> >> `OpenBabel::OBFormat::FormatFromMIME(char const*)' >> >> ../src/.libs/libopenbabel.so: undefined reference to >> >> `OpenBabel::OBPlugin::Display(std::basic_string<char, >> >> std::char_traits<char>, std::allocator<char> >&, char const*, char >> >> const*)' >> >> ../src/.libs/libopenbabel.so: undefined reference to `vtable for >> >> OpenBabel::OBDescriptor' >> >> ../src/.libs/libopenbabel.so: undefined reference to >> >> `OpenBabel::OBDescriptor::Compare(OpenBabel::OBBase*, >> >> std::basic_istream<char, std::char_traits<char> >&, bool)' >> >> ../src/.libs/libopenbabel.so: undefined reference to `vtable for >> >> OpenBabel::OBPlugin' >> >> ../src/.libs/libopenbabel.so: undefined reference to >> >> `OpenBabel::OBPlugin::ListAsVector(char const*, char const*, >> >> std::vector<std::basic_string<char, std::char_traits<char>, >> >> std::allocator<char> >, std::allocator<std::basic_string<char, >> >> std::char_traits<char>, std::allocator<char> > > >&)' >> >> ../src/.libs/libopenbabel.so: undefined reference to `typeinfo for >> >> OpenBabel::OBPlugin' >> >> ../src/.libs/libopenbabel.so: undefined reference to >> >> `OpenBabel::OBDescriptor::AddProperties(OpenBabel::OBBase*, >> >> std::basic_string<char, std::char_traits<char>, >> std::allocator<char> > >> >> const&)' >> >> ../src/.libs/libopenbabel.so: undefined reference to >> >> `OpenBabel::OBDescriptor::GetStringValue(OpenBabel::OBBase*, >> >> std::basic_string<char, std::char_traits<char>, std::allocator<char> >> >> >&)' >> >> ../src/.libs/libopenbabel.so: undefined reference to >> >> `OpenBabel::OBDescriptor::FilterCompare(OpenBabel::OBBase*, >> >> std::basic_istream<char, std::char_traits<char> >&, bool)' >> >> ../src/.libs/libopenbabel.so: undefined reference to >> >> `OpenBabel::OBFormat::RegisterFormat(char const*, char const*)' >> >> ../src/.libs/libopenbabel.so: undefined reference to `typeinfo for >> >> OpenBabel::OBDescriptor' >> >> ../src/.libs/libopenbabel.so: undefined reference to >> >> `OpenBabel::OBDescriptor::DeleteProperties(OpenBabel::OBBase*, >> >> std::basic_string<char, std::char_traits<char>, >> std::allocator<char> > >> >> const&)' >> >> collect2: ld returned 1 exit status >> >> make[2]: *** [roundtrip] Error 1 >> >> >> >> I'm not that familiar with C++ and so am bit stuck as to how to sort >> >> this one out. >> >> >> >> Do you have any suggestions? >> >> >> >> Best wishes, >> >> >> >> Jens >> >> >> >> >> >> Noel O'Boyle wrote: >> >> > On 12/05/07, Chris Morley <c.m...@ds...> wrote: >> >> > >> >> >> In the revamped code for formats (and other plugins) recently >> >> committed >> >> >> to SVN HEAD (for the next OB version) I tried to maintain backward >> >> >> compatibility as far as possible. So >> >> OBConversion::SupportedInputFormat() >> >> >> works as before but, you'll be pleased to hear, without the >> >> '[Read-only]'. >> >> >> >> >> > Sounds good but SWIG doesn't like the new code. When I try to >> compile >> >> > openbabel_python.cpp, I get: >> >> > >> >> > ../../include/openbabel/fingerprint.h:48: error: 'static >> >> > std::map<const char*, OpenBabel::OBPlugin*, >> >> > OpenBabel::OBPlugin::CharPtrLess, std::allocator<std::pair<const >> char* >> >> > const, OpenBabel::OBPlugin*> > >& OpenBabel::OBFingerprint::Map()' >> >> > cannot be overloaded >> >> > ../../include/openbabel/fingerprint.h:43: error: with 'static >> >> > std::map<const char*, OpenBabel::OBPlugin*, >> >> > OpenBabel::OBPlugin::CharPtrLess, std::allocator<std::pair<const >> char* >> >> > const, OpenBabel::OBPlugin*> > >& OpenBabel::OBFingerprint::Map()' >> >> > ../../include/openbabel/fingerprint.h:53: error: 'static >> >> > OpenBabel::OBFingerprint*& OpenBabel::OBFingerprint::Default()' >> cannot >> >> > be overloaded >> >> > ../../include/openbabel/fingerprint.h:43: error: with 'static >> >> > OpenBabel::OBFingerprint*& OpenBabel::OBFingerprint::Default()' >> >> > ../../include/openbabel/fingerprint.h: In constructor >> >> > 'OpenBabel::OBFingerprint::OBFingerprint(std::string, bool)': >> >> > ../../include/openbabel/fingerprint.h:63: error: no match for >> >> > 'operator[]' in 'OpenBabel::OBFingerprint::Map()[ID]' >> >> > /usr/include/c++/4.0.2/bits/stl_map.h:331: note: candidates are: >> _Tp& >> >> > std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const _Key&) >> [with >> >> > _Key = const char*, _Tp = OpenBabel::OBPlugin*, _Compare = >> >> > OpenBabel::OBPlugin::CharPtrLess, _Alloc = >> >> > std::allocator<std::pair<const char* const, >> OpenBabel::OBPlugin*> >] >> >> > >> >> > >> >> >> But in an effort to provide more choice on the form of the output, >> >> there >> >> >> are three functions which provide a list of formats(or other >> plugin >> >> >> classes): OBPlugin::ListAsVector, ListAsString and List. The first >> >> two >> >> >> were intended to be compatible with scripting, although I need >> some >> >> >> advice here. ListAsString returns a (big) std::string, but >> >> ListAsVector >> >> >> has a parameter which is a reference to a std::vector. If this is >> >> >> incompatible with scripting languages I should change it. >> >> >> >> >> > There's no problem with vectors in general; these are simply >> >> > translated to lists by SWIG. >> >> > >> >> > >> >> >> All three have a parameter which can control what is in the >> >> output. For >> >> >> example if it contains "verbose" it output the whole >> description, not >> >> >> just the first line. So it would be easy to add code (4 extra >> >> lines) to >> >> >> output only the IDs if that would be useful: >> >> >> ListAsVector("formats","in/ids", stringvector) >> >> >> >> >> >> Post-processing in pybel I'm sure is useful, but if the C++ >> code was >> >> >> adequate it could serve other scripting languages as well. >> >> >> >> >> > I think so too. In the meanwhile, I would like to push out a >> Windows >> >> > Python release based on 2.1.0 with the current pybel >> enhancements. I'm >> >> > going to try to get this together this weekend and do some testing. >> >> > >> >> > Noel >> >> > >> >> > >> >> >> Chris >> >> >> >> >> >> Noel O'Boyle wrote: >> >> >> >> >> >>> After looking at the C++ code, I realise that maybe returning >> a list >> >> >>> of strings is the only choice for SupportedInputFormat. Anyway, >> >> in the >> >> >>> meanwhile I've added some code to pybel, so that if you access >> >> >>> pybel.informats or outformats, you will get a dictionary of >> >> supported >> >> >>> formats. >> >> >>> >> >> >>> On 12/05/07, Noel O'Boyle <bao...@gm...> wrote: >> >> >>> >> >> >>>> Actually, a vector of std::strings had not yet been >> swigified, so I >> >> >>>> needed to added to a line to openbabel-python.i to set it up >> >> (not yet >> >> >>>> checked in). However, there's an additional problem, which >> >> Jerome may >> >> >>>> like to address. >> >> >>>> >> >> >>>> The data that's returned is similar to: >> >> >>>> ('acr -- ACR format [Read-only]', 'alc -- Alchemy format', ... ) >> >> >>>> >> >> >>>> whereas it would make more sense to me either to return: >> >> >>>> ('acr', 'alc', ...) >> >> >>>> or >> >> >>>> a std::map (i.e. a Python dict) of ['acr' : 'ACR format', 'alc': >> >> >>>> 'Alchemy format'] >> >> >>>> >> >> >>>> Note that the text [Read-only] is not really necessary in a >> list of >> >> >>>> supported input formats. >> >> >>>> >> >> >>>> Since this function was added for the benefit of scripting >> >> interfaces, >> >> >>>> it makes sense to make it as easy as possible to access the >> list of >> >> >>>> formats. >> >> >>>> >> >> >>>> Noel >> >> >>>> >> >> >>>> On 11/05/07, Noel O'Boyle <bao...@gm...> wrote: >> >> >>>> >> >> >>>>> Hello again Jens, >> >> >>>>> >> >> >>>>> Good to hear from you on this list... :-) >> >> >>>>> >> >> >>>>> On 10/05/07, Jens Thomas <j.m...@dl...> wrote: >> >> >>>>> >> >> >>>>>> Hi, >> >> >>>>>> >> >> >>>>>> I'm trying to enable our ccp1gui code >> >> >>>>>> (http://sourceforge.net/projects/ccp1gui/) to use openbabel so >> >> that we >> >> >>>>>> no longer have to support so many formats. >> >> >>>>>> >> >> >>>>>> I've got most of the machinery in place, but am a bit stuck on >> >> how to >> >> >>>>>> dynamically determine what input formats are supported by >> >> openbabel. >> >> >>>>>> >> >> >>>>>> I originally tried to use OBConversion.GetNextFormat, but ran >> >> into the >> >> >>>>>> ground fairly quickly. I then discovered the post at: >> >> >>>>>> >> >> >>>>>> >> >> >> http://sourceforge.net/mailarchive/forum.php?thread_name=200702191105.25888.j.pansanel%40pansanel.net&forum_name=openbabel-scripting >> >> >> >> >> >>>>>> >> >> >>>>>> which suggest that I should be able to get what I want using >> >> >>>>>> GetSupportedInputFormat(), however, I'm currently pretty >> >> clueless as to >> >> >>>>>> how I extract the information from the object. I get something >> >> back as >> >> >>>>>> shown below, but I'd appreciated any advice on what I then >> >> need to do >> >> >>>>>> with it. >> >> >>>>>> >> >> >> >> >> >> ------------------------------------------------------------------------- >> >> >> >> >> >> 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 >> >> >> >> >> >> >> >> > >> >> > >> >> >> ------------------------------------------------------------------------- >> >> >> >> >> > 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: Yesipenko A. <esi...@if...> - 2007-05-17 09:27:21
|
I convert SMI string into MOL (or MDL) format on Perl. The convertion = runs normally, but in result mol-format all coordinates (x, y and z) of = all atoms are (0,0,0). Why? Scipt: --------- my $obMol =3D new Chemistry::OpenBabel::OBMol; my $obConv =3D new Chemistry::OpenBabel::OBConversion; $obConv->SetInAndOutFormats("smi","mdl"); $obConv->ReadString($obMol,$FORM{'smlout'}); $molstr =3D $obConv->WriteString($obMol); --------- Input SMI strintg ($FORM{'smlout'}) is : C1CCC1 Output MOL format (value $molstr) is : --------- OpenBabel0512D 4 4 0 0 0 0 0 0 0 0999 V2000 0.0000 0.0000 0.0000 C 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 1 4 1 0 0 0 1 2 1 0 0 0 2 3 1 0 0 0 3 4 1 0 0 0 M END --------- Best regards, Alex Yesipenko esi...@if... |
From: Noel O'B. <bao...@gm...> - 2007-05-16 21:01:27
|
The good news is that all the Python stuff seems to be working fine (no initialisation necessary). The bad news is that the C++ stuff isn't working properly. I'm betting that if you try "babel -H" and look under "The following file formats are recognized", you will see nothing there. Which is what you're also seeing in python. To verify, try to convert a file using babel. This is because the file formats are loaded dynamically as plugins, so there can be problems if you compile with particular settings. How exactly are you compiling the software? Did you follow the instructions on the web exactly (see http://openbabel.sourceforge.net/wiki/Install_%28source_code%29), or are you doing something different? I'm using an old version of Ubuntu myself, so there's no reason we can't get it to work. Regards Noel On 15/05/07, Jens Thomas <j.m...@dl...> wrote: > Hello! > > It's taken me a little while to grind through all the usual little > hiccups that come when building an unfamiliar code straight out of the > repository, but I've now got what (I think) is the correct version. > > I checked out the code at r1954 and patched with r1958 as suggested by Noel. > > However, I'm not getting anything from pybel.informats or > OBConversion.GetSupportedInputFormats as shown below: > > > Python 2.4.3 (#2, Oct 6 2006, 07:52:30) > [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import pybel > >>> pybel.informats > {} > >>> pybel.outformats > {} > >>> import openbabel > >>> obc = openbabel.OBConversion() > >>> i= obc.GetSupportedInputFormat() > >>> print i > () > >>> dir(i) > ['__add__', '__class__', '__contains__', '__delattr__', '__doc__', > '__eq__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', > '__getslice__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', > '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', > '__reduce_ex__', '__repr__', '__rmul__', '__setattr__', '__str__'] > > > Is there some sort of initialisation I need to do to get the dictionary > populated? > > Many thanks, > > Jens > > Noel O'Boyle wrote: > > I've already noticed that the latest SVN is not compatible with SWIG > > due to changes introducted at r1954. You'll need to check out r1953, > > and use "svn merge -r 1957:1958" to patch with r1958. > > > > Noel > > > > On 14/05/07, Jens Thomas <j.m...@dl...> wrote: > >> Hi Noel, Jerome and Chris, > >> > >> Firstly, many thanks for the quick response and warm welcome to the > >> list! Please accept my apologies for not replying sooner, but I've been > >> away without access to email. > >> > >> I've tried checking out the latest version of openbabel from SVN onto my > >> Ubuntu box (Dapper on a Pentium 4) so that I can try some of the changes > >> you've committed. I ran a normal configure (./configure), but the make > >> currently fails with: > >> > >> make[2]: Leaving directory `/home/jmht/openbabel/test/cmltest' > >> make[2]: Entering directory `/home/jmht/openbabel/test' > >> g++ -DHAVE_CONFIG_H -I. -I../src -I../include > >> -DTESTDATADIR="\"../test/files/\"" -g -O2 -MT roundtrip.o -MD -MP -MF > >> .deps/roundtrip.Tpo -c -o roundtrip.o roundtrip.cpp > >> mv -f .deps/roundtrip.Tpo .deps/roundtrip.Po > >> /bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -o roundtrip > >> roundtrip.o ../src/libopenbabel.la -ldl -lm > >> mkdir .libs > >> g++ -g -O2 -o .libs/roundtrip roundtrip.o ../src/.libs/libopenbabel.so > >> -ldl -lm -Wl,--rpath -Wl,/usr/local/lib > >> ../src/.libs/libopenbabel.so: undefined reference to > >> `OpenBabel::OBFormat::FormatFromMIME(char const*)' > >> ../src/.libs/libopenbabel.so: undefined reference to > >> `OpenBabel::OBPlugin::Display(std::basic_string<char, > >> std::char_traits<char>, std::allocator<char> >&, char const*, char > >> const*)' > >> ../src/.libs/libopenbabel.so: undefined reference to `vtable for > >> OpenBabel::OBDescriptor' > >> ../src/.libs/libopenbabel.so: undefined reference to > >> `OpenBabel::OBDescriptor::Compare(OpenBabel::OBBase*, > >> std::basic_istream<char, std::char_traits<char> >&, bool)' > >> ../src/.libs/libopenbabel.so: undefined reference to `vtable for > >> OpenBabel::OBPlugin' > >> ../src/.libs/libopenbabel.so: undefined reference to > >> `OpenBabel::OBPlugin::ListAsVector(char const*, char const*, > >> std::vector<std::basic_string<char, std::char_traits<char>, > >> std::allocator<char> >, std::allocator<std::basic_string<char, > >> std::char_traits<char>, std::allocator<char> > > >&)' > >> ../src/.libs/libopenbabel.so: undefined reference to `typeinfo for > >> OpenBabel::OBPlugin' > >> ../src/.libs/libopenbabel.so: undefined reference to > >> `OpenBabel::OBDescriptor::AddProperties(OpenBabel::OBBase*, > >> std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> const&)' > >> ../src/.libs/libopenbabel.so: undefined reference to > >> `OpenBabel::OBDescriptor::GetStringValue(OpenBabel::OBBase*, > >> std::basic_string<char, std::char_traits<char>, std::allocator<char> > >> >&)' > >> ../src/.libs/libopenbabel.so: undefined reference to > >> `OpenBabel::OBDescriptor::FilterCompare(OpenBabel::OBBase*, > >> std::basic_istream<char, std::char_traits<char> >&, bool)' > >> ../src/.libs/libopenbabel.so: undefined reference to > >> `OpenBabel::OBFormat::RegisterFormat(char const*, char const*)' > >> ../src/.libs/libopenbabel.so: undefined reference to `typeinfo for > >> OpenBabel::OBDescriptor' > >> ../src/.libs/libopenbabel.so: undefined reference to > >> `OpenBabel::OBDescriptor::DeleteProperties(OpenBabel::OBBase*, > >> std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> const&)' > >> collect2: ld returned 1 exit status > >> make[2]: *** [roundtrip] Error 1 > >> > >> I'm not that familiar with C++ and so am bit stuck as to how to sort > >> this one out. > >> > >> Do you have any suggestions? > >> > >> Best wishes, > >> > >> Jens > >> > >> > >> Noel O'Boyle wrote: > >> > On 12/05/07, Chris Morley <c.m...@ds...> wrote: > >> > > >> >> In the revamped code for formats (and other plugins) recently > >> committed > >> >> to SVN HEAD (for the next OB version) I tried to maintain backward > >> >> compatibility as far as possible. So > >> OBConversion::SupportedInputFormat() > >> >> works as before but, you'll be pleased to hear, without the > >> '[Read-only]'. > >> >> > >> > Sounds good but SWIG doesn't like the new code. When I try to compile > >> > openbabel_python.cpp, I get: > >> > > >> > ../../include/openbabel/fingerprint.h:48: error: 'static > >> > std::map<const char*, OpenBabel::OBPlugin*, > >> > OpenBabel::OBPlugin::CharPtrLess, std::allocator<std::pair<const char* > >> > const, OpenBabel::OBPlugin*> > >& OpenBabel::OBFingerprint::Map()' > >> > cannot be overloaded > >> > ../../include/openbabel/fingerprint.h:43: error: with 'static > >> > std::map<const char*, OpenBabel::OBPlugin*, > >> > OpenBabel::OBPlugin::CharPtrLess, std::allocator<std::pair<const char* > >> > const, OpenBabel::OBPlugin*> > >& OpenBabel::OBFingerprint::Map()' > >> > ../../include/openbabel/fingerprint.h:53: error: 'static > >> > OpenBabel::OBFingerprint*& OpenBabel::OBFingerprint::Default()' cannot > >> > be overloaded > >> > ../../include/openbabel/fingerprint.h:43: error: with 'static > >> > OpenBabel::OBFingerprint*& OpenBabel::OBFingerprint::Default()' > >> > ../../include/openbabel/fingerprint.h: In constructor > >> > 'OpenBabel::OBFingerprint::OBFingerprint(std::string, bool)': > >> > ../../include/openbabel/fingerprint.h:63: error: no match for > >> > 'operator[]' in 'OpenBabel::OBFingerprint::Map()[ID]' > >> > /usr/include/c++/4.0.2/bits/stl_map.h:331: note: candidates are: _Tp& > >> > std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const _Key&) [with > >> > _Key = const char*, _Tp = OpenBabel::OBPlugin*, _Compare = > >> > OpenBabel::OBPlugin::CharPtrLess, _Alloc = > >> > std::allocator<std::pair<const char* const, OpenBabel::OBPlugin*> >] > >> > > >> > > >> >> But in an effort to provide more choice on the form of the output, > >> there > >> >> are three functions which provide a list of formats(or other plugin > >> >> classes): OBPlugin::ListAsVector, ListAsString and List. The first > >> two > >> >> were intended to be compatible with scripting, although I need some > >> >> advice here. ListAsString returns a (big) std::string, but > >> ListAsVector > >> >> has a parameter which is a reference to a std::vector. If this is > >> >> incompatible with scripting languages I should change it. > >> >> > >> > There's no problem with vectors in general; these are simply > >> > translated to lists by SWIG. > >> > > >> > > >> >> All three have a parameter which can control what is in the > >> output. For > >> >> example if it contains "verbose" it output the whole description, not > >> >> just the first line. So it would be easy to add code (4 extra > >> lines) to > >> >> output only the IDs if that would be useful: > >> >> ListAsVector("formats","in/ids", stringvector) > >> >> > >> >> Post-processing in pybel I'm sure is useful, but if the C++ code was > >> >> adequate it could serve other scripting languages as well. > >> >> > >> > I think so too. In the meanwhile, I would like to push out a Windows > >> > Python release based on 2.1.0 with the current pybel enhancements. I'm > >> > going to try to get this together this weekend and do some testing. > >> > > >> > Noel > >> > > >> > > >> >> Chris > >> >> > >> >> Noel O'Boyle wrote: > >> >> > >> >>> After looking at the C++ code, I realise that maybe returning a list > >> >>> of strings is the only choice for SupportedInputFormat. Anyway, > >> in the > >> >>> meanwhile I've added some code to pybel, so that if you access > >> >>> pybel.informats or outformats, you will get a dictionary of > >> supported > >> >>> formats. > >> >>> > >> >>> On 12/05/07, Noel O'Boyle <bao...@gm...> wrote: > >> >>> > >> >>>> Actually, a vector of std::strings had not yet been swigified, so I > >> >>>> needed to added to a line to openbabel-python.i to set it up > >> (not yet > >> >>>> checked in). However, there's an additional problem, which > >> Jerome may > >> >>>> like to address. > >> >>>> > >> >>>> The data that's returned is similar to: > >> >>>> ('acr -- ACR format [Read-only]', 'alc -- Alchemy format', ... ) > >> >>>> > >> >>>> whereas it would make more sense to me either to return: > >> >>>> ('acr', 'alc', ...) > >> >>>> or > >> >>>> a std::map (i.e. a Python dict) of ['acr' : 'ACR format', 'alc': > >> >>>> 'Alchemy format'] > >> >>>> > >> >>>> Note that the text [Read-only] is not really necessary in a list of > >> >>>> supported input formats. > >> >>>> > >> >>>> Since this function was added for the benefit of scripting > >> interfaces, > >> >>>> it makes sense to make it as easy as possible to access the list of > >> >>>> formats. > >> >>>> > >> >>>> Noel > >> >>>> > >> >>>> On 11/05/07, Noel O'Boyle <bao...@gm...> wrote: > >> >>>> > >> >>>>> Hello again Jens, > >> >>>>> > >> >>>>> Good to hear from you on this list... :-) > >> >>>>> > >> >>>>> On 10/05/07, Jens Thomas <j.m...@dl...> wrote: > >> >>>>> > >> >>>>>> Hi, > >> >>>>>> > >> >>>>>> I'm trying to enable our ccp1gui code > >> >>>>>> (http://sourceforge.net/projects/ccp1gui/) to use openbabel so > >> that we > >> >>>>>> no longer have to support so many formats. > >> >>>>>> > >> >>>>>> I've got most of the machinery in place, but am a bit stuck on > >> how to > >> >>>>>> dynamically determine what input formats are supported by > >> openbabel. > >> >>>>>> > >> >>>>>> I originally tried to use OBConversion.GetNextFormat, but ran > >> into the > >> >>>>>> ground fairly quickly. I then discovered the post at: > >> >>>>>> > >> >>>>>> > >> http://sourceforge.net/mailarchive/forum.php?thread_name=200702191105.25888.j.pansanel%40pansanel.net&forum_name=openbabel-scripting > >> > >> >>>>>> > >> >>>>>> which suggest that I should be able to get what I want using > >> >>>>>> GetSupportedInputFormat(), however, I'm currently pretty > >> clueless as to > >> >>>>>> how I extract the information from the object. I get something > >> back as > >> >>>>>> shown below, but I'd appreciated any advice on what I then > >> need to do > >> >>>>>> with it. > >> >>>>>> > >> >> > >> ------------------------------------------------------------------------- > >> > >> >> 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 > >> >> > >> >> > >> > > >> > > >> ------------------------------------------------------------------------- > >> > >> > 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: Jens T. <j.m...@dl...> - 2007-05-15 17:30:26
|
Hello! It's taken me a little while to grind through all the usual little hiccups that come when building an unfamiliar code straight out of the repository, but I've now got what (I think) is the correct version. I checked out the code at r1954 and patched with r1958 as suggested by Noel. However, I'm not getting anything from pybel.informats or OBConversion.GetSupportedInputFormats as shown below: Python 2.4.3 (#2, Oct 6 2006, 07:52:30) [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pybel >>> pybel.informats {} >>> pybel.outformats {} >>> import openbabel >>> obc = openbabel.OBConversion() >>> i= obc.GetSupportedInputFormat() >>> print i () >>> dir(i) ['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getslice__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmul__', '__setattr__', '__str__'] Is there some sort of initialisation I need to do to get the dictionary populated? Many thanks, Jens Noel O'Boyle wrote: > I've already noticed that the latest SVN is not compatible with SWIG > due to changes introducted at r1954. You'll need to check out r1953, > and use "svn merge -r 1957:1958" to patch with r1958. > > Noel > > On 14/05/07, Jens Thomas <j.m...@dl...> wrote: >> Hi Noel, Jerome and Chris, >> >> Firstly, many thanks for the quick response and warm welcome to the >> list! Please accept my apologies for not replying sooner, but I've been >> away without access to email. >> >> I've tried checking out the latest version of openbabel from SVN onto my >> Ubuntu box (Dapper on a Pentium 4) so that I can try some of the changes >> you've committed. I ran a normal configure (./configure), but the make >> currently fails with: >> >> make[2]: Leaving directory `/home/jmht/openbabel/test/cmltest' >> make[2]: Entering directory `/home/jmht/openbabel/test' >> g++ -DHAVE_CONFIG_H -I. -I../src -I../include >> -DTESTDATADIR="\"../test/files/\"" -g -O2 -MT roundtrip.o -MD -MP -MF >> .deps/roundtrip.Tpo -c -o roundtrip.o roundtrip.cpp >> mv -f .deps/roundtrip.Tpo .deps/roundtrip.Po >> /bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -o roundtrip >> roundtrip.o ../src/libopenbabel.la -ldl -lm >> mkdir .libs >> g++ -g -O2 -o .libs/roundtrip roundtrip.o ../src/.libs/libopenbabel.so >> -ldl -lm -Wl,--rpath -Wl,/usr/local/lib >> ../src/.libs/libopenbabel.so: undefined reference to >> `OpenBabel::OBFormat::FormatFromMIME(char const*)' >> ../src/.libs/libopenbabel.so: undefined reference to >> `OpenBabel::OBPlugin::Display(std::basic_string<char, >> std::char_traits<char>, std::allocator<char> >&, char const*, char >> const*)' >> ../src/.libs/libopenbabel.so: undefined reference to `vtable for >> OpenBabel::OBDescriptor' >> ../src/.libs/libopenbabel.so: undefined reference to >> `OpenBabel::OBDescriptor::Compare(OpenBabel::OBBase*, >> std::basic_istream<char, std::char_traits<char> >&, bool)' >> ../src/.libs/libopenbabel.so: undefined reference to `vtable for >> OpenBabel::OBPlugin' >> ../src/.libs/libopenbabel.so: undefined reference to >> `OpenBabel::OBPlugin::ListAsVector(char const*, char const*, >> std::vector<std::basic_string<char, std::char_traits<char>, >> std::allocator<char> >, std::allocator<std::basic_string<char, >> std::char_traits<char>, std::allocator<char> > > >&)' >> ../src/.libs/libopenbabel.so: undefined reference to `typeinfo for >> OpenBabel::OBPlugin' >> ../src/.libs/libopenbabel.so: undefined reference to >> `OpenBabel::OBDescriptor::AddProperties(OpenBabel::OBBase*, >> std::basic_string<char, std::char_traits<char>, std::allocator<char> > >> const&)' >> ../src/.libs/libopenbabel.so: undefined reference to >> `OpenBabel::OBDescriptor::GetStringValue(OpenBabel::OBBase*, >> std::basic_string<char, std::char_traits<char>, std::allocator<char> >> >&)' >> ../src/.libs/libopenbabel.so: undefined reference to >> `OpenBabel::OBDescriptor::FilterCompare(OpenBabel::OBBase*, >> std::basic_istream<char, std::char_traits<char> >&, bool)' >> ../src/.libs/libopenbabel.so: undefined reference to >> `OpenBabel::OBFormat::RegisterFormat(char const*, char const*)' >> ../src/.libs/libopenbabel.so: undefined reference to `typeinfo for >> OpenBabel::OBDescriptor' >> ../src/.libs/libopenbabel.so: undefined reference to >> `OpenBabel::OBDescriptor::DeleteProperties(OpenBabel::OBBase*, >> std::basic_string<char, std::char_traits<char>, std::allocator<char> > >> const&)' >> collect2: ld returned 1 exit status >> make[2]: *** [roundtrip] Error 1 >> >> I'm not that familiar with C++ and so am bit stuck as to how to sort >> this one out. >> >> Do you have any suggestions? >> >> Best wishes, >> >> Jens >> >> >> Noel O'Boyle wrote: >> > On 12/05/07, Chris Morley <c.m...@ds...> wrote: >> > >> >> In the revamped code for formats (and other plugins) recently >> committed >> >> to SVN HEAD (for the next OB version) I tried to maintain backward >> >> compatibility as far as possible. So >> OBConversion::SupportedInputFormat() >> >> works as before but, you'll be pleased to hear, without the >> '[Read-only]'. >> >> >> > Sounds good but SWIG doesn't like the new code. When I try to compile >> > openbabel_python.cpp, I get: >> > >> > ../../include/openbabel/fingerprint.h:48: error: 'static >> > std::map<const char*, OpenBabel::OBPlugin*, >> > OpenBabel::OBPlugin::CharPtrLess, std::allocator<std::pair<const char* >> > const, OpenBabel::OBPlugin*> > >& OpenBabel::OBFingerprint::Map()' >> > cannot be overloaded >> > ../../include/openbabel/fingerprint.h:43: error: with 'static >> > std::map<const char*, OpenBabel::OBPlugin*, >> > OpenBabel::OBPlugin::CharPtrLess, std::allocator<std::pair<const char* >> > const, OpenBabel::OBPlugin*> > >& OpenBabel::OBFingerprint::Map()' >> > ../../include/openbabel/fingerprint.h:53: error: 'static >> > OpenBabel::OBFingerprint*& OpenBabel::OBFingerprint::Default()' cannot >> > be overloaded >> > ../../include/openbabel/fingerprint.h:43: error: with 'static >> > OpenBabel::OBFingerprint*& OpenBabel::OBFingerprint::Default()' >> > ../../include/openbabel/fingerprint.h: In constructor >> > 'OpenBabel::OBFingerprint::OBFingerprint(std::string, bool)': >> > ../../include/openbabel/fingerprint.h:63: error: no match for >> > 'operator[]' in 'OpenBabel::OBFingerprint::Map()[ID]' >> > /usr/include/c++/4.0.2/bits/stl_map.h:331: note: candidates are: _Tp& >> > std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const _Key&) [with >> > _Key = const char*, _Tp = OpenBabel::OBPlugin*, _Compare = >> > OpenBabel::OBPlugin::CharPtrLess, _Alloc = >> > std::allocator<std::pair<const char* const, OpenBabel::OBPlugin*> >] >> > >> > >> >> But in an effort to provide more choice on the form of the output, >> there >> >> are three functions which provide a list of formats(or other plugin >> >> classes): OBPlugin::ListAsVector, ListAsString and List. The first >> two >> >> were intended to be compatible with scripting, although I need some >> >> advice here. ListAsString returns a (big) std::string, but >> ListAsVector >> >> has a parameter which is a reference to a std::vector. If this is >> >> incompatible with scripting languages I should change it. >> >> >> > There's no problem with vectors in general; these are simply >> > translated to lists by SWIG. >> > >> > >> >> All three have a parameter which can control what is in the >> output. For >> >> example if it contains "verbose" it output the whole description, not >> >> just the first line. So it would be easy to add code (4 extra >> lines) to >> >> output only the IDs if that would be useful: >> >> ListAsVector("formats","in/ids", stringvector) >> >> >> >> Post-processing in pybel I'm sure is useful, but if the C++ code was >> >> adequate it could serve other scripting languages as well. >> >> >> > I think so too. In the meanwhile, I would like to push out a Windows >> > Python release based on 2.1.0 with the current pybel enhancements. I'm >> > going to try to get this together this weekend and do some testing. >> > >> > Noel >> > >> > >> >> Chris >> >> >> >> Noel O'Boyle wrote: >> >> >> >>> After looking at the C++ code, I realise that maybe returning a list >> >>> of strings is the only choice for SupportedInputFormat. Anyway, >> in the >> >>> meanwhile I've added some code to pybel, so that if you access >> >>> pybel.informats or outformats, you will get a dictionary of >> supported >> >>> formats. >> >>> >> >>> On 12/05/07, Noel O'Boyle <bao...@gm...> wrote: >> >>> >> >>>> Actually, a vector of std::strings had not yet been swigified, so I >> >>>> needed to added to a line to openbabel-python.i to set it up >> (not yet >> >>>> checked in). However, there's an additional problem, which >> Jerome may >> >>>> like to address. >> >>>> >> >>>> The data that's returned is similar to: >> >>>> ('acr -- ACR format [Read-only]', 'alc -- Alchemy format', ... ) >> >>>> >> >>>> whereas it would make more sense to me either to return: >> >>>> ('acr', 'alc', ...) >> >>>> or >> >>>> a std::map (i.e. a Python dict) of ['acr' : 'ACR format', 'alc': >> >>>> 'Alchemy format'] >> >>>> >> >>>> Note that the text [Read-only] is not really necessary in a list of >> >>>> supported input formats. >> >>>> >> >>>> Since this function was added for the benefit of scripting >> interfaces, >> >>>> it makes sense to make it as easy as possible to access the list of >> >>>> formats. >> >>>> >> >>>> Noel >> >>>> >> >>>> On 11/05/07, Noel O'Boyle <bao...@gm...> wrote: >> >>>> >> >>>>> Hello again Jens, >> >>>>> >> >>>>> Good to hear from you on this list... :-) >> >>>>> >> >>>>> On 10/05/07, Jens Thomas <j.m...@dl...> wrote: >> >>>>> >> >>>>>> Hi, >> >>>>>> >> >>>>>> I'm trying to enable our ccp1gui code >> >>>>>> (http://sourceforge.net/projects/ccp1gui/) to use openbabel so >> that we >> >>>>>> no longer have to support so many formats. >> >>>>>> >> >>>>>> I've got most of the machinery in place, but am a bit stuck on >> how to >> >>>>>> dynamically determine what input formats are supported by >> openbabel. >> >>>>>> >> >>>>>> I originally tried to use OBConversion.GetNextFormat, but ran >> into the >> >>>>>> ground fairly quickly. I then discovered the post at: >> >>>>>> >> >>>>>> >> http://sourceforge.net/mailarchive/forum.php?thread_name=200702191105.25888.j.pansanel%40pansanel.net&forum_name=openbabel-scripting >> >> >>>>>> >> >>>>>> which suggest that I should be able to get what I want using >> >>>>>> GetSupportedInputFormat(), however, I'm currently pretty >> clueless as to >> >>>>>> how I extract the information from the object. I get something >> back as >> >>>>>> shown below, but I'd appreciated any advice on what I then >> need to do >> >>>>>> with it. >> >>>>>> >> >> >> ------------------------------------------------------------------------- >> >> >> 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 >> >> >> >> >> > >> > >> ------------------------------------------------------------------------- >> >> > 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: David R. <tom...@gm...> - 2007-05-14 17:42:53
|
I obtained an older version of svn to try to exclude that as a possible explanation, and again tried configuring and making revision 1960. Outputs from configure and make are attached. Thanks again for your help. Dave. On 5/14/07, Geoffrey Hutchison <ge...@ge...> wrote: > > On May 14, 2007, at 10:30 AM, Noel O'Boyle wrote: > > > If any errors occur, please provide the first error messages rather > > than the tail end, as the real problem is usually described at the > > start. > > >> __ZN9OpenBabel8OBFormat14FormatFromMIMEEPKc > >> __ZN9OpenBabel8OBFormat14RegisterFormatEPKcS2_ > > Indeed, these are missing symbols during linking. So if there are > error messages earlier on, they'll certainly explain why these > symbols are missing. > > You may also be linking the newer SWIG code to an older libopenbabel, > which would also result in missing symbols. > > Cheers, > -Geoff > |
From: Chris M. <c.m...@ds...> - 2007-05-14 16:08:14
|
The new files are: include/openbabel/descriptor.h, include/openbabel/format.h include/openbabel/plugin.h, src/descriptor.cpp src/filters.cpp, src/format.cpp, src/plugin.cpp Removed file: include/openbabel/pluginiter.h Noel O'Boyle wrote: > I think the Makefiles need to be updated. That is, there's been a > pluginiter.h --> plugin.h transition. After installing automake-1.9 > and libtool, and editing a Makefile.am, it overwrites the Makefile.in, > but the top level "make" just fails. This is possibly because the > version of libtool I have access to is a couple of years out of date > (1.5.6). > > Noel > > On 13/05/07, Noel O'Boyle <bao...@gm...> wrote: >> On 12/05/07, Chris Morley <c.m...@ds...> wrote: >> > In the revamped code for formats (and other plugins) recently committed >> > to SVN HEAD (for the next OB version) I tried to maintain backward >> > compatibility as far as possible. So >> OBConversion::SupportedInputFormat() >> > works as before but, you'll be pleased to hear, without the >> '[Read-only]'. >> Sounds good but SWIG doesn't like the new code. When I try to compile >> openbabel_python.cpp, I get: >> >> ../../include/openbabel/fingerprint.h:48: error: 'static >> std::map<const char*, OpenBabel::OBPlugin*, >> OpenBabel::OBPlugin::CharPtrLess, std::allocator<std::pair<const char* >> const, OpenBabel::OBPlugin*> > >& OpenBabel::OBFingerprint::Map()' >> cannot be overloaded >> ../../include/openbabel/fingerprint.h:43: error: with 'static >> std::map<const char*, OpenBabel::OBPlugin*, >> OpenBabel::OBPlugin::CharPtrLess, std::allocator<std::pair<const char* >> const, OpenBabel::OBPlugin*> > >& OpenBabel::OBFingerprint::Map()' >> ../../include/openbabel/fingerprint.h:53: error: 'static >> OpenBabel::OBFingerprint*& OpenBabel::OBFingerprint::Default()' cannot >> be overloaded >> ../../include/openbabel/fingerprint.h:43: error: with 'static >> OpenBabel::OBFingerprint*& OpenBabel::OBFingerprint::Default()' >> ../../include/openbabel/fingerprint.h: In constructor >> 'OpenBabel::OBFingerprint::OBFingerprint(std::string, bool)': >> ../../include/openbabel/fingerprint.h:63: error: no match for >> 'operator[]' in 'OpenBabel::OBFingerprint::Map()[ID]' >> /usr/include/c++/4.0.2/bits/stl_map.h:331: note: candidates are: _Tp& >> std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const _Key&) [with >> _Key = const char*, _Tp = OpenBabel::OBPlugin*, _Compare = >> OpenBabel::OBPlugin::CharPtrLess, _Alloc = >> std::allocator<std::pair<const char* const, OpenBabel::OBPlugin*> >] >> >> > But in an effort to provide more choice on the form of the output, >> there >> > are three functions which provide a list of formats(or other plugin >> > classes): OBPlugin::ListAsVector, ListAsString and List. The first two >> > were intended to be compatible with scripting, although I need some >> > advice here. ListAsString returns a (big) std::string, but ListAsVector >> > has a parameter which is a reference to a std::vector. If this is >> > incompatible with scripting languages I should change it. >> There's no problem with vectors in general; these are simply >> translated to lists by SWIG. >> >> > All three have a parameter which can control what is in the output. For >> > example if it contains "verbose" it output the whole description, not >> > just the first line. So it would be easy to add code (4 extra lines) to >> > output only the IDs if that would be useful: >> > ListAsVector("formats","in/ids", stringvector) >> > >> > Post-processing in pybel I'm sure is useful, but if the C++ code was >> > adequate it could serve other scripting languages as well. >> I think so too. In the meanwhile, I would like to push out a Windows >> Python release based on 2.1.0 with the current pybel enhancements. I'm >> going to try to get this together this weekend and do some testing. >> >> Noel >> >> > Chris >> > >> > Noel O'Boyle wrote: >> > > After looking at the C++ code, I realise that maybe returning a list >> > > of strings is the only choice for SupportedInputFormat. Anyway, in >> the >> > > meanwhile I've added some code to pybel, so that if you access >> > > pybel.informats or outformats, you will get a dictionary of supported >> > > formats. >> > > >> > > On 12/05/07, Noel O'Boyle <bao...@gm...> wrote: >> > >> Actually, a vector of std::strings had not yet been swigified, so I >> > >> needed to added to a line to openbabel-python.i to set it up (not >> yet >> > >> checked in). However, there's an additional problem, which Jerome >> may >> > >> like to address. >> > >> >> > >> The data that's returned is similar to: >> > >> ('acr -- ACR format [Read-only]', 'alc -- Alchemy format', ... ) >> > >> >> > >> whereas it would make more sense to me either to return: >> > >> ('acr', 'alc', ...) >> > >> or >> > >> a std::map (i.e. a Python dict) of ['acr' : 'ACR format', 'alc': >> > >> 'Alchemy format'] >> > >> >> > >> Note that the text [Read-only] is not really necessary in a list of >> > >> supported input formats. >> > >> >> > >> Since this function was added for the benefit of scripting >> interfaces, >> > >> it makes sense to make it as easy as possible to access the list of >> > >> formats. >> > >> >> > >> Noel >> > >> >> > >> On 11/05/07, Noel O'Boyle <bao...@gm...> wrote: >> > >>> Hello again Jens, >> > >>> >> > >>> Good to hear from you on this list... :-) >> > >>> >> > >>> On 10/05/07, Jens Thomas <j.m...@dl...> wrote: >> > >>>> Hi, >> > >>>> >> > >>>> I'm trying to enable our ccp1gui code >> > >>>> (http://sourceforge.net/projects/ccp1gui/) to use openbabel so >> that we >> > >>>> no longer have to support so many formats. >> > >>>> >> > >>>> I've got most of the machinery in place, but am a bit stuck on >> how to >> > >>>> dynamically determine what input formats are supported by >> openbabel. >> > >>>> >> > >>>> I originally tried to use OBConversion.GetNextFormat, but ran >> into the >> > >>>> ground fairly quickly. I then discovered the post at: >> > >>>> >> > >>>> >> http://sourceforge.net/mailarchive/forum.php?thread_name=200702191105.25888.j.pansanel%40pansanel.net&forum_name=openbabel-scripting >> >> > >>>> >> > >>>> which suggest that I should be able to get what I want using >> > >>>> GetSupportedInputFormat(), however, I'm currently pretty >> clueless as to >> > >>>> how I extract the information from the object. I get something >> back as >> > >>>> shown below, but I'd appreciated any advice on what I then need >> to do >> > >>>> with it. >> > >> > >> > >> ------------------------------------------------------------------------- >> > 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: Noel O'B. <bao...@gm...> - 2007-05-14 15:50:23
|
I think the Makefiles need to be updated. That is, there's been a pluginiter.h --> plugin.h transition. After installing automake-1.9 and libtool, and editing a Makefile.am, it overwrites the Makefile.in, but the top level "make" just fails. This is possibly because the version of libtool I have access to is a couple of years out of date (1.5.6). Noel On 13/05/07, Noel O'Boyle <bao...@gm...> wrote: > On 12/05/07, Chris Morley <c.m...@ds...> wrote: > > In the revamped code for formats (and other plugins) recently committed > > to SVN HEAD (for the next OB version) I tried to maintain backward > > compatibility as far as possible. So OBConversion::SupportedInputFormat() > > works as before but, you'll be pleased to hear, without the '[Read-only]'. > Sounds good but SWIG doesn't like the new code. When I try to compile > openbabel_python.cpp, I get: > > ../../include/openbabel/fingerprint.h:48: error: 'static > std::map<const char*, OpenBabel::OBPlugin*, > OpenBabel::OBPlugin::CharPtrLess, std::allocator<std::pair<const char* > const, OpenBabel::OBPlugin*> > >& OpenBabel::OBFingerprint::Map()' > cannot be overloaded > ../../include/openbabel/fingerprint.h:43: error: with 'static > std::map<const char*, OpenBabel::OBPlugin*, > OpenBabel::OBPlugin::CharPtrLess, std::allocator<std::pair<const char* > const, OpenBabel::OBPlugin*> > >& OpenBabel::OBFingerprint::Map()' > ../../include/openbabel/fingerprint.h:53: error: 'static > OpenBabel::OBFingerprint*& OpenBabel::OBFingerprint::Default()' cannot > be overloaded > ../../include/openbabel/fingerprint.h:43: error: with 'static > OpenBabel::OBFingerprint*& OpenBabel::OBFingerprint::Default()' > ../../include/openbabel/fingerprint.h: In constructor > 'OpenBabel::OBFingerprint::OBFingerprint(std::string, bool)': > ../../include/openbabel/fingerprint.h:63: error: no match for > 'operator[]' in 'OpenBabel::OBFingerprint::Map()[ID]' > /usr/include/c++/4.0.2/bits/stl_map.h:331: note: candidates are: _Tp& > std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const _Key&) [with > _Key = const char*, _Tp = OpenBabel::OBPlugin*, _Compare = > OpenBabel::OBPlugin::CharPtrLess, _Alloc = > std::allocator<std::pair<const char* const, OpenBabel::OBPlugin*> >] > > > But in an effort to provide more choice on the form of the output, there > > are three functions which provide a list of formats(or other plugin > > classes): OBPlugin::ListAsVector, ListAsString and List. The first two > > were intended to be compatible with scripting, although I need some > > advice here. ListAsString returns a (big) std::string, but ListAsVector > > has a parameter which is a reference to a std::vector. If this is > > incompatible with scripting languages I should change it. > There's no problem with vectors in general; these are simply > translated to lists by SWIG. > > > All three have a parameter which can control what is in the output. For > > example if it contains "verbose" it output the whole description, not > > just the first line. So it would be easy to add code (4 extra lines) to > > output only the IDs if that would be useful: > > ListAsVector("formats","in/ids", stringvector) > > > > Post-processing in pybel I'm sure is useful, but if the C++ code was > > adequate it could serve other scripting languages as well. > I think so too. In the meanwhile, I would like to push out a Windows > Python release based on 2.1.0 with the current pybel enhancements. I'm > going to try to get this together this weekend and do some testing. > > Noel > > > Chris > > > > Noel O'Boyle wrote: > > > After looking at the C++ code, I realise that maybe returning a list > > > of strings is the only choice for SupportedInputFormat. Anyway, in the > > > meanwhile I've added some code to pybel, so that if you access > > > pybel.informats or outformats, you will get a dictionary of supported > > > formats. > > > > > > On 12/05/07, Noel O'Boyle <bao...@gm...> wrote: > > >> Actually, a vector of std::strings had not yet been swigified, so I > > >> needed to added to a line to openbabel-python.i to set it up (not yet > > >> checked in). However, there's an additional problem, which Jerome may > > >> like to address. > > >> > > >> The data that's returned is similar to: > > >> ('acr -- ACR format [Read-only]', 'alc -- Alchemy format', ... ) > > >> > > >> whereas it would make more sense to me either to return: > > >> ('acr', 'alc', ...) > > >> or > > >> a std::map (i.e. a Python dict) of ['acr' : 'ACR format', 'alc': > > >> 'Alchemy format'] > > >> > > >> Note that the text [Read-only] is not really necessary in a list of > > >> supported input formats. > > >> > > >> Since this function was added for the benefit of scripting interfaces, > > >> it makes sense to make it as easy as possible to access the list of > > >> formats. > > >> > > >> Noel > > >> > > >> On 11/05/07, Noel O'Boyle <bao...@gm...> wrote: > > >>> Hello again Jens, > > >>> > > >>> Good to hear from you on this list... :-) > > >>> > > >>> On 10/05/07, Jens Thomas <j.m...@dl...> wrote: > > >>>> Hi, > > >>>> > > >>>> I'm trying to enable our ccp1gui code > > >>>> (http://sourceforge.net/projects/ccp1gui/) to use openbabel so that we > > >>>> no longer have to support so many formats. > > >>>> > > >>>> I've got most of the machinery in place, but am a bit stuck on how to > > >>>> dynamically determine what input formats are supported by openbabel. > > >>>> > > >>>> I originally tried to use OBConversion.GetNextFormat, but ran into the > > >>>> ground fairly quickly. I then discovered the post at: > > >>>> > > >>>> http://sourceforge.net/mailarchive/forum.php?thread_name=200702191105.25888.j.pansanel%40pansanel.net&forum_name=openbabel-scripting > > >>>> > > >>>> which suggest that I should be able to get what I want using > > >>>> GetSupportedInputFormat(), however, I'm currently pretty clueless as to > > >>>> how I extract the information from the object. I get something back as > > >>>> shown below, but I'd appreciated any advice on what I then need to do > > >>>> with it. > > > > > > ------------------------------------------------------------------------- > > 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: Geoffrey H. <ge...@ge...> - 2007-05-14 15:11:24
|
On May 14, 2007, at 10:30 AM, Noel O'Boyle wrote: > If any errors occur, please provide the first error messages rather > than the tail end, as the real problem is usually described at the > start. >> __ZN9OpenBabel8OBFormat14FormatFromMIMEEPKc >> __ZN9OpenBabel8OBFormat14RegisterFormatEPKcS2_ Indeed, these are missing symbols during linking. So if there are error messages earlier on, they'll certainly explain why these symbols are missing. You may also be linking the newer SWIG code to an older libopenbabel, which would also result in missing symbols. Cheers, -Geoff |
From: Noel O'B. <bao...@gm...> - 2007-05-14 14:30:14
|
First of all, I've already noticed that the latest SVN is not compatible with SWIG due to changes introducted at r1954. You'll need to check out r1953 instead of the very latest one. Next, please ensure you follow the steps outlined at http://openbabel.sourceforge.net/wiki/Install_%28source_code%29 remembering to use "./configure --enable-maintainer-mode" as you will need to run SWIG yourself (which you will need to install first) to create the Python bindings. If any errors occur, please provide the first error messages rather than the tail end, as the real problem is usually described at the start. Noel On 14/05/07, David Rose <tom...@gm...> wrote: > I am having trouble getting this to work. I used SVN to get the new > version, but am unable to build it successfully; running make yields > the following error messages: > > __ZN9OpenBabel8OBFormat14FormatFromMIMEEPKc > __ZN9OpenBabel8OBFormat14RegisterFormatEPKcS2_ > __ZN9OpenBabel8OBPlugin12ListAsVectorEPKcS2_RSt6vectorISsSaISsEE > __ZN9OpenBabel12OBDescriptor13AddPropertiesEPNS_6OBBaseERKSs > __ZN9OpenBabel12OBDescriptor13FilterCompareEPNS_6OBBaseERSib > __ZN9OpenBabel12OBDescriptor16DeletePropertiesEPNS_6OBBaseERKSs > __ZN9OpenBabel12OBDescriptor14GetStringValueEPNS_6OBBaseERSs > __ZN9OpenBabel12OBDescriptor7CompareEPNS_6OBBaseERSib > __ZN9OpenBabel8OBPlugin7DisplayERSsPKcS3_ > __ZTIN9OpenBabel12OBDescriptorE > __ZTVN9OpenBabel12OBDescriptorE > __ZTVN9OpenBabel8OBPluginE > __ZTIN9OpenBabel8OBPluginE > /usr/bin/libtool: internal link edit command failed > make[3]: *** [libopenbabel.la] Error 1 > make[2]: *** [all-recursive] Error 1 > make[1]: *** [all] Error 2 > make: *** [all-recursive] Error 1 > > > I also tried (perhaps naively) just moving the new openbabel-perl.i > file to my version 2.1.0 source tree and rebuilt that, but it doesn't > seem to have worked either (no errors, but no new functionality > either). > > Can anyone offer suggestion? > > thanks, > Dave. > > > On 5/8/07, Noel O'Boyle <bao...@gm...> wrote: > > Your confusion is due to the fact that the Perl wrapper does not yet > > include a vector of OBRing*, which is what is returned by GetSSSR(). > > As a result, you currently can't do anything with the result from > > GetSSSR(). > > > > I'm just about to check in the appropriate fix to the development > > code, which is available through subversion (SVN) as described on the > > openbabel install page: > > http://openbabel.sourceforge.net/wiki/Install > > > > Once you have compiled and installed the latest code, the following > > code will work (it's in Python, but I'm sure you can figure it out): > > > > import pybel > > obmol = pybel.readstring("smi", "c1ccccc1").OBMol # Benzene > > vector_of_sssr = obmol.GetSSSR() > > print vector_of_sssr.size() # 1 > > obring = vector_of_sssr[0] > > print dir(obring) > > # GetParent, IsAromatic, IsInRing, IsMember, etc... > > > > Noel > > > > On 07/05/07, David Rose <tom...@gm...> wrote: > > > Hello: > > > > > > I am confused about the use, in Perl, of OBMol::getSSSR and OBRing. > > > I am trying to find the size of the largest ring returned by getSSSR. > > > I instantiate an OBMol, and the method getSSSR returns something, but > > > I am unsure what it is or what to do with it. I assume I can pass it > > > to OBRing->new() to get an OBRing object, and it looks like OBRing has > > > a method called 'size' which is what I want, but I wonder if anyone > > > can offer a snippet of sample code. Thanks for all the help, past and > > > future. > > > > > > David Rose. > > > > > > ------------------------------------------------------------------------- > > > 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 > > > > > > |