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. <no...@ca...> - 2006-03-15 10:19:00
|
How is the API used for multiple molecule conversion? A typical use case for cheminformaticians is manipulating SD files. For example, I want (1) to read in an .SD file containing ~1 million molecules (let's pretend I work in big pharma) (2) to add a field containing the molecular weight (3) to write out a new .SD file with the new field Could you give me a few pointers on using .SD files in this way? It seems that OBConversion.ReadFile(OBMolecule) just reads in the first molecule, and I cannot see a way of iterating over the molecules. Regards, Noel |
From: Geoffrey H. <ge...@ge...> - 2006-02-24 16:21:09
|
On Feb 24, 2006, at 4:19 AM, Noel O'Boyle wrote: > I'd like to help with this if I can - I think this issue is going to > occur more than once. Is there some particularly good documentation > available somewhere on wrapping with SWIG, that can make this all very > clear to me? Well, SWIG has a pretty decent manual. I've been living pretty bleeding-edge for SWIG, since the C++ support is continually improving and I've found periodic bugs in the SWIG releases (e.g., 1.3.28 doesn't work, but the current CVS does). So I download the SWIG CVS: (See the SWIG directory) http://sourceforge.net/cvs/?group_id=1645 Documentation for SWIG is in SWIG/Doc/Manual/index.html C++ documentation is in SWIG/Doc/Manual/SWIGPlus.html There's also a pretty responsive mailing list: http://lists.sourceforge.net/lists/listinfo/swig-user I've found a few catches, which is why this is somewhat slow-going: * Sometimes I'll add in a new header to openbabel.i, and everything dies. More recently, I've been carefully adding in #ifndef SWIG / #endif lines in the header to tell SWIG to ignore certain parts of the code. This seems to help, since some C++ syntax apparently confuses SWIG or simply cannot be wrapped correctly. * It's not always clear to me what needs to be explicitly added to openbabel.i (e.g., this vector issue) and what SWIG figures out for itself. In retrospect, the SWIG documentation now makes perfect sense -- but I think the scripting language wrappers will be evolving for the foreseeable future. * The current modules are growing pretty large. It's probably going to be a good idea to start splitting openbabel.i into multiple pieces so that compiling openbabel_python.cpp and openbabel_perl.cpp don't take so long. The current file on my disk is ~1.3MB of C++ code. And of course, I'd be glad to give pointers/tips/feedback to anyone willing to help out with the wrappers. -Geoff |
From: Noel O'B. <no...@ca...> - 2006-02-24 09:19:26
|
I'd like to help with this if I can - I think this issue is going to occur more than once. Is there some particularly good documentation available somewhere on wrapping with SWIG, that can make this all very clear to me? Regards, Noel On Thu, 2006-02-23 at 13:18 -0500, Geoffrey Hutchison wrote: > On Feb 23, 2006, at 11:40 AM, Noel O'Boyle wrote: > > > What can I do with a molecule's SSSR or Internal Coordinates if > > it's in > > the following state? > > ... > > Are these not accessible from Python/Perl then? > > Guess not. That wasn't intentional. For SSSR, OBRing isn't wrapped, > so I'll add that to the SWIG file. I'm also going to add > OBSmartsPattern. > > I need to go back and revisit the SWIG documentation about internal > coordinates. Certainly the OBInternalCoord class is wrapped, but I > seem to remember there were issues about templates -- that you needed > to do some renaming to make sure they mapped to valid symbols in the > scripting language. > > e.g., std::vector<OBInternalCoord> -> vectorInternals > > Cheers, > -Geoff |
From: Geoffrey H. <ge...@ge...> - 2006-02-23 18:18:25
|
On Feb 23, 2006, at 11:40 AM, Noel O'Boyle wrote: > What can I do with a molecule's SSSR or Internal Coordinates if > it's in > the following state? > ... > Are these not accessible from Python/Perl then? Guess not. That wasn't intentional. For SSSR, OBRing isn't wrapped, so I'll add that to the SWIG file. I'm also going to add OBSmartsPattern. I need to go back and revisit the SWIG documentation about internal coordinates. Certainly the OBInternalCoord class is wrapped, but I seem to remember there were issues about templates -- that you needed to do some renaming to make sure they mapped to valid symbols in the scripting language. e.g., std::vector<OBInternalCoord> -> vectorInternals Cheers, -Geoff |
From: Noel O'B. <no...@ca...> - 2006-02-23 16:40:57
|
What can I do with a molecule's SSSR or Internal Coordinates if it's in the following state? >>> from pyopenbabel import * >>> text = open("3d.head.sdf","r").read() >>> mol = readstring("sd",text) >>> mol <pyopenbabel.Molecule object at 0x4020930c> >>> mol.sssr <Swig Object at _a4b82008_p_std__vectorTOpenBabel__OBRing_p_std__allocatorTOpenBabel__OBRing_p_t_t> >>> dir(mol.sssr) [] >>> mol.internalcoord <Swig Object at _28fc1f08_p_std__vectorTOpenBabel__OBInternalCoord_p_std__allocatorTOpenBabel__OBInternalCoord_p_t_t> Are these not accessible from Python/Perl then? Regards, Noel |
From: Noel O'B. <no...@ca...> - 2006-02-21 16:11:28
|
On Tue, 2006-02-21 at 10:38 -0500, Geoffrey Hutchison wrote: > On Feb 21, 2006, at 5:54 AM, Noel O'Boyle wrote: > > > I've just CVS updated my openbabel, but I'm just wondering about some > > changes to the API that I've found. > > > > Both OBMolecule and OBAtom no longer have a wrapped GetData() method. > > Oops. This was brought into the base class OBBase, so that other > classes can store data too (e.g., OBReaction, OBResidue...). > > On that subject, are there other headers/classes that I should be > adding to the wrapper? This I cannot say, as I do not have experience with the C++ classes. Personally, I am first concerned with allowing access to basic chemical information. Until people start using the scripting interfaces, we won't know what people will want to use it for. BTW, it might be nice to have a bit more non-API documentation on the Open Babel classes. Some kind of tutorial to show the sort of thing that can be achieved with the library. For instance, I don't know much about the capabilities of OpenBabel beyond file format translation. Now that there are scripting interfaces, these other uses of OpenBabel should be more heavily 'promoted'. > Thanks, > -Geoff > > P.S. Yes, I think it's good to have documentation (e.g., in the wiki) > on which classes are accessible from the scripting wrapper. I guess > eventually everything would be available, but some headers seem to > generate errors when first trying to wrap them. >>> dir(openbabel.OBAtom) ['AddBond', 'AverageBondAngle', 'BOSum', 'BeginBond', 'BeginBonds', 'BeginNbrAtom', 'Clear', 'ClearBond', 'ClearCoordPtr', 'CountBondsOfOrder', 'CountFreeOxygens', 'DecrementImplicitValence', 'DeleteBond', 'DeleteResidue', 'EndBonds', 'ExplicitHydrogenCount', 'GetAngle', 'GetAtomicMass', 'GetAtomicNum', 'GetBond', 'GetCIdx', 'GetCoordinate', 'GetCoordinateIdx', 'GetDistance', 'GetExactMass', 'GetFormalCharge', 'GetHeteroValence', 'GetHvyValence', 'GetHyb', 'GetIdx', 'GetImplicitValence', 'GetIsotope', 'GetNewBondVector', 'GetNextAtom', 'GetPartialCharge', 'GetResidue', 'GetSpinMultiplicity', 'GetType', 'GetValence', 'GetVector', 'GetX', 'GetY', 'GetZ', 'HasAlphaBetaUnsat', 'HasAromaticBond', 'HasBondOfOrder', 'HasChiralVolume', 'HasChiralitySpecified', 'HasDoubleBond', 'HasNonSingleBond', 'HasResidue', 'HasSingleBond', 'HtoMethyl', 'ImplicitHydrogenCount', 'IncrementImplicitValence', 'InsertBond', 'IsAmideNitrogen', 'IsAntiClockwise', 'IsAromatic', 'IsAromaticNOxide', 'IsAxial', 'IsCarbon', 'IsCarboxylOxygen', 'IsChiral', 'IsClockwise', 'IsConnected', 'IsHbondAcceptor', 'IsHbondDonor', 'IsHbondDonorH', 'IsHeteroatom', 'IsHydrogen', 'IsInRing', 'IsInRingSize', 'IsNegativeStereo', 'IsNitroOxygen', 'IsNitrogen', 'IsNonPolarHydrogen', 'IsNotCorH', 'IsOneFour', 'IsOneThree', 'IsOxygen', 'IsPhosphateOxygen', 'IsPhosphorus', 'IsPolarHydrogen', 'IsPositiveStereo', 'IsSulfateOxygen', 'IsSulfur', 'KBOSum', 'MatchesSMARTS', 'MemberOfRingCount', 'MemberOfRingSize', 'NewResidue', 'NextBond', 'NextNbrAtom', 'SetAntiClockwiseStereo', 'SetAromatic', 'SetAtomicNum', 'SetChiral', 'SetClockwiseStereo', 'SetCoordPtr', 'SetFormalCharge', 'SetHyb', 'SetHybAndGeom', 'SetIdx', 'SetImplicitValence', 'SetInRing', 'SetIsotope', 'SetNegativeStereo', 'SetPartialCharge', 'SetPositiveStereo', 'SetResidue', 'SetSpinMultiplicity', 'SetType', 'SetVector', 'SmallestBondAngle', 'UnsetAromatic', 'UnsetStereo', '__class__', '__del__', '__delattr__', '__dict__', '__doc__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__', 'x', 'y', 'z'] Is this useful documentation? > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting |
From: Geoffrey H. <ge...@ge...> - 2006-02-21 15:38:34
|
On Feb 21, 2006, at 5:54 AM, Noel O'Boyle wrote: > I've just CVS updated my openbabel, but I'm just wondering about some > changes to the API that I've found. > > Both OBMolecule and OBAtom no longer have a wrapped GetData() method. Oops. This was brought into the base class OBBase, so that other classes can store data too (e.g., OBReaction, OBResidue...). On that subject, are there other headers/classes that I should be adding to the wrapper? Thanks, -Geoff P.S. Yes, I think it's good to have documentation (e.g., in the wiki) on which classes are accessible from the scripting wrapper. I guess eventually everything would be available, but some headers seem to generate errors when first trying to wrap them. |
From: Noel O'B. <no...@ca...> - 2006-02-21 10:54:46
|
I've just CVS updated my openbabel, but I'm just wondering about some changes to the API that I've found. Both OBMolecule and OBAtom no longer have a wrapped GetData() method. I know that not all of the C++ library's Get methods have been wrapped, but it would be good to be kept up to date on this so that I know whether it is a bug or a feature. Maybe you know an easy way for me to find out for myself?? Or you could put a note in the doxymentation to indicate which are wrapped? Regards, Noel |
From: Bruce R. <br...@an...> - 2006-02-08 01:59:40
|
On Tuesday 07 February 2006 18:09, you wrote: > Find the line "@EXPORT =3D qw( );" near the top of OpenBabel.pm. > Add this to the next line: > > =A0 sub dl_load_flags { 0x01 } > > That should do it. An updated Perl wrapper will probably hit CPAN =A0 > soon, and will also be in 2.0.1. It does, indeed. Thanks! I look forward to playing around in earnest with OB. B =2D-=20 Bruce Ravel ---------------------------------------------- br...@an... Molecular Environmental Science Group, Building 203, Room E-165 MRCAT, Sector 10, Advanced Photon Source, Building 433, Room B007 Argonne National Laboratory phone and voice mail: (1) 630 252 5033 Argonne IL 60439, USA fax: (1) 630 252 9793 My homepage: http://cars9.uchicago.edu/~ravel=20 EXAFS software: http://cars9.uchicago.edu/~ravel/software/ |
From: Geoffrey H. <ge...@ge...> - 2006-02-08 00:09:27
|
Hi Bruce, > seems as though there was a solution for the problem characterized by > > /usr/local/lib/openbabel/<whatever>.so did not load properly > > but I am not clear what the solution is. Find the line "@EXPORT = qw( );" near the top of OpenBabel.pm. Add this to the next line: sub dl_load_flags { 0x01 } That should do it. An updated Perl wrapper will probably hit CPAN soon, and will also be in 2.0.1. > I guess I should say also that, if the perl interface works well > for me, this > will become an important part of the software for many of my > users. I'll be > happy to help test (and might even contribute to) the perl wrapper. Great! Glad to hear Open Babel and the perl wrapper help you out. Cheers, -Geoff |
From: Bruce R. <br...@an...> - 2006-02-07 23:22:09
|
Hi, I stumbled across OpenBabel the other day. It was really one of those things that came along at just the right moment. I am the author of a largish package written in perl use for the analysis of x-ray absorption spectroscopy data with a user base of many hundreds. One component of the package requires lists of atomic coordinates. I am interested in making it easy for people armed with, say, a PDB file to use the software. OpenBabel looks like the cat's pyjamas -- especially since there is a perl/SWIG wrapper. Cool! I just read through all the discussion on the scripting mailing list. It seems as though there was a solution for the problem characterized by /usr/local/lib/openbabel/<whatever>.so did not load properly but I am not clear what the solution is. I guess I should say also that, if the perl interface works well for me, this will become an important part of the software for many of my users. I'll be happy to help test (and might even contribute to) the perl wrapper. Thanks, B -- Bruce Ravel ---------------------------------------------- br...@an... Molecular Environmental Science Group, Building 203, Room E-165 MRCAT, Sector 10, Advanced Photon Source, Building 433, Room B007 Argonne National Laboratory phone and voice mail: (1) 630 252 5033 Argonne IL 60439, USA fax: (1) 630 252 9793 My homepage: http://cars9.uchicago.edu/~ravel EXAFS software: http://cars9.uchicago.edu/~ravel/software/ |
From: Noel O'B. <no...@ca...> - 2006-01-09 12:05:02
|
On Sat, 2006-01-07 at 22:26 -0500, Geoffrey Hutchison wrote: > On Jan 4, 2006, at 9:21 AM, Noel O'Boyle wrote: > > > I am trying to read a PDB file into an OBMol with Python but > > without any > > luck. > > Weird. I've been working on making up a test suite in Perl, and > ReadFile works fine there (well, at least on OS X). > > I'll check Python soon. Great - thanks. > Not at the moment. Unfortunately, SWIG doesn't seem to have a good > way to wrap something like Formatpos. Perhaps for the sake of > scripting wrappers, we could add to OBConversion to return a list of > format strings (e.g., as a vector of strings)? > > I'm assuming that would work for you Noel, yes? Yes - anything at all like that would be fine. BTW, where can I put the API documentation (one HTML file) for PyOpenBabel? I was thinking of creating a wiki page for PyOpenBabel (linked to from near of top of the current Python scripting page), and putting a link to the API documentation. > Cheers, > -Geoff |
From: Geoffrey H. <ge...@ge...> - 2006-01-08 03:26:36
|
On Jan 4, 2006, at 9:21 AM, Noel O'Boyle wrote: > I am trying to read a PDB file into an OBMol with Python but > without any > luck. Weird. I've been working on making up a test suite in Perl, and ReadFile works fine there (well, at least on OS X). I'll check Python soon. > I am also having difficulty finding out (from within Python) what file > formats are supported. ... > However, there is no openbabel.Formatpos. Is there any other way of > doing this? Not at the moment. Unfortunately, SWIG doesn't seem to have a good way to wrap something like Formatpos. Perhaps for the sake of scripting wrappers, we could add to OBConversion to return a list of format strings (e.g., as a vector of strings)? I'm assuming that would work for you Noel, yes? Cheers, -Geoff |
From: Noel O'B. <no...@ca...> - 2006-01-04 14:21:40
|
Happy New Year! I am trying to read a PDB file into an OBMol with Python but without any luck. ---------------------------- from openbabel import * mymol = OBMol() a = OBConversion() a.SetInFormat("pdb") # Also tried PDB a.ReadFile(mymol,"1crn.pdb") # PDB file taken from the test file repository # Segmentation Fault ---------------------------- I am also having difficulty finding out (from within Python) what file formats are supported. The following C++ code snippet is in the documentation for OBConversion: ----------------------------- bool GetNextFormat ( Formatpos & itr, const char *& str, OBFormat *& pFormat ) [static] Repeatedly called to recover available Formats. Returns the ID + the first line of the description in str and a pointer to the format in pFormat. If called with str==NULL the first format is returned; subsequent formats are returned by calling with str!=NULL and the previous value of itr returns false, and str and pFormat NULL, when there are no more formats. Use like: const char* str=NULL; Formatpos pos; while(OBConversion::GetNextFormat(pos,str,pFormat)) { use str and pFormat } ----------------------------- However, there is no openbabel.Formatpos. Is there any other way of doing this? Regards, Noel |
From: Noel O'B. <no...@ca...> - 2005-12-19 09:54:29
|
On Fri, 2005-12-16 at 09:28 -0800, S Joshua Swamidass wrote: > As a quick fix, just move them manually. It does work if I move them manually, that's how I know that this is the problem. It's possible to add a line to the Makefile, or Makefile.in or whatever, to add the lines to the start of openbabel.py (not very elegant though :-). > Next try and move them to the front of the openbabel.i file. I tried this, but the Perl wrapper dies as follows: ~/Tools/OpenBabel/openbabel/scripts$ make /usr/bin/swig -perl5 -c++ -o perl/openbabel_perl.cpp \ -I../src openbabel.i openbabel.i:5: Error: Syntax error in input. ../src/oberror.h:162: Warning(401): Nothing known about base class 'std::stringbuf'. Ignored. ../src/obconversion.h:175: Warning(401): Nothing known about base class 'std::binary_function<char const *,char const *,bool >'. Ignored. ../src/obconversion.h:175: Warning(401): Maybe you forgot to instantiate 'std::binary_function<char const *,char const *,bool >' using %template. *** No module name specified using %module or -module. make: *** [perl/openbabel_perl.cpp] Error 1 If I remove the call to the Perl wrapper, and just run the Python wrapper, the extra Python code still comes after the initial section of openbabel.py. So, no change. I think that I should get the latest SWIG, as Geoff recommends - I have 1.3.24, but he used 1.3.27, if that makes a difference. > That > should put it at the first part of the openbabel.py file. If none of > that works, send a line to the listserve and i"ll poke around some > swig faqs to find the answer. Good luck, Noel > > On 16/12/05, Noel O'Boyle <no...@ca...> wrote: > > I cannot get this patch to work, as the inserted lines always come after > > the initial "import _openbabel" in openbabel.py. Any thoughts? > > > > Regards, > > Noel > > > > On Fri, 2005-12-09 at 11:52 -0800, S Joshua Swamidass wrote: > > > It works! > > > > > > Add this code to the openbabel.i file to add the patch to the .py library file: > > > > > > %pythoncode %{ > > > import sys > > > import dl > > > sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL) > > > %} > > > > > > You may want to add a python snippet to execute this code only if the > > > architecture is Linux. > > > > > > Thanks for the help :) > > > > > > Josh > > > > > > On 09/12/05, Geoffrey Hutchison <ge...@ge...> wrote: > > > > > > > > On Dec 9, 2005, at 12:17 PM, Noel O'Boyle wrote: > > > > > > > > > (1) Is Python scripting for Openbabel available in Windows somehow? > > > > > > > > I don't have a Windows box to test. I'm also not sure how it would > > > > link against the Windows OpenBabel DLLs. > > > > > > > > > (2) Is it necessary to compile? > > > > > > > > Well, I believe you can get DLLs either from the Open Babel windows > > > > download or from Chris Morley. Certainly you *can* compile on Windows. > > > > > > > > > (3) What's the current status of Cygwin/OpenBabel compilation? > > > > > > > > So-so. I know the problem, but haven't had the time to fix it or test > > > > it. > > > > > > > > Cheers, > > > > -Geoff > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > > > > for problems? Stop! Download the new AJAX search engine that makes > > > > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > > > > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > > > > _______________________________________________ > > > > OpenBabel-scripting mailing list > > > > Ope...@li... > > > > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > > for problems? Stop! Download the new AJAX search engine that makes > > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > > _______________________________________________ > > OpenBabel-scripting mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > |
From: S J. S. <swa...@gm...> - 2005-12-16 17:29:00
|
As a quick fix, just move them manually. Next ry and move them to the front of the openbabel.i file. That should put it at the first part of the openbabel.py file. If none of that works, send a line to the listserve and i"ll poke around some swig faqs to find the answer. Josh On 16/12/05, Noel O'Boyle <no...@ca...> wrote: > I cannot get this patch to work, as the inserted lines always come after > the initial "import _openbabel" in openbabel.py. Any thoughts? > > Regards, > Noel > > On Fri, 2005-12-09 at 11:52 -0800, S Joshua Swamidass wrote: > > It works! > > > > Add this code to the openbabel.i file to add the patch to the .py libra= ry file: > > > > %pythoncode %{ > > import sys > > import dl > > sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL) > > %} > > > > You may want to add a python snippet to execute this code only if the > > architecture is Linux. > > > > Thanks for the help :) > > > > Josh > > > > On 09/12/05, Geoffrey Hutchison <ge...@ge...> wrote: > > > > > > On Dec 9, 2005, at 12:17 PM, Noel O'Boyle wrote: > > > > > > > (1) Is Python scripting for Openbabel available in Windows somehow? > > > > > > I don't have a Windows box to test. I'm also not sure how it would > > > link against the Windows OpenBabel DLLs. > > > > > > > (2) Is it necessary to compile? > > > > > > Well, I believe you can get DLLs either from the Open Babel windows > > > download or from Chris Morley. Certainly you *can* compile on Windows= . > > > > > > > (3) What's the current status of Cygwin/OpenBabel compilation? > > > > > > So-so. I know the problem, but haven't had the time to fix it or test > > > it. > > > > > > Cheers, > > > -Geoff > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through lo= g files > > > for problems? Stop! Download the new AJAX search engine that makes > > > searching your log files as easy as surfing the web. DOWNLOAD SPLUN= K! > > > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > > > _______________________________________________ > > > OpenBabel-scripting mailing list > > > Ope...@li... > > > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Noel O'B. <no...@ca...> - 2005-12-16 10:28:23
|
I cannot get this patch to work, as the inserted lines always come after the initial "import _openbabel" in openbabel.py. Any thoughts? Regards, Noel On Fri, 2005-12-09 at 11:52 -0800, S Joshua Swamidass wrote: > It works! > > Add this code to the openbabel.i file to add the patch to the .py library file: > > %pythoncode %{ > import sys > import dl > sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL) > %} > > You may want to add a python snippet to execute this code only if the > architecture is Linux. > > Thanks for the help :) > > Josh > > On 09/12/05, Geoffrey Hutchison <ge...@ge...> wrote: > > > > On Dec 9, 2005, at 12:17 PM, Noel O'Boyle wrote: > > > > > (1) Is Python scripting for Openbabel available in Windows somehow? > > > > I don't have a Windows box to test. I'm also not sure how it would > > link against the Windows OpenBabel DLLs. > > > > > (2) Is it necessary to compile? > > > > Well, I believe you can get DLLs either from the Open Babel windows > > download or from Chris Morley. Certainly you *can* compile on Windows. > > > > > (3) What's the current status of Cygwin/OpenBabel compilation? > > > > So-so. I know the problem, but haven't had the time to fix it or test > > it. > > > > Cheers, > > -Geoff > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > > for problems? Stop! Download the new AJAX search engine that makes > > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > > _______________________________________________ > > OpenBabel-scripting mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > |
From: Geoffrey H. <ge...@ge...> - 2005-12-15 15:05:25
|
On Dec 15, 2005, at 7:11 AM, Noel O'Boyle wrote: > How do you regenerate the SWIG interface though? Typing 'make' in > scripts doesn't seem to work. Use the --enable-maintainer-mode flag with configure. Several people complained with the snapshot series that the SWIG wrappers were stopping them from running "make" normally. Please be sure you have the latest version of SWIG and you'll be all set. Cheers, -Geoff |
From: Noel O'B. <no...@ca...> - 2005-12-15 12:59:11
|
On Fri, 2005-12-09 at 14:14 -0500, Geoffrey Hutchison wrote: > On Dec 9, 2005, at 12:17 PM, Noel O'Boyle wrote: > > > (1) Is Python scripting for Openbabel available in Windows somehow? > > I don't have a Windows box to test. I'm also not sure how it would > link against the Windows OpenBabel DLLs. Could I put this on someone's things to do list (i.e. to get the SWIG interface to OpenBabel working for Python)? I use Windows at home, so if I want to develop the Python interface to a decent level, I probably need to have python scripting set up for Windows. Apparently, I can get access to the MSVC++ compiler here, but not knowing anything about C++ I am not sure whether I will be able to get it all to work. > > (2) Is it necessary to compile? > > Well, I believe you can get DLLs either from the Open Babel windows > download or from Chris Morley. Certainly you *can* compile on Windows. > > > (3) What's the current status of Cygwin/OpenBabel compilation? > > So-so. I know the problem, but haven't had the time to fix it or test > it. > > Cheers, > -Geoff |
From: Noel O'B. <no...@ca...> - 2005-12-15 12:11:45
|
How do you regenerate the SWIG interface though? Typing 'make' in scripts doesn't seem to work. On Fri, 2005-12-09 at 11:52 -0800, S Joshua Swamidass wrote: > It works! > > Add this code to the openbabel.i file to add the patch to the .py library file: > > %pythoncode %{ > import sys > import dl > sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL) > %} > > You may want to add a python snippet to execute this code only if the > architecture is Linux. > > Thanks for the help :) > > Josh > > On 09/12/05, Geoffrey Hutchison <ge...@ge...> wrote: > > > > On Dec 9, 2005, at 12:17 PM, Noel O'Boyle wrote: > > > > > (1) Is Python scripting for Openbabel available in Windows somehow? > > > > I don't have a Windows box to test. I'm also not sure how it would > > link against the Windows OpenBabel DLLs. > > > > > (2) Is it necessary to compile? > > > > Well, I believe you can get DLLs either from the Open Babel windows > > download or from Chris Morley. Certainly you *can* compile on Windows. > > > > > (3) What's the current status of Cygwin/OpenBabel compilation? > > > > So-so. I know the problem, but haven't had the time to fix it or test > > it. > > > > Cheers, > > -Geoff > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > > for problems? Stop! Download the new AJAX search engine that makes > > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > > _______________________________________________ > > OpenBabel-scripting mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > |
From: Geoffrey H. <ge...@ge...> - 2005-12-13 00:24:12
|
>> BTW, do you think you could add a test to setup.py? I've included >> some of my initial code below, but it's not bullet-proof yet. >> Basically, I'd want setup.py to check "pkg-config --variable=prefix >> openbabel-2.0" (best case) then /usr/local, then /usr, and >> finally ../../src for libraries and include files. This should cover >> the two obvious cases of an independent pyopenbabel.tar.gz and >> something in the source/build directory. > > What do other packages do? I am not used to writing C extensions using > distutils. Surely distutils checks 'the usual locations' for the > library. One problem with providing several different mechanisms is > that > you multiply the numbers of bugs and make them more difficult to track > down. Personally, I would just find out the best way of doing this, > and > force everybody to do it. How about the usual locations followed by > the > location pointed to by the environment variable OpenBabelLib or > something? I haven't written many C/C++ extensions using distutils either -- it does not seem to be as easy to do as Perl, which has many C/C++ modules. Distutils doesn't seem to be able to find "the usual locations" for libraries. Plus the python module probably has two distribution channels right now: as part of openbabel-2.x and hopefully as a separate download. I imagine that the scripting wrappers will need releases more frequently than the main library. > I don't like writing code like shown below as it's really > unportable. It > should run on windows as easily (!) as on Linux/MacOSX. This is a bit > hacky. > > import os > if os.path.isfile(os.path.join("usr","local","lib","libopenbabel.a"): > X > else: > y OK, but Windows isn't going to have libraries in \usr\local\lib. I don't know about Cygwin. Basically, I don't care much about syntax -- it seems like we want a bunch of checks: - Run pkg-config (if it exists) - Check /usr/local and /usr for libopenbabel.a - Check ../../src/ if we might be in the build for libopenbabel. I guess the main problem is that none of us know much about writing a setup.py script with Distutils for libraries. I've done Google searches but haven't turned up much. Any pointers? Thanks, -Geoff |
From: Geoffrey H. <ge...@ge...> - 2005-12-13 00:12:03
|
It's been a few weeks since we released Open Babel 2.0. I usually think it's a good idea to take a look back after a release and decide what went well, what didn't, etc. I've received some feedback already, but I hope we'll see more on the list. * Timing: Several people thought the "freeze" wasn't announced far enough in advance, and there were some last-minute bug reports. Fair enough. So for future releases, we should have a slightly longer lead- time and a clearer release plan. * Betas / Snapshots: To be honest, while we did get some feedback from the snapshots, we got a *lot* more from an actual "release." Were these snapshots helpful? How about the timing? Was one snapshot a month good, bad, about right? * Scripting: The scripting wrappers had a nasty bug on Linux (that's now fixed). Did anyone try out the scripting wrappers in the snapshots? What could we have done to get more testing? Are the resulting Perl and Python modules useful? Should they have other functionality? * Test Suite: I'll admit that I don't test enough on Linux boxes -- Chris Morley was using Windows and I was using Mac OS X, assuming (stupidly) that Linux would be close enough. Are there willing testers on Linux who could provide feedback for snapshots in the future? Any other complaints, critiques, etc. would be quite welcome. Cheers, -Geoff |
From: S J. S. <swa...@gm...> - 2005-12-09 19:53:04
|
It works! Add this code to the openbabel.i file to add the patch to the .py library f= ile: %pythoncode %{ import sys import dl sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL) %} You may want to add a python snippet to execute this code only if the architecture is Linux. Thanks for the help :) Josh On 09/12/05, Geoffrey Hutchison <ge...@ge...> wrote: > > On Dec 9, 2005, at 12:17 PM, Noel O'Boyle wrote: > > > (1) Is Python scripting for Openbabel available in Windows somehow? > > I don't have a Windows box to test. I'm also not sure how it would > link against the Windows OpenBabel DLLs. > > > (2) Is it necessary to compile? > > Well, I believe you can get DLLs either from the Open Babel windows > download or from Chris Morley. Certainly you *can* compile on Windows. > > > (3) What's the current status of Cygwin/OpenBabel compilation? > > So-so. I know the problem, but haven't had the time to fix it or test > it. > > Cheers, > -Geoff > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Geoffrey H. <ge...@ge...> - 2005-12-09 19:14:14
|
On Dec 9, 2005, at 12:17 PM, Noel O'Boyle wrote: > (1) Is Python scripting for Openbabel available in Windows somehow? I don't have a Windows box to test. I'm also not sure how it would link against the Windows OpenBabel DLLs. > (2) Is it necessary to compile? Well, I believe you can get DLLs either from the Open Babel windows download or from Chris Morley. Certainly you *can* compile on Windows. > (3) What's the current status of Cygwin/OpenBabel compilation? So-so. I know the problem, but haven't had the time to fix it or test it. Cheers, -Geoff |
From: Noel O'B. <no...@ca...> - 2005-12-09 17:17:35
|
(1) Is Python scripting for Openbabel available in Windows somehow? (2) Is it necessary to compile? (3) What's the current status of Cygwin/OpenBabel compilation? Regards, Noel |