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: Noel O'B. <bao...@gm...> - 2007-05-14 14:25:41
|
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-14 14:19:54
|
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 13:35:24
|
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 > > > |
From: Noel O'B. <bao...@gm...> - 2007-05-13 10:25:35
|
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: Chris M. <c.m...@ds...> - 2007-05-12 18:04:29
|
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]'. 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. 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. 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. |
From: Jerome P. <j.p...@pa...> - 2007-05-12 17:49:38
|
Hi, Le samedi 12 mai 2007 13:15, Noel O'Boyle a =E9crit=A0: > 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'] I think this solution is better, as you get also a short description about = the=20 format. > Note that the text [Read-only] is not really necessary in a list of > supported input formats. Of course ! > 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 I can send you a new patch for the function if you want, based on the last = svn=20 version. Jerome > 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=3D2007021911= 05.2 > > >5888.j.pansanel%40pansanel.net&forum_name=3Dopenbabel-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. > > > > > > Many thanks, > > > > > > Jens > > > > > > > > > wlandhcp243:~ jmht$ python > > > Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) > > > [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin > > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > >>> import openbabel > > > >>> obc =3D openbabel.OBConversion() > > > >>> f =3D obc.GetSupportedInputFormat() > > > >>> print f > > > > > > <Swig Object of type > > > 'std::vector<std::string,std::allocator<std::string > > > > > > > > *' at 0x61c2c0> > > > > I'm in an internet cafe at the moment, and so don't have access to a > > complete compiler tool chain. However, it is possible that 'f' behaves > > like an array. That is, a std::vector in C++ is pretty much the same > > as a list in Python. Try "dir(f)". There's probably a Size() method. > > Try f[0], f[1], etc. If it doesn't work I'll sort it out next week, > > and wrap it nicely in pybel, so that users won't see all this Swig > > Object stuff. > > > > Let me know how this goes, > > Noel (O'Boyle) > > > > > ---------------------------------------------------------------------= =2D- > > >-- 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-12 11:48:35
|
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. > > > > > > Many thanks, > > > > > > Jens > > > > > > > > > wlandhcp243:~ jmht$ python > > > Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) > > > [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>> import openbabel > > > >>> obc = openbabel.OBConversion() > > > >>> f = obc.GetSupportedInputFormat() > > > >>> print f > > > <Swig Object of type 'std::vector<std::string,std::allocator<std::string > > > > > *' at 0x61c2c0> > > > > I'm in an internet cafe at the moment, and so don't have access to a > > complete compiler tool chain. However, it is possible that 'f' behaves > > like an array. That is, a std::vector in C++ is pretty much the same > > as a list in Python. Try "dir(f)". There's probably a Size() method. > > Try f[0], f[1], etc. If it doesn't work I'll sort it out next week, > > and wrap it nicely in pybel, so that users won't see all this Swig > > Object stuff. > > > > Let me know how this goes, > > Noel (O'Boyle) > > > > > > > > ------------------------------------------------------------------------- > > > 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-12 11:15:57
|
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. > > > > Many thanks, > > > > Jens > > > > > > wlandhcp243:~ jmht$ python > > Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) > > [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin > > Type "help", "copyright", "credits" or "license" for more information. > > >>> import openbabel > > >>> obc = openbabel.OBConversion() > > >>> f = obc.GetSupportedInputFormat() > > >>> print f > > <Swig Object of type 'std::vector<std::string,std::allocator<std::string > > > > *' at 0x61c2c0> > > I'm in an internet cafe at the moment, and so don't have access to a > complete compiler tool chain. However, it is possible that 'f' behaves > like an array. That is, a std::vector in C++ is pretty much the same > as a list in Python. Try "dir(f)". There's probably a Size() method. > Try f[0], f[1], etc. If it doesn't work I'll sort it out next week, > and wrap it nicely in pybel, so that users won't see all this Swig > Object stuff. > > Let me know how this goes, > Noel (O'Boyle) > > > > > ------------------------------------------------------------------------- > > 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-11 15:58:41
|
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. > > Many thanks, > > Jens > > > wlandhcp243:~ jmht$ python > Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) > [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import openbabel > >>> obc = openbabel.OBConversion() > >>> f = obc.GetSupportedInputFormat() > >>> print f > <Swig Object of type 'std::vector<std::string,std::allocator<std::string > > > *' at 0x61c2c0> I'm in an internet cafe at the moment, and so don't have access to a complete compiler tool chain. However, it is possible that 'f' behaves like an array. That is, a std::vector in C++ is pretty much the same as a list in Python. Try "dir(f)". There's probably a Size() method. Try f[0], f[1], etc. If it doesn't work I'll sort it out next week, and wrap it nicely in pybel, so that users won't see all this Swig Object stuff. Let me know how this goes, Noel (O'Boyle) > > ------------------------------------------------------------------------- > 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-10 15:49:08
|
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. Many thanks, Jens wlandhcp243:~ jmht$ python Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import openbabel >>> obc = openbabel.OBConversion() >>> f = obc.GetSupportedInputFormat() >>> print f <Swig Object of type 'std::vector<std::string,std::allocator<std::string > > *' at 0x61c2c0> |
From: Noel O'B. <bao...@gm...> - 2007-05-09 11:43:38
|
This has now been resolved in the development version. The Python code you describe below works, and 'uc' has the GetA() method, etc. I am working on adding this to pybel also, where it will be available as "cete3.unitcell" if present. Noel On 12/04/07, Geoffrey Hutchison <ge...@ge...> wrote: > > On Apr 12, 2007, at 1:00 PM, Pavol Juhas wrote: > > > cete3 = pybel.readfile("cif", "cete3_p1.cif").next() > > uc = cete3.OBMol.GetData(openbabel.UnitCell) > > > > This executes fine, but uc is an instance of openbabel.OBGenericData > > class and it does not have GetA() or any other method of the > > OBUnitCell() class. > > Ugh. In C++ such type conversion is done with casting. I think the > only solution will be to add conversion functions -- perhaps in the > SWIG interface file, which allows such conversion. Unfortunately, > Noel, who contributed Pybel is on vacation right now, or he might > have some other ideas. > > Could you file this as a bug report in the tracker? > > Thanks, > -Geoff > > P.S. On the plus side, I think we should be able to release a fixed > Python interface without needing to wait for a 2.1.1 update to Open > Babel itself. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Noel O'B. <bao...@gm...> - 2007-05-08 12:59:18
|
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 > |
From: David R. <tom...@gm...> - 2007-05-07 18:37:08
|
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. |
From: Geoffrey H. <ge...@ge...> - 2007-05-04 19:59:02
|
On May 4, 2007, at 3:25 PM, David Rose wrote: > I was wondering whether you could make available a current SWIG > input file for Open Babel. They're all in the Open Babel source: scripts/openbabel-perl.i In fact, there's information on building the Perl and Python bindings with SWIG (and ./configure --enable-maintainer-mode) here: http://openbabel.sourceforge.net/wiki/Developer:Building I'll e-mail you separately with the updates. Cheers, -Geoff |
From: David R. <tom...@gm...> - 2007-05-04 19:25:29
|
Thanks Geoff, that would be great! I would like to try it myself with SWIG but I looked into it a bit and with my extremely limited knowledge of C++ it looks a bit daunting. I was wondering whether you could make available a current SWIG input file for Open Babel. That might (might) make it easier for me to add methods going forward without bugging you about it. Thanks again, Dave. On 5/4/07, Geoffrey Hutchison <ge...@ge...> wrote: > > On May 4, 2007, at 2:51 PM, David Rose wrote: > > > So, are their parts of the API (including OBLogP) that are not > > supported by Chemistry::OpenBabel? Or is something else going on? > > That's correct. Not everything in the API is supported by the > scripting interfaces yet. Fortunately, it's now easy enough for us to > provide updated interfaces independent of the library. > > So if you'd like an interface for the descriptors like OBLogP, we can > do that. If you'd like to get it yourself, it can be done with the > SWIG program as well. > > I'll send you an updated version of Chemistry::OpenBabel this weekend > with OBLogP. Call it version 1.2.1. > > Cheers, > -Geoff > |
From: Geoffrey H. <ge...@ge...> - 2007-05-04 19:13:33
|
On May 4, 2007, at 2:51 PM, David Rose wrote: > So, are their parts of the API (including OBLogP) that are not > supported by Chemistry::OpenBabel? Or is something else going on? That's correct. Not everything in the API is supported by the scripting interfaces yet. Fortunately, it's now easy enough for us to provide updated interfaces independent of the library. So if you'd like an interface for the descriptors like OBLogP, we can do that. If you'd like to get it yourself, it can be done with the SWIG program as well. I'll send you an updated version of Chemistry::OpenBabel this weekend with OBLogP. Call it version 1.2.1. Cheers, -Geoff |
From: David R. <tom...@gm...> - 2007-05-04 18:51:05
|
Hello: I am new to Open Babel, and as with many new things I think it is taking me a while to figure out how it is organized. For example, I would like to use the Perl bindings to get the logP of a molecule. I've look at the API documentation, and I find a class called OBLogP, but when I try: my $logP = Chemistry::OpenBabel::OBLogP->new(); I get an error (package not found), which is not surprising because when I look in OpenBabel.pm, I see no reference to this class (or to logp at all). So, are their parts of the API (including OBLogP) that are not supported by Chemistry::OpenBabel? Or is something else going on? I could get around this by writing a perl wrapper to OBProp, but am wondering if there is a nicer way. thanks, Dave |
From: Noel O'B. <bao...@gm...> - 2007-05-03 16:13:04
|
To answer my question, the following code will iterate over all of the data: for data in mol.BeginData(): pdata = openbabel.GDtoPD(data) print pdata.GetAttribute(), "==", pdata.GetValue() On 02/05/07, Noel O'Boyle <bao...@gm...> wrote: > If you add: > %inline %{ > OpenBabel::OBPairData *GDtoPD(OpenBabel::OBGenericData *data) { > return (OpenBabel::OBPairData *) data; > } > %} > > to openbabel-python.i, you can use it to cast OBGenericData to OBPairData. > > But how do you find out what data is available? > > Noel > > On 23/04/07, Noel O'Boyle <bao...@gm...> wrote: > > On 12/04/07, Geoffrey Hutchison <ge...@ge...> wrote: > > > > > > On Apr 12, 2007, at 1:00 PM, Pavol Juhas wrote: > > > > > > > cete3 = pybel.readfile("cif", "cete3_p1.cif").next() > > > > uc = cete3.OBMol.GetData(openbabel.UnitCell) > > > > > > > > This executes fine, but uc is an instance of openbabel.OBGenericData > > > > class and it does not have GetA() or any other method of the > > > > OBUnitCell() class. > > > > > > Ugh. In C++ such type conversion is done with casting. I think the > > > only solution will be to add conversion functions -- perhaps in the > > > SWIG interface file, which allows such conversion. Unfortunately, > > > Noel, who contributed Pybel is on vacation right now, or he might > > > have some other ideas. > > > > I also really want to be able to access the Data in molecule file > > formats. I will discuss some ideas with Geoff. In the meanwhile, you > > should check out PyCiFRW, a Python module for reading/writing CIF > > files: > > (1) http://anbf2.kek.jp/CIF/ > > (2) http://scripts.iucr.org/cgi-bin/paper?wf5020 (Open Access paper) > > > > > Could you file this as a bug report in the tracker? > > > > > > Thanks, > > > -Geoff > > > > > > P.S. On the plus side, I think we should be able to release a fixed > > > Python interface without needing to wait for a 2.1.1 update to Open > > > Babel itself. > > > > > > ------------------------------------------------------------------------- > > > Take Surveys. Earn Cash. Influence the Future of IT > > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > > opinions on IT & business topics through brief surveys-and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > _______________________________________________ > > > OpenBabel-scripting mailing list > > > Ope...@li... > > > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > > > > > |
From: Noel O'B. <bao...@gm...> - 2007-05-02 14:06:41
|
If you add: %inline %{ OpenBabel::OBPairData *GDtoPD(OpenBabel::OBGenericData *data) { return (OpenBabel::OBPairData *) data; } %} to openbabel-python.i, you can use it to cast OBGenericData to OBPairData. But how do you find out what data is available? Noel On 23/04/07, Noel O'Boyle <bao...@gm...> wrote: > On 12/04/07, Geoffrey Hutchison <ge...@ge...> wrote: > > > > On Apr 12, 2007, at 1:00 PM, Pavol Juhas wrote: > > > > > cete3 = pybel.readfile("cif", "cete3_p1.cif").next() > > > uc = cete3.OBMol.GetData(openbabel.UnitCell) > > > > > > This executes fine, but uc is an instance of openbabel.OBGenericData > > > class and it does not have GetA() or any other method of the > > > OBUnitCell() class. > > > > Ugh. In C++ such type conversion is done with casting. I think the > > only solution will be to add conversion functions -- perhaps in the > > SWIG interface file, which allows such conversion. Unfortunately, > > Noel, who contributed Pybel is on vacation right now, or he might > > have some other ideas. > > I also really want to be able to access the Data in molecule file > formats. I will discuss some ideas with Geoff. In the meanwhile, you > should check out PyCiFRW, a Python module for reading/writing CIF > files: > (1) http://anbf2.kek.jp/CIF/ > (2) http://scripts.iucr.org/cgi-bin/paper?wf5020 (Open Access paper) > > > Could you file this as a bug report in the tracker? > > > > Thanks, > > -Geoff > > > > P.S. On the plus side, I think we should be able to release a fixed > > Python interface without needing to wait for a 2.1.1 update to Open > > Babel itself. > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > opinions on IT & business topics through brief surveys-and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > OpenBabel-scripting mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > > |
From: Geoffrey H. <ge...@ge...> - 2007-04-24 15:11:56
|
Noel, > Has this changed the idiom for iterating through multimolecule files? > That is, is the example code at the top of > http://openbabel.sourceforge.net/wiki/Developer:Python_Tutorial still > the correct method? In short, by using this method, am I allocating > memory that is never freed? Yes, in version 2.1, you don't need to call OBMol::Clear(), so you can change the idiom. On the other hand, in Python, I think the newly- created molecule would be freed like any other python object. You can certainly confirm by running over a few thousand objects while watching memory. In any case, that's not the issue in this particular bug. We seem to be leaving files open. I know it's a problem for gzipped files, but I'll have to investigate for regular files. Thanks, -Geoff |
From: Noel O'B. <bao...@gm...> - 2007-04-23 14:53:58
|
Geoff, There was some discussion at the end of last year about changing the way that OBConversion worked. It was discussed in the thread entitled "[OpenBabel-Devel] OBBase::Clear() and relatives" starting on 18/12/06. Has this changed the idiom for iterating through multimolecule files? That is, is the example code at the top of http://openbabel.sourceforge.net/wiki/Developer:Python_Tutorial still the correct method? In short, by using this method, am I allocating memory that is never freed? Regards, Noel On 12/04/07, Geoffrey Hutchison <ge...@ge...> wrote: > > On Apr 11, 2007, at 6:44 PM, Ahmet Bakan wrote: > > > Thanks for the suggestion. I have tried gunzipping the files prior > > to reading with OBConversion, but at the 1022nd file I get the same > > error. > > I will post a bug report about this. > > There's one other possible workaround. Obviously anything coded in C+ > + would open/free the files correctly. So if you'd like to e-mail me > personally, I can probably whip up a C++ version which does what you > want. This code could then be wrapped via SWIG into Python if you > want/need the end result there. > > Thanks, > -Geoff > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Noel O'B. <bao...@gm...> - 2007-04-23 07:47:55
|
On 12/04/07, Geoffrey Hutchison <ge...@ge...> wrote: > > On Apr 12, 2007, at 1:00 PM, Pavol Juhas wrote: > > > cete3 = pybel.readfile("cif", "cete3_p1.cif").next() > > uc = cete3.OBMol.GetData(openbabel.UnitCell) > > > > This executes fine, but uc is an instance of openbabel.OBGenericData > > class and it does not have GetA() or any other method of the > > OBUnitCell() class. > > Ugh. In C++ such type conversion is done with casting. I think the > only solution will be to add conversion functions -- perhaps in the > SWIG interface file, which allows such conversion. Unfortunately, > Noel, who contributed Pybel is on vacation right now, or he might > have some other ideas. I also really want to be able to access the Data in molecule file formats. I will discuss some ideas with Geoff. In the meanwhile, you should check out PyCiFRW, a Python module for reading/writing CIF files: (1) http://anbf2.kek.jp/CIF/ (2) http://scripts.iucr.org/cgi-bin/paper?wf5020 (Open Access paper) > Could you file this as a bug report in the tracker? > > Thanks, > -Geoff > > P.S. On the plus side, I think we should be able to release a fixed > Python interface without needing to wait for a 2.1.1 update to Open > Babel itself. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Geoffrey H. <ge...@ge...> - 2007-04-12 22:05:49
|
On Apr 11, 2007, at 6:44 PM, Ahmet Bakan wrote: > Thanks for the suggestion. I have tried gunzipping the files prior > to reading with OBConversion, but at the 1022nd file I get the same > error. > I will post a bug report about this. There's one other possible workaround. Obviously anything coded in C+ + would open/free the files correctly. So if you'd like to e-mail me personally, I can probably whip up a C++ version which does what you want. This code could then be wrapped via SWIG into Python if you want/need the end result there. Thanks, -Geoff |
From: Geoffrey H. <ge...@ge...> - 2007-04-12 22:03:56
|
On Apr 12, 2007, at 1:00 PM, Pavol Juhas wrote: > cete3 = pybel.readfile("cif", "cete3_p1.cif").next() > uc = cete3.OBMol.GetData(openbabel.UnitCell) > > This executes fine, but uc is an instance of openbabel.OBGenericData > class and it does not have GetA() or any other method of the > OBUnitCell() class. Ugh. In C++ such type conversion is done with casting. I think the only solution will be to add conversion functions -- perhaps in the SWIG interface file, which allows such conversion. Unfortunately, Noel, who contributed Pybel is on vacation right now, or he might have some other ideas. Could you file this as a bug report in the tracker? Thanks, -Geoff P.S. On the plus side, I think we should be able to release a fixed Python interface without needing to wait for a 2.1.1 update to Open Babel itself. |
From: Pavol J. <ju...@pa...> - 2007-04-12 17:00:23
|
Hello, I would like to read a structure from cif file and extract the lattice parameters using the python interface for openbabel. I went through the openbabel wiki, also through openbabel API, but I am still at loss how to perform this task. Here is my python code: import pybel, openbabel cete3 = pybel.readfile("cif", "cete3_p1.cif").next() uc = cete3.OBMol.GetData(openbabel.UnitCell) This executes fine, but uc is an instance of openbabel.OBGenericData class and it does not have GetA() or any other method of the OBUnitCell() class. I tried to convert it to OBUnitCell instance with uc1 = openbabel.OBUnitCell(uc) but that does not work either. Could anyone advice my how to get to those unit cell parameters with python openbabel? Thanks a lot, Pavol |