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...> - 2006-12-16 18:15:07
|
What is the current situation with OB/Java? I've tried to follow the README in scripts/java but step 3 gave: g++: libopenbabel.so: No such file or directory Noel On 07/11/06, richard apodaca <ric...@ya...> wrote: > Hi Geoff, > > What a coincidence! > > In looking through the Java that your openbabel-java.i > file generated (svn trunk rev 1584), I see the cause > of the large filenames. The %module directive uses > net.sourceforge.openbabel as the name. Change this to: > > %module openbabel > > The problems with long filenames will disappear. But > that's not the biggest problem. The autogenerated java > also wouldn't compile because it was defining things > like: > > public interface net.sourceforge.openbabelJNI > { > ... > } > > when it really should have been generating: > > package net.sourceforge.openbabel; > > public interface JNI > { > ... > } > > and so on. Packages are more of a hassle than they're > worth at this point. We can always get that part > tidied up later. > > So when I run swig with the '%module openbabel' > directive, I get to the same place I was before. That > is, 32 java compile errors are produced. They involve > these class definitions that can't be found: > > OBBitVec > matrix3x3 > OBAromaticTyper > OBAtomTyper > OBChainsParser > > In addition, 2 of these errors are apparently related > to method duplication: > > OBSmartsPattern.java:107: > RestrictedMatch(OBMol,SWIGTYPE_p_std__vectorTstd__pairTint_int_t_t,boolean) > is already defined in OBSmartsPattern > public boolean RestrictedMatch(OBMol mol, OBBitVec > bv, boolean single) { > > ... > > OBSmartsPattern.java:111: > RestrictedMatch(OBMol,SWIGTYPE_p_std__vectorTstd__pairTint_int_t_t) > is already defined in OBSmartsPattern > public boolean RestrictedMatch(OBMol mol, OBBitVec > bv) { > > ... > > cheers, > Rich > > --- Geoffrey Hutchison <ge...@ge...> > wrote: > > > > > On Nov 5, 2006, at 9:03 PM, richard apodaca wrote: > > > > > I know Java is technically not a scripting > > language, > > > but I was wondering if anyone was interested in > > trying > > > to get a Java interface to OB working. > > > > Actually, there are SWIG generated files for Java in > > the current SVN > > head (much like you describe). > > > > I had to do some renaming though -- the filenames > > are so huge that > > they can't be archived by tar (i.e., for generating > > snapshots and > > releases). I haven't updated the Makefile to do this > > automatically yet. > > > > > (6) on line 1 of openbabel_java.cpp, add #include > > > <math.h> > > > > Actually, you can automate this by adding to > > openbabel-java.i > > > > > [produces 32 errors about missing classes such as > > > OBChainsParser, OBBitVec, matrix3x3, > > OBAromaticTyper, > > > and so on.] > > > > If you can get me a full list, I'll definitely hack > > the SWIG > > interface file to generate these. > > > > Cheers, > > -Geoff > > > > > ____________________________ > Richard Apodaca > Blog: http://depth-first.com > > > > > ____________________________________________________________________________________ > Do you Yahoo!? > Everyone is raving about the all-new Yahoo! Mail. > http://new.mail.yahoo.com > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Noel O'B. <bao...@gm...> - 2006-12-15 17:06:51
|
Thanks Andreas for letting us know about this problem. First of all, can you let us know whether this problem occurs if you use the babel executable itself to convert the file? (If so, the problem is nothing to do with the Python bindings) Noel On 15/12/06, Andreas Karwath <ka...@in...> wrote: > Hi all, > > I hope I don't have to send this to the developer list... > > I have installed the latest version of openbabel (2.1.0b3) including the > python bindings... (openbabel and pybel), Linux Suse 9.2 > I wanted to parse a gzipped SDF file (zipped file size 14 M) to extract > specific molecules (by name), for this I first tried to do the normal > routine, i.e.: > > sdfFileName =3D <someGzippedSDFFile> > obconversion =3D OBConversion() > obconversion.SetInFormat("sdf") > obconversion.SetOutFormat("smi") > obmol =3D OBMol() > > notatend =3D obconversion.ReadFile(obmol,sdfFileName) > export =3D obconversion.WriteFile(obmol,'myTest.smi') > while notatend: > obconversion.Write(obmol) > obmol =3D OBMol() > notatend =3D obconversion.Read(obmol) > > On a normal (i.e. unzipped) SDF File it works fine. But not on a gzipped = one > -> Segmentation Fault. It can only get access the first single molecule > > The same is true when using the new pybel lib. -> Segmentation Fault! > > I assume that OpenBabel keeps a pointer to the last read molecule in the = SDF > file, which would not work when accessing the zipped one... > > I don't want to unpack the file, as I have a few hundred of those.. (disk > space!) > > Did anyone have the same problem and knows an elegant workaround? > I guess the problem should occur for other scripting languages as well... > > Regards, > > A. Karwath > ----------------- > > Dr. Andreas Karwath > Machine Learning Lab > Institute for Computer Science > Albert-Ludwigs-Universit=E4t Freiburg > Georges-K=F6hler-Allee 079 > D-79110 Freiburg > Germany > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share y= our > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > > |
From: Andreas K. <ka...@in...> - 2006-12-15 16:15:50
|
Hi all, I hope I don't have to send this to the developer list... I have installed the latest version of openbabel (2.1.0b3) including =20 the python bindings... (openbabel and pybel), Linux Suse 9.2 I wanted to parse a gzipped SDF file (zipped file size 14 M) to =20 extract specific molecules (by name), for this I first tried to do =20 the normal routine, i.e.: sdfFileName =3D <someGzippedSDFFile> obconversion =3D OBConversion() obconversion.SetInFormat("sdf") obconversion.SetOutFormat("smi") obmol =3D OBMol() notatend =3D obconversion.ReadFile(obmol,sdfFileName) export =3D obconversion.WriteFile(obmol,'myTest.smi') while notatend: obconversion.Write(obmol) obmol =3D OBMol() notatend =3D obconversion.Read(obmol) On a normal (i.e. unzipped) SDF File it works fine. But not on a =20 gzipped one -> Segmentation Fault. It can only get access the first =20 single molecule The same is true when using the new pybel lib. -> Segmentation Fault! I assume that OpenBabel keeps a pointer to the last read molecule in =20 the SDF file, which would not work when accessing the zipped one... I don't want to unpack the file, as I have a few hundred of those.. =20 (disk space!) Did anyone have the same problem and knows an elegant workaround? I guess the problem should occur for other scripting languages as =20 well... Regards, A. Karwath ----------------- Dr. Andreas Karwath Machine Learning Lab Institute for Computer Science Albert-Ludwigs-Universit=E4t Freiburg Georges-K=F6hler-Allee 079 D-79110 Freiburg Germany |
From: Noel O'B. <bao...@gm...> - 2006-12-13 13:37:37
|
I've just checked in some changes to openbabel-python.i based on the code in my earlier email on this topic. You can see the file here: http://openbabel.svn.sourceforge.net/viewvc/openbabel/openbabel/trunk/scripts/openbabel-python.i?revision=1656&view=markup Now it's possible to use OBMolAtomIter as if it's a Python iterator: ================== import openbabel import pybel mol = pybel.readstring("smi", "CNC").OBMol for atom in openbabel.OBMolAtomIter(mol): print atom.GetAtomicMass() ===================== Hopefully, we can get similar methods together for the other language bindings. Noel On 13/12/06, Geoffrey Hutchison <ge...@ge...> wrote: > > On Dec 13, 2006, at 4:44 AM, Noel O'Boyle wrote: > > > that Geoff has renamed some methods to good(), deref() and inc(). > > Using these, it's possible to create a class that behaves as an > > iterator. > > Don't look at me. Those were contributed. :-) > > > classes at runtime (or have a Factory method) as there are now about > > 10 iterators of similar structure in obiter.h. > > As both Rich and Noel have mentioned, iterating doesn't necessarily > work the same in C++ as in scripting languages. (Heck, in C++ people > often have different ways of doing iteration.) > > If you think it would be a good idea to have methods to just pass a > list of atoms or bonds, residues, etc. please let me know. Many of > these methods already exist, although I haven't checked for > "completeness" in the API. > > SWIG doesn't always make it easy to inject code into the C++ > interface file or the scripting language module that it generates. Of > course that's why we've put hacks into the Makefiles. So if there are > bits we'd like to put in either place, let me know and I'll figure > out an appropriate way to get it done. > > Cheers, > -Geoff > > |
From: Geoffrey H. <ge...@ge...> - 2006-12-13 13:24:40
|
On Dec 13, 2006, at 4:44 AM, Noel O'Boyle wrote: > that Geoff has renamed some methods to good(), deref() and inc(). > Using these, it's possible to create a class that behaves as an > iterator. Don't look at me. Those were contributed. :-) > classes at runtime (or have a Factory method) as there are now about > 10 iterators of similar structure in obiter.h. As both Rich and Noel have mentioned, iterating doesn't necessarily work the same in C++ as in scripting languages. (Heck, in C++ people often have different ways of doing iteration.) If you think it would be a good idea to have methods to just pass a list of atoms or bonds, residues, etc. please let me know. Many of these methods already exist, although I haven't checked for "completeness" in the API. SWIG doesn't always make it easy to inject code into the C++ interface file or the scripting language module that it generates. Of course that's why we've put hacks into the Makefiles. So if there are bits we'd like to put in either place, let me know and I'll figure out an appropriate way to get it done. Cheers, -Geoff |
From: Noel O'B. <bao...@gm...> - 2006-12-13 09:44:59
|
I spoke too soon - after playing around with the OBMolAtomIter class for a while I found that it *is* in working order (from Python's point of view). It does require some wrapping to make it into a real Python iterator though. If you look at the interface files (.i), you can see that Geoff has renamed some methods to good(), deref() and inc(). Using these, it's possible to create a class that behaves as an iterator. (Note that .next() and __iter__() are magic methods that Python uses to create an iterator. Presumably other languages have their own ways of creating iterators.) ================ import openbabel as ob import pybel class Testiter(object): def __init__(self, mol): self.iter = ob.OBMolAtomIter(mol) self.finished = False def __iter__(self): return self def next(self): obAtom = self.iter.deref() self.iter.inc() if not self.finished: if not self.iter.good(): self.finished = True return obAtom else: raise StopIteration mol = pybel.readstring("smi", "CNC").OBMol for atom in Testiter(mol): print atom.GetAtomicMass() ================ I'll move this into the SWIG interface file somehow; I think it's possible to replace the existing OBMolAtomIter class with a Python class of the same name. Hopefully it's also possible to create these classes at runtime (or have a Factory method) as there are now about 10 iterators of similar structure in obiter.h. Regards, Noel On 12/12/06, richard apodaca <ric...@ya...> wrote: > > --- Noel O'Boyle <bao...@gm...> wrote: > > > obiter.h exposes a number of C++ convenience > > functions for iterating > > over atoms, bonds, etc. e.g. OBMolAtomIter iterates > > over the atoms in > > a molecule. > > > > However, these iterator methods don't work very well > > from scripting > > languages (I'm not even sure if it's possible to use > > them as they were > > designed to be used). It's much easier to use the > > built-in iterator > > methods present in the various languages. In Python, > > the easiest way > > to do this is to create a list of the atoms of a > > molecule and then > > iterate over these: > > > > obAtoms = [obMol.GetAtom(i+1) for i in > > range(obMol.NumAtoms())] > > for obAtom in obAtoms: > > # Do something with obAtom > > > > It would be very useful to collect such OpenBabel > > idioms from > > different scripting languages and put them on the > > scripting pages (or > > even include them in the interface files as > > convenience functions). > > Could anyone suggest similar code for > > Perl/Ruby/Java? > > Interesting idea. In Ruby, I'd like to just do > something like this: > > mol.each_atom do |atom| > # do something with atom > end > > And similar methods for other iterable collections. > > There are a few ways to get there. One would be > throught the SWIG interface file or C bridge it > generates. Another would be to just define a Ruby > class with the iterators built-in. > > Another would be through Ruby metaprogramming. This > has the advantage over the other methods that it can > be very concise. It comes with a potential decrease in > speed. > > cheers, > Rich > > > > ____________________________ > Richard Apodaca > Blog: http://depth-first.com > > > > ____________________________________________________________________________________ > Any questions? Get answers on any topic at www.Answers.yahoo.com. Try it now. > > ------------------------------------------------------------------------- > 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: richard a. <ric...@ya...> - 2006-12-12 15:29:28
|
--- Noel O'Boyle <bao...@gm...> wrote: > obiter.h exposes a number of C++ convenience > functions for iterating > over atoms, bonds, etc. e.g. OBMolAtomIter iterates > over the atoms in > a molecule. > > However, these iterator methods don't work very well > from scripting > languages (I'm not even sure if it's possible to use > them as they were > designed to be used). It's much easier to use the > built-in iterator > methods present in the various languages. In Python, > the easiest way > to do this is to create a list of the atoms of a > molecule and then > iterate over these: > > obAtoms = [obMol.GetAtom(i+1) for i in > range(obMol.NumAtoms())] > for obAtom in obAtoms: > # Do something with obAtom > > It would be very useful to collect such OpenBabel > idioms from > different scripting languages and put them on the > scripting pages (or > even include them in the interface files as > convenience functions). > Could anyone suggest similar code for > Perl/Ruby/Java? Interesting idea. In Ruby, I'd like to just do something like this: mol.each_atom do |atom| # do something with atom end And similar methods for other iterable collections. There are a few ways to get there. One would be throught the SWIG interface file or C bridge it generates. Another would be to just define a Ruby class with the iterators built-in. Another would be through Ruby metaprogramming. This has the advantage over the other methods that it can be very concise. It comes with a potential decrease in speed. cheers, Rich ____________________________ Richard Apodaca Blog: http://depth-first.com ____________________________________________________________________________________ Any questions? Get answers on any topic at www.Answers.yahoo.com. Try it now. |
From: Noel O'B. <bao...@gm...> - 2006-12-12 12:55:18
|
obiter.h exposes a number of C++ convenience functions for iterating over atoms, bonds, etc. e.g. OBMolAtomIter iterates over the atoms in a molecule. However, these iterator methods don't work very well from scripting languages (I'm not even sure if it's possible to use them as they were designed to be used). It's much easier to use the built-in iterator methods present in the various languages. In Python, the easiest way to do this is to create a list of the atoms of a molecule and then iterate over these: obAtoms = [obMol.GetAtom(i+1) for i in range(obMol.NumAtoms())] for obAtom in obAtoms: # Do something with obAtom It would be very useful to collect such OpenBabel idioms from different scripting languages and put them on the scripting pages (or even include them in the interface files as convenience functions). Could anyone suggest similar code for Perl/Ruby/Java? Noel |
From: Noel O'B. <bao...@gm...> - 2006-11-29 14:02:38
|
The fix (or workaround) is in SVN now. Seems to work on Linux at least. You can use: c_dbl_array = double_array(mylist) and then pass c_dbl_array to the OBMol.Rotate() method. Noel. On 27/11/06, Adam Tenderholt <a-t...@st...> wrote: > Anyone have pointers on how to use the OBMol.Rotate() function from > Python? I tried passing a list of 9 doubles, but got the error > "NotImplementedError: No matching function for overloaded > 'OBMol_Rotate' ". Any help would be appreciated. > > Adam > > > ------------------------------------------------------------------------- > 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...> - 2006-11-28 10:38:24
|
It may also be possible to create a C array directly from python as described in: http://www.swig.org/Doc1.3/Python.html#Python_nn48 http://www.swig.org/Doc1.3/Library.html#Library_nn5 This is probably a better option than that described in my previous email. Noel On 28/11/06, Noel O'Boyle <bao...@gm...> wrote: > Hello again Adam! > > You're right. With the latest SWIG and on Windows, I get a slightly > more helpful error message: > > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "C:\Python24\Lib\site-packages\openbabel.py", line 1959, in Rotate > def Rotate(*args): return _openbabel.OBMol_Rotate(*args) > NotImplementedError: Wrong number of arguments for overloaded function 'OBMol_Ro > tate'. > Possible C/C++ prototypes are: > Rotate(double const [3][3]) > Rotate(double const [9]) > Rotate(double const [9],int) > > Overloaded functions are not the problem. The problem is that there is > no easy way to pass a C array as a parameter. I think the answer can > be found in: > http://www.swig.org/Doc1.3/Python.html#Python_nn41 > > In short, either mol.cpp or openbabel-python.i needs to be edited to > be some new functionality. > > Noel > > > On 27/11/06, Adam Tenderholt <a-t...@st...> wrote: > > Anyone have pointers on how to use the OBMol.Rotate() function from > > Python? I tried passing a list of 9 doubles, but got the error > > "NotImplementedError: No matching function for overloaded > > 'OBMol_Rotate' ". Any help would be appreciated. > > > > Adam > > > > > > ------------------------------------------------------------------------- > > 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...> - 2006-11-28 09:45:57
|
Hello again Adam! You're right. With the latest SWIG and on Windows, I get a slightly more helpful error message: Traceback (most recent call last): File "<stdin>", line 1, in ? File "C:\Python24\Lib\site-packages\openbabel.py", line 1959, in Rotate def Rotate(*args): return _openbabel.OBMol_Rotate(*args) NotImplementedError: Wrong number of arguments for overloaded function 'OBMol_Ro tate'. Possible C/C++ prototypes are: Rotate(double const [3][3]) Rotate(double const [9]) Rotate(double const [9],int) Overloaded functions are not the problem. The problem is that there is no easy way to pass a C array as a parameter. I think the answer can be found in: http://www.swig.org/Doc1.3/Python.html#Python_nn41 In short, either mol.cpp or openbabel-python.i needs to be edited to be some new functionality. Noel On 27/11/06, Adam Tenderholt <a-t...@st...> wrote: > Anyone have pointers on how to use the OBMol.Rotate() function from > Python? I tried passing a list of 9 doubles, but got the error > "NotImplementedError: No matching function for overloaded > 'OBMol_Rotate' ". Any help would be appreciated. > > Adam > > > ------------------------------------------------------------------------- > 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: Adam T. <a-t...@st...> - 2006-11-27 01:26:58
|
Anyone have pointers on how to use the OBMol.Rotate() function from Python? I tried passing a list of 9 doubles, but got the error "NotImplementedError: No matching function for overloaded 'OBMol_Rotate' ". Any help would be appreciated. Adam |
From: Noel O'B. <bao...@gm...> - 2006-11-25 11:17:27
|
I've added a section on combining Pybel with openbabel.py to the wiki at: http://openbabel.sourceforge.net/w/index.php?title=Python#Combining_Pybel_with_openbabel.py Hope this helps, Noel On 23/11/06, Noel O'Boyle <bao...@gm...> wrote: > First of all, there is some confusion over the names of the modules. > SVN contains an openbabel Python module (openbabel.py), as well as the > Pybel module (pybel.py). The 2.0.2 release just contains openbabel.py > . > > Pybel is not a replacement for openbabel.py, nor does it deprecate it. > In fact, both can be used together as Pybel is built on top of > openbabel.py. Pybel simplifies the task of reading and writing files > for example. Using openbabel.py, this takes several lines; using > Pybel, it takes one line. > > For the moment, if you find the difference between Pybel and > openbabel.py confusing, it is perhaps better to use openbabel.py. I > will put some examples on the web page showing how the two can be used > together (as I think this is what most people will want to do). > > If you are interested, I recommend you to look at the source code of > Pybel.py. It is not very long, and gives some examples on how to use > openbabel.py. > > Regards, > Noel > > (I note that Pybel was formerly called pyopenbabel.py but it is better > to forget this :-) ) > > On 23/11/06, fdu...@gm... <fdu...@gm...> wrote: > > Hi all, > > > > I am going to write a little program with the python wrapper of openbabel. > > > > The current release of openbabel(2.0.2) is shiped with pyopenbabel, but > > the svn version provides pybel as well. It seems that pyopenbabel.py > > contains more functions than pybel.py. > > > > I have searched the wiki, but there is only introduction of pybel. > > > > So I'm a little confused. Which one should I use, pyopenbabel or pybel ? > > Is pybel going to replace or deprecate pyopenbel. > > > > Thanks ! > > > > xiaojf > > > > ------------------------------------------------------------------------- > > 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...> - 2006-11-23 15:34:43
|
First of all, there is some confusion over the names of the modules. SVN contains an openbabel Python module (openbabel.py), as well as the Pybel module (pybel.py). The 2.0.2 release just contains openbabel.py . Pybel is not a replacement for openbabel.py, nor does it deprecate it. In fact, both can be used together as Pybel is built on top of openbabel.py. Pybel simplifies the task of reading and writing files for example. Using openbabel.py, this takes several lines; using Pybel, it takes one line. For the moment, if you find the difference between Pybel and openbabel.py confusing, it is perhaps better to use openbabel.py. I will put some examples on the web page showing how the two can be used together (as I think this is what most people will want to do). If you are interested, I recommend you to look at the source code of Pybel.py. It is not very long, and gives some examples on how to use openbabel.py. Regards, Noel (I note that Pybel was formerly called pyopenbabel.py but it is better to forget this :-) ) On 23/11/06, fdu...@gm... <fdu...@gm...> wrote: > Hi all, > > I am going to write a little program with the python wrapper of openbabel. > > The current release of openbabel(2.0.2) is shiped with pyopenbabel, but > the svn version provides pybel as well. It seems that pyopenbabel.py > contains more functions than pybel.py. > > I have searched the wiki, but there is only introduction of pybel. > > So I'm a little confused. Which one should I use, pyopenbabel or pybel ? > Is pybel going to replace or deprecate pyopenbel. > > Thanks ! > > xiaojf > > ------------------------------------------------------------------------- > 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: <fdu...@gm...> - 2006-11-23 15:04:20
|
Hi all, I am going to write a little program with the python wrapper of openbabel. The current release of openbabel(2.0.2) is shiped with pyopenbabel, but the svn version provides pybel as well. It seems that pyopenbabel.py contains more functions than pybel.py. I have searched the wiki, but there is only introduction of pybel. So I'm a little confused. Which one should I use, pyopenbabel or pybel ? Is pybel going to replace or deprecate pyopenbel. Thanks ! xiaojf |
From: Andrew D. F. <fa...@po...> - 2006-11-21 16:57:14
|
Thanks for the feedback, Geoff. To be a little more specific about what I am doing, I'm doing some thermodynamics with substituted pyridines, Because I'm generating all the initial structures by hand, and there are about 55 species involved (actually more than double that with various charged species involved), I'd rather not manually create an structure for each species, but if I am going to do any sort of automated data reduction on this set, I need to be sure that the atom numbering and the internal coordinates in the z matrix are consistent I do have optimized structures for pyridine and one of the substituted species at a high level of theory to use as starting points for construction. As an example runsystem -t optimize -p meta -s methyl -c neutral -b sto6g (just as a mock-up) would construct the zmatrix for 3-methylpyridine and optimize it as a neutral species at STO-6G (in reality, I'll be putting codes in rather than words, but it makes the example easier to read 8-). I have bits and pieces to do this already, but I am getting hung up on the best way to manage merging the two fragments into the final zmatrix with consistent numbering and internal angles. Does anyone have any elegant solutions for this, or will I end up dragging a long case statement around? Thanks again, Andy Geoffrey Hutchison wrote: > Hi Andrew, > > I don't think your question is off-topic at all. I'm actually adding > in the openbabel-discuss general list as well, since I don't think > this is really restricted to scripting languages. > > Open Babel is really good at automation. I've done similar sorts of > tasks. For example, the 2.1 betas and development code offer flags > for setting the keywords for many standard quantum chemistry packages > from the command-line. > > e.g. (turning a folder full of .xyz files into a set of foo.com files > for some "G" package.) > > babel *.xyz -xk "#n B3LYP/6-31G* Opt" -ocom -m > # here you see a one-line set of keywords from the command-line. > Here's another example using a text file of keywords > # -ocom sets the output format to .com and -m indicates a batch-mode > command over all the .xyz files > > babel *.xyz -xf keywords.txt -ocom -m > # where keywords.txt is a text file with as much as you want for the > header > > I generally write up small shell scripts to automate some of these > actions, often including interaction with the queue system (e.g., > splitting 200 jobs into 5-10 lists of jobs before other users of the > cluster kill me). I'd be glad to share more details if people are > interested. > > Cheers, > -Geoff -- Andrew Fant | And when the night is cloudy | This space to let Molecular Geek | There is still a light |---------------------- fa...@po... | That shines on me | Disclaimer: I don't Boston, MA | Shine until tomorrow, Let it be | even speak for myself |
From: Geoffrey H. <ge...@ge...> - 2006-11-21 15:45:05
|
Hi Andrew, I don't think your question is off-topic at all. I'm actually adding in the openbabel-discuss general list as well, since I don't think this is really restricted to scripting languages. Open Babel is really good at automation. I've done similar sorts of tasks. For example, the 2.1 betas and development code offer flags for setting the keywords for many standard quantum chemistry packages from the command-line. e.g. (turning a folder full of .xyz files into a set of foo.com files for some "G" package.) babel *.xyz -xk "#n B3LYP/6-31G* Opt" -ocom -m # here you see a one-line set of keywords from the command-line. Here's another example using a text file of keywords # -ocom sets the output format to .com and -m indicates a batch-mode command over all the .xyz files babel *.xyz -xf keywords.txt -ocom -m # where keywords.txt is a text file with as much as you want for the header I generally write up small shell scripts to automate some of these actions, often including interaction with the queue system (e.g., splitting 200 jobs into 5-10 lists of jobs before other users of the cluster kill me). I'd be glad to share more details if people are interested. Cheers, -Geoff On Nov 20, 2006, at 5:02 PM, Andrew D. Fant wrote: > Hello all, > My apologies if this is somewhat off-topic. I'm doing some > work looking at > substituent effects on the thermodynamics of a system, which is > requiring me to > submit a large number of jobs to a commercial quantum chemistry > suite that we > probably all know. It seems that a script that has flags that > would allow me to > specify the level of theory, the type of computation, the > substituent, and the > substituent position, and then automatically submit it to the > queuing system > would be much easier to deal with than 200 or so individual input > decks. Does > anyone have any useful suggestions on how to set this up with a > sane and > consistent atom ordering/numbering scheme, or any other hard-won > advice that > they are willing to share? I'll gladly accept replies on list or > in my private > email. > > Sorry again to those who see this as off-topic. I figured that > this would be a > good place to look for people who have done this sort of thing > before, and I'd > rather start here than bring down the storm upon me for using the > "G" word on CCL. > > Thanks, > Andy > > -- > Andrew Fant | And when the night is cloudy | This space to let > Molecular Geek | There is still a light > |---------------------- > fa...@po... | That shines on me | Disclaimer: I > don't > Boston, MA | Shine until tomorrow, Let it be | even speak for > myself > > > ---------------------------------------------------------------------- > --- > 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: Andrew D. F. <fa...@po...> - 2006-11-20 22:04:48
|
Hello all, My apologies if this is somewhat off-topic. I'm doing some work looking at substituent effects on the thermodynamics of a system, which is requiring me to submit a large number of jobs to a commercial quantum chemistry suite that we probably all know. It seems that a script that has flags that would allow me to specify the level of theory, the type of computation, the substituent, and the substituent position, and then automatically submit it to the queuing system would be much easier to deal with than 200 or so individual input decks. Does anyone have any useful suggestions on how to set this up with a sane and consistent atom ordering/numbering scheme, or any other hard-won advice that they are willing to share? I'll gladly accept replies on list or in my private email. Sorry again to those who see this as off-topic. I figured that this would be a good place to look for people who have done this sort of thing before, and I'd rather start here than bring down the storm upon me for using the "G" word on CCL. Thanks, Andy -- Andrew Fant | And when the night is cloudy | This space to let Molecular Geek | There is still a light |---------------------- fa...@po... | That shines on me | Disclaimer: I don't Boston, MA | Shine until tomorrow, Let it be | even speak for myself |
From: Noel O'B. <bao...@gm...> - 2006-11-16 15:18:37
|
I've made the changes. Thanks! On 14/11/06, Jan Wildenhain <jan...@gm...> wrote: > Hi, > > I noticed some trivial python mixups in the perl openbabel example. Here is > a working version: > > use Chemistry::OpenBabel; > > my $obconversion = new Chemistry::OpenBabel::OBConversion; > $obconversion->SetInFormat("sdf"); > my $obmol = new Chemistry::OpenBabel::OBMol; > > my $notatend = $obconversion->ReadFile($obmol, $ARGV[0]); > while ($notatend) { > print $obmol->GetMolWt(), "\n"; > $obmol->Clear(); > $notatend = $obconversion->Read($obmol); > } > > > > -- > ************************************************************* > Jan Wildenhain tel: +1-416-586 4800 # 2867 > Bioinformatics BSc (Hons) email: jan...@gm... > Tyers Lab > Samuel Lunenfeld Research Institute > Mount Sinai Hospital > 600 University Avenue > Toronto, Ontario > M5G 1X5 > Canada http://www.mshri.on.ca/tyers/ > ************************************************************* > ------------------------------------------------------------------------- > 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: Jan W. <jan...@gm...> - 2006-11-14 16:26:48
|
Hi, I noticed some trivial python mixups in the perl openbabel example. Here is a working version: use Chemistry::OpenBabel; my $obconversion = new Chemistry::OpenBabel::OBConversion; $obconversion->SetInFormat("sdf"); my $obmol = new Chemistry::OpenBabel::OBMol; my $notatend = $obconversion->ReadFile($obmol, $ARGV[0]); while ($notatend) { print $obmol->GetMolWt(), "\n"; $obmol->Clear(); $notatend = $obconversion->Read($obmol); } -- ************************************************************* Jan Wildenhain tel: +1-416-586 4800 # 2867 Bioinformatics BSc (Hons) email: jan...@gm... Tyers Lab Samuel Lunenfeld Research Institute Mount Sinai Hospital 600 University Avenue Toronto, Ontario M5G 1X5 Canada http://www.mshri.on.ca/tyers/ ************************************************************* |
From: richard a. <ric...@ya...> - 2006-11-07 05:10:24
|
Hi Geoff, What a coincidence! In looking through the Java that your openbabel-java.i file generated (svn trunk rev 1584), I see the cause of the large filenames. The %module directive uses net.sourceforge.openbabel as the name. Change this to: %module openbabel The problems with long filenames will disappear. But that's not the biggest problem. The autogenerated java also wouldn't compile because it was defining things like: public interface net.sourceforge.openbabelJNI { ... } when it really should have been generating: package net.sourceforge.openbabel; public interface JNI { ... } and so on. Packages are more of a hassle than they're worth at this point. We can always get that part tidied up later. So when I run swig with the '%module openbabel' directive, I get to the same place I was before. That is, 32 java compile errors are produced. They involve these class definitions that can't be found: OBBitVec matrix3x3 OBAromaticTyper OBAtomTyper OBChainsParser In addition, 2 of these errors are apparently related to method duplication: OBSmartsPattern.java:107: RestrictedMatch(OBMol,SWIGTYPE_p_std__vectorTstd__pairTint_int_t_t,boolean) is already defined in OBSmartsPattern public boolean RestrictedMatch(OBMol mol, OBBitVec bv, boolean single) { ... OBSmartsPattern.java:111: RestrictedMatch(OBMol,SWIGTYPE_p_std__vectorTstd__pairTint_int_t_t) is already defined in OBSmartsPattern public boolean RestrictedMatch(OBMol mol, OBBitVec bv) { ... cheers, Rich --- Geoffrey Hutchison <ge...@ge...> wrote: > > On Nov 5, 2006, at 9:03 PM, richard apodaca wrote: > > > I know Java is technically not a scripting > language, > > but I was wondering if anyone was interested in > trying > > to get a Java interface to OB working. > > Actually, there are SWIG generated files for Java in > the current SVN > head (much like you describe). > > I had to do some renaming though -- the filenames > are so huge that > they can't be archived by tar (i.e., for generating > snapshots and > releases). I haven't updated the Makefile to do this > automatically yet. > > > (6) on line 1 of openbabel_java.cpp, add #include > > <math.h> > > Actually, you can automate this by adding to > openbabel-java.i > > > [produces 32 errors about missing classes such as > > OBChainsParser, OBBitVec, matrix3x3, > OBAromaticTyper, > > and so on.] > > If you can get me a full list, I'll definitely hack > the SWIG > interface file to generate these. > > Cheers, > -Geoff > ____________________________ Richard Apodaca Blog: http://depth-first.com ____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail. http://new.mail.yahoo.com |
From: Geoffrey H. <ge...@ge...> - 2006-11-06 15:25:15
|
On Nov 5, 2006, at 9:03 PM, richard apodaca wrote: > I know Java is technically not a scripting language, > but I was wondering if anyone was interested in trying > to get a Java interface to OB working. Actually, there are SWIG generated files for Java in the current SVN head (much like you describe). I had to do some renaming though -- the filenames are so huge that they can't be archived by tar (i.e., for generating snapshots and releases). I haven't updated the Makefile to do this automatically yet. > (6) on line 1 of openbabel_java.cpp, add #include > <math.h> Actually, you can automate this by adding to openbabel-java.i > [produces 32 errors about missing classes such as > OBChainsParser, OBBitVec, matrix3x3, OBAromaticTyper, > and so on.] If you can get me a full list, I'll definitely hack the SWIG interface file to generate these. Cheers, -Geoff |
From: richard a. <ric...@ya...> - 2006-11-06 07:11:17
|
I'd like to get Open Babel Perl working on my system: amd64 Linux Mandriva 2007 svn trunk rev 1578 perl 5.8.8 Here's what I'm doing: (1) cd into scripts/perl (2) $ perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Chemistry::OpenBabel (3) $ make cp OpenBabel.pm blib/lib/Chemistry/OpenBabel.pm g++ -c -I../../src -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -DVERSION=\"1.2.0\" -DXS_VERSION=\"1.2.0\" -fPIC "-I/usr/lib/perl5/5.8.8/x86_64-linux/CORE" openbabel_perl.cpp cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++ ../../src/residue.h:194: error: expected unqualified-id before void ../../src/residue.h:194: error: expected `)' before void ../../src/residue.h:194: error: expected `)' before void ../../src/residue.h:195: error: expected unqualified-id before void ../../src/residue.h:195: error: expected `)' before void ../../src/residue.h:195: error: expected `)' before void openbabel_perl.cpp: In function int _wrap_THR_get(SV*, MAGIC*): openbabel_perl.cpp:2838: error: expected unqualified-id before ( token make: *** [openbabel_perl.o] Error 1 I've had a look at residue.h:194 and it consists of this line: static const unsigned int THR = 5; This statement is flanked by about half a dozen others like it above and below that are not flagged. Any ideas? thanks, Rich ____________________________ Richard Apodaca Blog: http://depth-first.com ____________________________________________________________________________________ Sponsored Link Free Uniden 5.8GHz Phone System with Packet8 Internet Phone Service http://www.getpacket8.net/yahoo2 |
From: richard a. <ric...@ya...> - 2006-11-06 02:04:03
|
I know Java is technically not a scripting language, but I was wondering if anyone was interested in trying to get a Java interface to OB working. I'm in the process of trying to do this. I've managed to get somewhere interesting, but I'm now stuck. I'm hoping that someone that knows more about this stuff than me can give a pointer or two. I know next to nothing about SWIG, C++, make, etc., so any information would be helpful. I'm using OB svn trunk rev 1587, amd64 Linux Mandriva 2007, SWIG 1.3.29. Here's what I've done so far: (1) cd scripts (2) mkdir java (3) cd java (4) swig -java -c++ -I../../src -o openbabel_java.cpp ../openbabel.i [This generates a bunch of *.java files and openbabel_java.cpp] (5) g++ -fpic -c openbabel_java.cpp -I/usr/java/jdk1.5.0_09/include -I/usr/java/jdk1.5.0_09/include/linux -I/usr/local/include/openbabel-2.0 -I/usr/local/include/openbabel-2.0/openbabel [this produces errors about sqrt, so I add a #include] (6) on line 1 of openbabel_java.cpp, add #include <math.h> (7) repeat step (5) - no errors this time (8) ld -G openbabel_java.o -o openbabel_java.so (9) javac *.java [produces 32 errors about missing classes such as OBChainsParser, OBBitVec, matrix3x3, OBAromaticTyper, and so on.] In looking at the java directory, I can see that none of the corresponding *.java files were created so. However, there are files such as OBMol.java. In the 32 errors I got after javac, none of them related to OBMol, or any of the other classes for which the *.java file is defined - as far as I can tell. So I conclude that for some reason SWIG is not generating the needed *.java files OBChainsParser.java, OBBitVec.java, etc, and their corresponding classes. I've tried adding #include and %import, %include, and %import for 'bitvec.h', but this still does not produce the OBBitVec.java file that seems to be needed. It looks like this is really close to working - it's just a matter of getting SWIG to generate these few java classes. Any ideas? cheers, Rich ____________________________ Richard Apodaca Blog: http://depth-first.com __________________________________________________________________________________________ Check out the New Yahoo! Mail - Fire up a more powerful email and get things done faster. (http://advision.webevents.yahoo.com/mailbeta) |
From: S J. S. <swa...@gm...> - 2006-11-05 23:28:58
|
I get a similar set fault with: >>> c.SetInAndOutFormats('smiles', 'smi') On 11/5/06, richard apodaca <ric...@ya...> wrote: > I get a segmentation fault on exiting interactive > python after using CML: > > >>> import openbabel > >>> mol=openbabel.OBMol() > >>> c=openbabel.OBConversion() > >>> c.SetInAndOutFormats('smiles', 'cml') > True > >>> c.ReadString(mol, 'c1ccccc1') > True > >>> print c.WriteString(mol) > <molecule> > <atomArray> > <atom id="a1" elementType="C"/> > <atom id="a2" elementType="C"/> > <atom id="a3" elementType="C"/> > <atom id="a4" elementType="C"/> > <atom id="a5" elementType="C"/> > <atom id="a6" elementType="C"/> > </atomArray> > <bondArray> > <bond atomRefs2="a1 a2" order="1"/> > <bond atomRefs2="a2 a3" order="2"/> > <bond atomRefs2="a3 a4" order="1"/> > <bond atomRefs2="a4 a5" order="2"/> > <bond atomRefs2="a5 a6" order="1"/> > <bond atomRefs2="a1 a6" order="2"/> > </bondArray> > </molecule> > > >>>#pressed [Ctrl-d] > Segmentation fault > > My system is amd64 Linux (Mandriva 2007), Python 2.4.3 > and Open Babel SVN trunk rev 1578. > > Running the above code with input set to 'smi' and > output set to 'inchi' causes no segfault on exiting > interactive python. > > I see a similar CML-releated problem when running > OBRuby. In that case, I also don't get the segfault > until interactive Ruby exits, or the Ruby interpreter > finished executing. And there, I only see the problem > when using CML, not with other format > interconversions. > > Any ideas? > > thanks, > Rich > > ____________________________ > Richard Apodaca > Blog: http://depth-first.com > > > > ____________________________________________________________________________________ > Want to start your own business? Learn how on Yahoo! Small Business > (http://smallbusiness.yahoo.com) > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |