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: 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-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-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 > > > > > > |
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: David R. <tom...@gm...> - 2007-05-14 17:42:53
Attachments:
make.out
configure.out
|
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 > |