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: Ahmet B. <ah...@pi...> - 2007-04-11 22:44:32
|
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. Thanks again. Ahmet On 4/11/07, Geoffrey Hutchison <ge...@ge...> wrote: > > > On Apr 10, 2007, at 9:52 PM, Ahmet Bakan wrote: > > > I am using pybel to process several thousand MOL2.gz files and > > having a problem. When I read the 1022nd file my script does not > > read any more files and terminates due to the following error: > > You hit upon a particularly unpleasant case. Let me back up for a > second, explain why this is happening and then I'll offer a possible > workaround. > > The underlying OBConversion class was designed so that code using it > will create and free C++ streams. ReadFile and ReadString were added > to provide scripting access, but it's still somewhat tricky -- > particularly because the gzip decoding code "steals" the stream. So > when you're using ReadFile() and a gzip'ed file, we currently cannot > close that stream or free it after we finish. > > That's an architectural problem. I'd appreciate it if you'd post a > bug report to the tracker with a subject along the lines of "gzip > decoding with Python keeps files open" or something. That way we have > more motivation to replace the current gzip code with something cleaner. > > Now, there's another known bug you should be aware of with Mol2 and > gzip. In your case, you only seem to be reading one molecule per > file, so it might not matter: > http://sourceforge.net/tracker/index.php? > func=detail&aid=1676937&group_id=40728&atid=428740 > > So my suggestion is to try a workaround. In your loop, before you > read the file, temporarily gunzip it, read it, then gzip it again. > The library should now be able to release the file (closing it) when > you go to read the next file. > > Hope that helps! > -Geoff > -- Ahmet Bakan Predoctoral Fellow Department of Computational Biology University of Pittsburgh School of Medicine 3501 Fifth Avenue Suite 3064 BST3 Pittsburgh, PA 15213-3301 |
From: Geoffrey H. <ge...@ge...> - 2007-04-11 13:57:59
|
On Apr 10, 2007, at 9:52 PM, Ahmet Bakan wrote: > I am using pybel to process several thousand MOL2.gz files and > having a problem. When I read the 1022nd file my script does not > read any more files and terminates due to the following error: You hit upon a particularly unpleasant case. Let me back up for a second, explain why this is happening and then I'll offer a possible workaround. The underlying OBConversion class was designed so that code using it will create and free C++ streams. ReadFile and ReadString were added to provide scripting access, but it's still somewhat tricky -- particularly because the gzip decoding code "steals" the stream. So when you're using ReadFile() and a gzip'ed file, we currently cannot close that stream or free it after we finish. That's an architectural problem. I'd appreciate it if you'd post a bug report to the tracker with a subject along the lines of "gzip decoding with Python keeps files open" or something. That way we have more motivation to replace the current gzip code with something cleaner. Now, there's another known bug you should be aware of with Mol2 and gzip. In your case, you only seem to be reading one molecule per file, so it might not matter: http://sourceforge.net/tracker/index.php? func=detail&aid=1676937&group_id=40728&atid=428740 So my suggestion is to try a workaround. In your loop, before you read the file, temporarily gunzip it, read it, then gzip it again. The library should now be able to release the file (closing it) when you go to read the next file. Hope that helps! -Geoff |
From: Ahmet B. <ah...@pi...> - 2007-04-11 01:52:08
|
Dear All, I am using pybel to process several thousand MOL2.gz files and having a problem. When I read the 1022nd file my script does not read any more files and terminates due to the following error: IOError: [Errno 24] Too many open files: '/scratch/abakan/KBrummond/KB-VIRLIB/5499.2_ab2.mol2.gz' I use a script similar to the below code to read several thousands of files among maybe a 100K. === from glob import glob import pybel s = [] for f in glob('KB-VIRLIB/ab*.gz'): p = pybel.readfile('mol2',f) m = p.next() s.append( m.write() ) === To my understanding, the files opened by openbabel are not closed. I searched pybel.py and openbabel.py files to find a way to close the file opened by openbabel, but could not find one. I appreciate if anyone provide help. Thanks in advance. Ahmet |
From: Geoffrey H. <ge...@ge...> - 2007-04-07 19:35:19
|
I am extremely proud to announce the release of Open Babel 2.1.0, the =20= latest stable version of the open source chemistry toolbox. This release represents a major update and should be a stable =20 upgrade, strongly recommended for all users of Open Babel. Highlights =20= include a new framework for molecular mechanics force fields, a =20 framework for canonical, unique atom numbering (i.e., an open source =20 canonical SMILES implementation), new scripting interfaces in Ruby =20 and Java, enhancements to the developer API, several highly-requested =20= file formats, and many, many bug fixes and improvements. What's new? See the full release notes at: http://openbabel.sourceforge.net/wiki/Open_Babel_2.1.0 To download, see: http://sourceforge.net/project/showfiles.php?=20 group_id=3D40728&package_id=3D32894&release_id=3D499413 For more information, see the project website at: http://openbabel.sourceforge.net/ I would like to personally thank a few people for making this release =20= a great one. In alphabetical order, Rich Apodaca, Jean Br=E9fort, =20 Donald Curtis, Vincent Favre-Nicolin, Beno=EEt Jacob, Craig James and =20= eMolecules.com, Noel O'Boyle, Chris Morley, Tim Vandermeersch, and =20 Fredrik Wallner. This is a community project and we couldn't have made this release =20 without you. Many thanks to all the contributors to Open Babel =20 including those of you who submitted feedback, bug reports, and code. Cheers, -Geoff |
From: Geoffrey H. <ge...@ge...> - 2007-04-02 19:48:57
|
On Apr 2, 2007, at 9:07 AM, Noel O'Boyle wrote: > I've now realised that I should be ORing against the literal constants > in openbabelConstants.java (Java) or openbabel.py (Python) instead of > inspecting the integer value of myOBMol.GetFlags(). This should allow > this final test to pass without trouble on either platform. Yes, that's right. The integer value doesn't matter -- it's simply a bitset. Which flags are set is the real property of interest. (Sorry for the delayed reply, I've been at a meeting most of the day.) Cheers, -Geoff |
From: Noel O'B. <bao...@gm...> - 2007-04-02 13:07:08
|
I've now realised that I should be ORing against the literal constants in openbabelConstants.java (Java) or openbabel.py (Python) instead of inspecting the integer value of myOBMol.GetFlags(). This should allow this final test to pass without trouble on either platform. Noel On 02/04/07, Noel O'Boyle <bao...@gm...> wrote: > On 30/03/07, Noel O'Boyle <bao...@gm...> wrote: > > This is great! Finally, JOpenBabel works. Now to run Pybel through > > Jython...Jybel anyone? > > > > Maybe you thought I was joking, but I've modified Pybel to work with > Jython (not checked in). All tests pass except one. That is, reading > and writing files is fine; smarts pattern matching is working okay; > also, getting the Tanimoto of Fingerprints is fine. > > The one failure is intriguing. I'm not sure what the 'flags' attribute > of a molecule is supposed to indicate, but when I read "CCCC" in as a > SMILES string, I get a value of 2. Using the Python interface I get a > value of 514. Might this be something to do with a reversal of bit > order in a byte? > > Regards, > Noel > |
From: Noel O'B. <bao...@gm...> - 2007-04-02 11:19:16
|
On 30/03/07, Noel O'Boyle <bao...@gm...> wrote: > This is great! Finally, JOpenBabel works. Now to run Pybel through > Jython...Jybel anyone? > Maybe you thought I was joking, but I've modified Pybel to work with Jython (not checked in). All tests pass except one. That is, reading and writing files is fine; smarts pattern matching is working okay; also, getting the Tanimoto of Fingerprints is fine. The one failure is intriguing. I'm not sure what the 'flags' attribute of a molecule is supposed to indicate, but when I read "CCCC" in as a SMILES string, I get a value of 2. Using the Python interface I get a value of 514. Might this be something to do with a reversal of bit order in a byte? Regards, Noel |
From: Geoffrey H. <ge...@ge...> - 2007-03-30 21:51:48
|
On Mar 30, 2007, at 4:51 PM, richard apodaca wrote: > Will this reduce the functionality of Ruby Open Babel? Not that I can tell. Basically I just removed a few residue IDs from the enumerated list for SWIG. OBRuby will be otherwise fine. IMHO it's a bad idea to rename them, because these are literally the PDB codes. (Plus to do it in C++ would break backwards-compatibility inside the library.) So I've omitted PDB residue codes for: _1MA _5MC _1MG _2MG _7MG _5MU > I'd actually prefer to use Ruby-style method names. > This can be done easily with the swig -autorename flag > (must be vesion >1.3.27): > > swig -ruby -autorename -c++ > -I/usr/local/include/openbabel-2.0/ openbabel-ruby.i Great, I'll update the Makefiles. See, this is why it's best to have feedback before a release. :-) Cheers, -Geoff |
From: richard a. <ric...@ya...> - 2007-03-30 20:51:21
|
--- Geoffrey Hutchison <ge...@ge...> wrote: > > On Mar 30, 2007, at 2:46 PM, richard apodaca wrote: > > > It looks like ruby open babel still works, but > this is > > an eyesore. Any ideas on how to clear it up? > > Sure. These are residue IDs defined in an enum in > residue.h. I'll > make sure to remove them for SWIG wrappers now. Will this reduce the functionality of Ruby Open Babel? Is there another way we could do it? > Otherwise, I noticed that in Ruby, SWIG now uses the > same types of > CamelCase as the original C++. While it's not > perhaps not preferred > Ruby syntax, it does match the API docs. I'd actually prefer to use Ruby-style method names. This can be done easily with the swig -autorename flag (must be vesion >1.3.27): swig -ruby -autorename -c++ -I/usr/local/include/openbabel-2.0/ openbabel-ruby.i So, for example, $ irb irb(main):001:0> require 'openbabel' (eval): warning: rb_define_const: invalide name `_1MA' for constant (eval): warning: rb_define_const: invalide name `_5MC' for constant (eval): warning: rb_define_const: invalide name `_1MG' for constant (eval): warning: rb_define_const: invalide name `_2MG' for constant (eval): warning: rb_define_const: invalide name `_7MG' for constant (eval): warning: rb_define_const: invalide name `_5MU' for constant => true irb(main):002:0> c=Openbabel::OBConversion.new => #<Openbabel::OBConversion:0x2ace63150b88> irb(main):003:0> c.set_in_and_out_formats 'smi', 'mol' => true The API still matches Open Babel, and method naming follows well-established Ruby convention. > e.g. > require 'openbabel' > include Openbabel > > smi2mol = OBConversion.new > smi2mol.SetInFormat("smi") > > mol = OBMol.new > smi2mol.ReadString(mol, 'c1ccccc1') > mol.AddHydrogens > > puts mol.NumAtoms > puts mol.GetFormula > > Cheers, > -Geoff > ____________________________ Richard Apodaca Blog: http://depth-first.com ____________________________________________________________________________________ Don't get soaked. Take a quick peek at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather |
From: Geoffrey H. <ge...@ge...> - 2007-03-30 19:55:44
|
On Mar 30, 2007, at 2:46 PM, richard apodaca wrote: > It looks like ruby open babel still works, but this is > an eyesore. Any ideas on how to clear it up? Sure. These are residue IDs defined in an enum in residue.h. I'll make sure to remove them for SWIG wrappers now. Otherwise, I noticed that in Ruby, SWIG now uses the same types of CamelCase as the original C++. While it's not perhaps not preferred Ruby syntax, it does match the API docs. e.g. require 'openbabel' include Openbabel smi2mol = OBConversion.new smi2mol.SetInFormat("smi") mol = OBMol.new smi2mol.ReadString(mol, 'c1ccccc1') mol.AddHydrogens puts mol.NumAtoms puts mol.GetFormula Cheers, -Geoff |
From: richard a. <ric...@ya...> - 2007-03-30 18:46:59
|
Looks like Ruby Open Babel SVN rev 1917 has some things in it that Ruby doesn't like. The Ruby cpp wrapper defines some costants like "_1MA" that are invalid Ruby constants. So, when you load openbabel from ruby, you get: $ irb irb(main):001:0> require 'openbabel' (eval): warning: rb_define_const: invalide name `_1MA' for constant (eval): warning: rb_define_const: invalide name `_5MC' for constant (eval): warning: rb_define_const: invalide name `_1MG' for constant (eval): warning: rb_define_const: invalide name `_2MG' for constant (eval): warning: rb_define_const: invalide name `_7MG' for constant (eval): warning: rb_define_const: invalide name `_5MU' for constant => true It looks like ruby open babel still works, but this is an eyesore. Any ideas on how to clear it up? The offending code is around line 87152 in the openbabel_ruby.cpp file. ____________________________ Richard Apodaca Blog: http://depth-first.com ____________________________________________________________________________________ We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265 |
From: Geoffrey H. <ge...@ge...> - 2007-03-30 18:13:33
|
On Mar 30, 2007, at 12:59 PM, richard apodaca wrote: > Now, all OBTest.java does is load openbabel and create > a new OBConversion. So I wrote a really simple test > that converts a SMILES string to an OBMol: (laughing). I created almost exactly the same modified test in the 2.1.x release branch. > Using JUnit to write a set of meaningful tests would > be the next logical step. I also think that a script > to automate building the of java library would be a > nice thing to have. Even w/o these conveniences, > JOpenBabel looks very promising now. Agreed. Creating a jar with all the class files is also on the menu. The BIG advance for scripting interfaces in 2.1 is that we're no longer tied to releasing updates with the main Open Babel C++ library. Now it's pretty easy to make separate packages for just JOpenBabel, Pybel, Perl... and update them as needed. In other words, if the current SWIG interfaces are lacking a particular class, or need workarounds, it's easy to do. All we need to do is start adding example code for others to get the feel of using each interface. Cheers, -Geoff |
From: richard a. <ric...@ya...> - 2007-03-30 16:59:17
|
--- Noel O'Boyle <bao...@gm...> wrote: > On 30/03/07, Geoffrey Hutchison > <ge...@ge...> wrote: > > > > On Mar 30, 2007, at 5:11 AM, Noel O'Boyle wrote: > > > > > Not yet working on Linux, I'm afraid. Everything > compiles okay, but > > > OpenBabel says that each format did not load > properly when the test > > > program is run. > > > > Oh well. I had hoped the change to dlopen() in > libopenbabel to use > > RTLD_GLOBAL would solve the problem. > > > > I did turn up two interesting pieces of advice: > > > > * Use LD_PRELOAD=/usr/local/lib/libopenbabel.so > java OBTest > This works! You rock, Geoff. :-) I can confirm that this also works on my AMD64 machine. You do rock, Geoff! ;-) More specifically, I can say that doing: $ java OBTest did not produce the series of errors that I got without the LD_PRELOAD. Now, all OBTest.java does is load openbabel and create a new OBConversion. So I wrote a really simple test that converts a SMILES string to an OBMol: public class OBTest { public OBTest() { System.loadLibrary("openbabel"); } public void run() { OBConversion c = new OBConversion(); OBMol mol = new OBMol(); c.SetInFormat("smi"); c.ReadString(mol, "c1ccccc1"); System.out.println("Benzene has " + mol.NumAtoms() + " atoms."); } public static void main(String[] args) { System.out.println("Running OBTest..."); OBTest test = new OBTest(); test.run(); } } My output is: $ LD_PRELOAD=/usr/local/lib/libopenbabel.so java OBTest Running OBTest... Benzene has 6 atoms. Using JUnit to write a set of meaningful tests would be the next logical step. I also think that a script to automate building the of java library would be a nice thing to have. Even w/o these conveniences, JOpenBabel looks very promising now. > > > * Try changing dlhandler_unix to use > RTLD_NOW|RTLD_GLOBAL instead of > > the current RTLD_LAZY | RTLD_GLOBAL flags. > This doesn't seem to work... > > > I'm hopeful that the first one will work, but > would love to know if > > the second one solves it. (It's a library change, > but at least it > > makes calling Java cleaner for the user.) > > This is great! Finally, JOpenBabel works. Now to run > Pybel through > Jython...Jybel anyone? > > Noel > > ------------------------------------------------------------------------- > 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 > ____________________________ Richard Apodaca Blog: http://depth-first.com ____________________________________________________________________________________ It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/ |
From: Noel O'B. <bao...@gm...> - 2007-03-30 12:50:30
|
On 30/03/07, Geoffrey Hutchison <ge...@ge...> wrote: > > On Mar 30, 2007, at 5:11 AM, Noel O'Boyle wrote: > > > Not yet working on Linux, I'm afraid. Everything compiles okay, but > > OpenBabel says that each format did not load properly when the test > > program is run. > > Oh well. I had hoped the change to dlopen() in libopenbabel to use > RTLD_GLOBAL would solve the problem. > > I did turn up two interesting pieces of advice: > > * Use LD_PRELOAD=/usr/local/lib/libopenbabel.so java OBTest This works! You rock, Geoff. :-) > * Try changing dlhandler_unix to use RTLD_NOW|RTLD_GLOBAL instead of > the current RTLD_LAZY | RTLD_GLOBAL flags. This doesn't seem to work... > I'm hopeful that the first one will work, but would love to know if > the second one solves it. (It's a library change, but at least it > makes calling Java cleaner for the user.) This is great! Finally, JOpenBabel works. Now to run Pybel through Jython...Jybel anyone? Noel |
From: Geoffrey H. <ge...@ge...> - 2007-03-30 12:31:22
|
On Mar 30, 2007, at 5:11 AM, Noel O'Boyle wrote: > Not yet working on Linux, I'm afraid. Everything compiles okay, but > OpenBabel says that each format did not load properly when the test > program is run. Oh well. I had hoped the change to dlopen() in libopenbabel to use RTLD_GLOBAL would solve the problem. I did turn up two interesting pieces of advice: * Use LD_PRELOAD=/usr/local/lib/libopenbabel.so java OBTest * Try changing dlhandler_unix to use RTLD_NOW|RTLD_GLOBAL instead of the current RTLD_LAZY | RTLD_GLOBAL flags. I'm hopeful that the first one will work, but would love to know if the second one solves it. (It's a library change, but at least it makes calling Java cleaner for the user.) Thanks! -Geoff |
From: Noel O'B. <bao...@gm...> - 2007-03-30 09:11:06
|
On 29/03/07, Geoffrey Hutchison <ge...@ge...> wrote: > > Well I just committed an updated set of SWIG interfaces for the 2.1 > branch -- some unused methods in OBForceField were removed. I thought > it was a good time to give a quick update on what's going on with the > upcoming 2.1 release: > > * Noel confirmed that everything in Python (including his great Pybel > interface) is good. > > * I can confirm that the Perl interface looks good. > > * I also tried out the new Java interface on Mac OS X. I'm not sure > if the file format loading works on Linux yet, but it does here. I'm > hopeful that some libopenbabel changes may make Linux possible too. Not yet working on Linux, I'm afraid. Everything compiles okay, but OpenBabel says that each format did not load properly when the test program is run. > If there are some willing testers (er, victims?), I'd like to confirm > that Java and/or Ruby can be made to work with the current 2.1.0 > candidate snapshot. > > Let me know if you're game and I'll send you the source! > 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: Geoffrey H. <ge...@ge...> - 2007-03-29 19:46:20
|
Well I just committed an updated set of SWIG interfaces for the 2.1 branch -- some unused methods in OBForceField were removed. I thought it was a good time to give a quick update on what's going on with the upcoming 2.1 release: * Noel confirmed that everything in Python (including his great Pybel interface) is good. * I can confirm that the Perl interface looks good. * I also tried out the new Java interface on Mac OS X. I'm not sure if the file format loading works on Linux yet, but it does here. I'm hopeful that some libopenbabel changes may make Linux possible too. If there are some willing testers (er, victims?), I'd like to confirm that Java and/or Ruby can be made to work with the current 2.1.0 candidate snapshot. Let me know if you're game and I'll send you the source! Thanks, -Geoff |
From: Geoffrey H. <ge...@ge...> - 2007-03-12 12:43:55
|
Hi Josh, If you're really sure that babel is "prematurely terminating," and isn't giving you an error, that's a bug. Please post a detailed bug report (e.g., what file you were using, what options you used with babel, what happened, etc.). We'd like to make sure we fix as many bugs as possible before the 2.1 release. http://sourceforge.net/tracker/?group_id=40728&atid=428740 Cheers, -Geoff On Mar 11, 2007, at 11:29 PM, S Joshua Swamidass wrote: > Cool! > > That version works. Also, did you notice that comandline utility > "babel" seems to prematurely termenate when converting files? How do i > make it tell me what the errors are? > > Josh |
From: Geoffrey H. <ge...@ge...> - 2007-03-12 01:34:28
|
Hi Joshua, I forgot to ask which version of Open Babel you're using. The 2.0.x versions probably won't work with Python 2.5. We generate the interfaces with SWIG, and the older version isn't compatible with Python 2.5. The update to Python added "const" declarations (as you see). The 2.1.0b6 snapshot should be fine, at least in theory. http://sourceforge.net/project/showfiles.php? group_id=40728&package_id=154019&release_id=490171 -Geoff > running the command: python setup.py build > ON: > Mac OS X (Tiger) > Python 2.5 > gcc 4.0.1 > > It seems to work fine with Python 2.4 with this setup. Thanks for > the help! > > > =================== > Here is the error using Python2.5 > ================== > running build > running build_py > running build_ext > building '_openbabel' extension > gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp > -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/openbabel-2.0 > -I/usr/local/include/openbabel-2.0/openbabel > -I/usr/local/include/python2.5 -c openbabel_python.cpp -o > build/temp.macosx-10.3-i386-2.5/openbabel_python.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for C/ObjC but not for C++ > openbabel_python.cpp: In function 'int > SWIG_Python_ConvertFunctionPtr(PyObject*, void**, swig_type_info*)': > openbabel_python.cpp:2051: error: invalid conversion from 'const > char*' to 'char*' > openbabel_python.cpp: In function 'int > SWIG_AsCharPtrAndSize(PyObject*, char**, size_t*, int*)': > openbabel_python.cpp:4550: error: invalid conversion from 'int*' to > 'Py_ssize_t*' > openbabel_python.cpp:4550: error: initializing argument 3 of 'int > PyString_AsStringAndSize(PyObject*, char**, Py_ssize_t*)' > openbabel_python.cpp: In function 'void > SWIG_Python_FixMethods(PyMethodDef*, swig_const_info*, > swig_type_info**, swig_type_info**)': > openbabel_python.cpp:46173: error: invalid conversion from 'const > char*' to 'char*' > error: command 'gcc' failed with exit status 1 > > ================ > Here is the successful build using Python2.4 > ================ > running build > running build_py > creating build/lib.macosx-10.3-i386-2.4 > copying openbabel.py -> build/lib.macosx-10.3-i386-2.4 > running build_ext > building '_openbabel' extension > creating build/temp.macosx-10.3-i386-2.4 > gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp > -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/openbabel-2.0 > -I/usr/local/include/openbabel-2.0/openbabel > -I/usr/local/include/python2.4 -c openbabel_python.cpp -o > build/temp.macosx-10.3-i386-2.4/openbabel_python.o > cc1plus: warning: command line option "-Wstrict-prototypes" is valid > for C/ObjC but not for C++ > openbabel_python.cpp: In member function > 'swig::PySequence_Ref<T>::operator T() const [with T = int]': > openbabel_python.cpp:3214: warning: 'v' may be used uninitialized in > this function > c++ -bundle -undefined dynamic_lookup > build/temp.macosx-10.3-i386-2.4/openbabel_python.o -L/usr/local/lib > -lopenbabel -o build/lib.macosx-10.3-i386-2.4/_openbabel.so > > > On 3/11/07, Geoffrey Hutchison <ge...@ge...> wrote: >> >> On Mar 11, 2007, at 5:02 PM, S Joshua Swamidass wrote: >> >> > Has anyone succeeded in compiling openbabel using Python2.5? I"m >> > getting some compiling errors. >> >> I don't have Python 2.5, so no. But what exactly are the compiling >> errors? >> >> 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: Geoffrey H. <ge...@ge...> - 2007-03-11 22:07:39
|
On Mar 11, 2007, at 5:02 PM, S Joshua Swamidass wrote: > Has anyone succeeded in compiling openbabel using Python2.5? I"m > getting some compiling errors. I don't have Python 2.5, so no. But what exactly are the compiling errors? Thanks, -Geoff |
From: S J. S. <swa...@gm...> - 2007-03-11 21:02:40
|
hello, Has anyone succeeded in compiling openbabel using Python2.5? I"m getting some compiling errors. Josh |
From: Noel O'B. <bao...@gm...> - 2007-02-27 09:23:21
|
On 26/02/07, Geoffrey Hutchison <ge...@ge...> wrote: > > I'm coming back (finally) to the Java interface. Ideally I'd love to > see it make the cut for the 2.1 release near the end of March. But I > need to figure out if the file format loading problem can be solved. > > So first, I'm trying this on the Mac, which should have an easier > time dealing with file format libraries. > > I could use a little (stupid) help. I created Rich's OBTest.java, > compiled, and started running it: > > Running OBTest... > > Exception in thread "main" java.lang.UnsatisfiedLinkError: no > > openbabel in java.library.path > > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) > > at java.lang.Runtime.loadLibrary0(Runtime.java:822) > > at java.lang.System.loadLibrary(System.java:992) > > at OBTest.<init>(OBTest.java:5) > > at OBTest.main(OBTest.java:17) > > OK, so help me out here. What are some typical environment variables > that I'm likely lacking to cause the exception. >From one novice to another... (1) These sort of properties can be set using -Djava.library.path= (2) A nice google hit is: http://forum.java.sun.com/thread.jspa?threadID=627890 (3) Also it may be that setting LD_LIBRARY_PATH does the same thing on Unix (4) There is a very good discussion on http://www.jguru.com/faq/view.jsp?EID=970296 which touches on our own problem (see reply by Juan Jimenez), regarding the subsequent loading of a library |
From: Geoffrey H. <ge...@ge...> - 2007-02-26 22:51:36
|
I'm coming back (finally) to the Java interface. Ideally I'd love to see it make the cut for the 2.1 release near the end of March. But I need to figure out if the file format loading problem can be solved. So first, I'm trying this on the Mac, which should have an easier time dealing with file format libraries. I could use a little (stupid) help. I created Rich's OBTest.java, compiled, and started running it: > Running OBTest... > Exception in thread "main" java.lang.UnsatisfiedLinkError: no > openbabel in java.library.path > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) > at java.lang.Runtime.loadLibrary0(Runtime.java:822) > at java.lang.System.loadLibrary(System.java:992) > at OBTest.<init>(OBTest.java:5) > at OBTest.main(OBTest.java:17) OK, so help me out here. What are some typical environment variables that I'm likely lacking to cause the exception. Thanks, -Geoff (The Java novice) |
From: Geoffrey H. <ge...@ge...> - 2007-02-20 14:40:05
|
While the API documentation is still "in progress," I wanted to make sure that the scripting interfaces for 2.1 include the new OBForceField class. I'm committing updated SWIG wrappers this morning (for a 2.1.0b6 snapshot). They may break everything, I haven't had enough time to test them. On the plus side, it will add another library for molecular mechanics using Python or Perl or Ruby. Cheers, -Geoff |
From: Jerome P. <j.p...@pa...> - 2007-02-19 11:41:41
|
Hello, Le lundi 19 f=E9vrier 2007 11:36, Noel O'Boyle a =E9crit=A0: > Hello Jerome, > > Sorry for the delay in replying... > > On 19/02/07, Jerome Pansanel <j.p...@pa...> wrote: > > Hello, > > > > I'm developping a plugin for the PyMOL software, based on Open Babel. T= he > > goal of this plugin is to import any file supported by the Open Babel > > software. > > That would be great! > > > For this, I need to know which format are supported. I tried to use > > OBConversion::GetNextFormat from openbabel.py, but this don't work (I > > cannot set the first argument to OpenBabel::Formatpos & type). > > True, this is a known problem. In Python, strings are immutable. As a > result, you cannot pass a reference to a string into a function. > > > Therefore, I've developped a simple class, called OBSupportedFormat, th= at > > returns the supported chemical formats. > > Why not just add a method to OpenBabel::OBConversion that returns a > std::list? That way, all users of OpenBabel would benefit too. Yes, it's a good idea. It could be two functions: list<string> getInputSupportedFormat(); list<string> getOutputSupportedFormat(); > > It works fine into C++ software. When > > using SWIG wrapper for Python and calling the class OBSupportedFormat(), > > I get these errors: > > > > The compilation works without error, also when using -Wall flags. > > Do you have any hints ? > > > > Here's my obsupportedformat.i file: > > *********************************************************** > > %module obsupportedformat > > > > %{ > > #include <Python.h> > > #include <string> > > #include <vector> > > #include <openbabel/obconversion.h> > > > > #include "obsupportedformat.h" > > > > %} > > > > %include "obsupportedformat.h" > > *********************************************************** > > Special magic is needed to get OpenBabel to work correctly in SWIG. As > shown in lines 398 to 407 of > http://openbabel.svn.sourceforge.net/viewvc/openbabel/openbabel/trunk/scr= ip >ts/Makefile.in?revision=3D1724&view=3Dmarkup the dlopenflags needs to be s= et > before "import _openbabel" will work. We use a Makefile hack as it is not > possible to use SWIG to place > lines before "import _openbabel" in the generated Python module. Work's fine now :) I've just added also the template list<std::string> into obsupportedformat.= i=20 file. It's perfect. Thanks, Jerome Pansanel > Noel |