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: laurent.personal <lau...@gm...> - 2009-03-18 10:04:05
|
Hello I am using openbabel for a project (convert molec in different formats ...). Besides, I have to do some scripts in order to modify some molecules of my DB. I use pybel to do this. My problem is that pybel automatically changes some atomic types in molecule of my DB ... and it shouldn't do it. It replaces some carbons (C2 or others) by the type C.cat. The last is for the guanidium group but I don't have a such group in my DB. I did a basic script in order to verify this : [quote] #!/usr/bin/python import openbabel import pybel for mol in pybel.readfile("mol2", "molec_test.mol2"): outputfile = pybel.Outputfile("mol2", "molec_pybel.mol2", overwrite=True) outputfile.write(mol) outputfile.close() [/quote] The input/output structure files are uploaded here. http://www.nabble.com/file/p22574797/molec_pybel.mol2 molec_pybel.mol2 http://www.nabble.com/file/p22574797/molec_test.mol2 molec_test.mol2 Can we read a molecule with pybel with an option "read only the mol2 file without changing anything" ? TIA for your answer, Cheers, Laurent -- View this message in context: http://www.nabble.com/-OpenBabel---Pybel--Atomic-Types-Automatically-Changed-tp22574797p22574797.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |
From: Noel O'B. <bao...@gm...> - 2009-03-13 12:27:14
|
Assuming that you already have the coordinates of the ligand in relation to the protein, you can script this quite easily. You just need to write a loop over the atoms of the ligand, and another loop over the atoms of the protein, see if they have the right atom types for hydrogen bonding (atom types are available from OB), and see if the heavy atom distance is < 3.0 or 3.1 Ang distance. In fact, I'd like to have a script that does this too, so if you send me (off list) an example PDB and ligand file, I will throw a prototype script together and report back to the list. An alternative is PyMol, which I guess has automatic hydrogen bond detection or so (I have never used PyMol so I'm not sure). Regards, Noel 2009/3/12 Steven Platt <Ste...@hp...>: > Hi, > > Given a small carbohydrate ligand and a relatively large protein, can > OpenBabel calculate the hydrogen bonds between these two molecules and > report them to a file? > > I realise that there are GUIs that will do this, but I’ve got dozens of > ligand/protein combinations and would like to script the process. > > It’s worth saying that I’ve got no experience with OB, so simple answers > please. > > Thanks > > Steve > > Dr Steven Platt > > Bioinformatics Support Coordinator > > Statistics, Modelling and Bioinformatics > > Health Protection Agency > > Centre for Infections > > 61 Colindale Avenue > > London > > NW9 5EQ > > 0208 327 6618 > > www.hpa.org.uk/bioinformatics > > ________________________________ > > ************************************************************************** > The information contained in the EMail and any attachments is confidential > and intended solely and for the attention and use of the named addressee(s). > It may not be disclosed to any other person without the express authority of > the HPA, or the intended recipient, or both. If you are not the intended > recipient, you must not disclose, copy, distribute or retain this message or > any part of it. This footnote also confirms that this EMail has been swept > for computer viruses, but please re-sweep any attachments before opening or > saving. HTTP://www.HPA.org.uk > ************************************************************************** > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > |
From: Steven P. <Ste...@HP...> - 2009-03-12 10:01:48
|
Hi, Given a small carbohydrate ligand and a relatively large protein, can OpenBabel calculate the hydrogen bonds between these two molecules and report them to a file? I realise that there are GUIs that will do this, but I've got dozens of ligand/protein combinations and would like to script the process. It's worth saying that I've got no experience with OB, so simple answers please. Thanks Steve Dr Steven Platt Bioinformatics Support Coordinator Statistics, Modelling and Bioinformatics Health Protection Agency Centre for Infections 61 Colindale Avenue London NW9 5EQ 0208 327 6618 www.hpa.org.uk/bioinformatics ----------------------------------------- ************************************************************************** The information contained in the EMail and any attachments is confidential and intended solely and for the attention and use of the named addressee(s). It may not be disclosed to any other person without the express authority of the HPA, or the intended recipient, or both. If you are not the intended recipient, you must not disclose, copy, distribute or retain this message or any part of it. This footnote also confirms that this EMail has been swept for computer viruses, but please re-sweep any attachments before opening or saving. HTTP://www.HPA.org.uk ************************************************************************** |
From: Noel O'B. <bao...@gm...> - 2009-03-04 20:35:55
|
Hello Bob, I've just written some installation instructions for OBDotNet. Please find them at http://openbabel.org/wiki/OBDotNet Let us know if you have any further problems. - Noel 2009/2/20 Bob Trucchi <Bob...@co...>: > I'm having some troubles with getting OBDotNet to work and am hoping for > some help. I have OpenBable-2.2.0 installed and am using VS 2008 sp1. I made > the simplest program > > using System; > using OpenBabel; > > namespace OpenBabelTesting > { > class Program > { > static void Main(string[] args) > { > OBConversion obc = new OBConversion(); > } > > } > } > and when I run it I get this exception: > System.TypeInitializationException was unhandled > Message="The type initializer for 'OpenBabel.openbabelPINVOKE' threw an > exception." > Source="OBDotNet" > TypeName="OpenBabel.openbabelPINVOKE" > StackTrace: > at OpenBabel.openbabelPINVOKE.new_OBConversion__SWIG_2() > at OpenBabel.OBConversion..ctor() > at OpenBabelTesting.Program.Main(String[] args) in > C:\Projects\Constellation.HTS\ChemRegistration\OpenBabelTesting\Program.cs:line > 10 > at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) > at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence > assemblySecurity, String[] args) > at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() > at System.Threading.ThreadHelper.ThreadStart_Context(Object state) > at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, > ContextCallback callback, Object state) > at System.Threading.ThreadHelper.ThreadStart() > InnerException: System.TypeInitializationException > Message="The type initializer for 'SWIGExceptionHelper' threw an exception." > Source="OBDotNet" > TypeName="SWIGExceptionHelper" > StackTrace: > at OpenBabel.openbabelPINVOKE.SWIGExceptionHelper..ctor() > at OpenBabel.openbabelPINVOKE..cctor() > InnerException: System.DllNotFoundException > Message="Unable to load DLL 'openbabel': The specified module could not be > found. (Exception from HRESULT: 0x8007007E)" > Source="OBDotNet" > TypeName="" > StackTrace: > at > OpenBabel.openbabelPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_openbabel(ExceptionDelegate > applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate > divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, > ExceptionDelegate invalidCastDelegate, ExceptionDelegate > invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate > nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, > ExceptionDelegate overflowDelegate, ExceptionDelegate > systemExceptionDelegate) > at OpenBabel.openbabelPINVOKE.SWIGExceptionHelper..cctor() > InnerException: > > I thought it had something to do with openbabel.dll but I could not add it > as a reference to my project or the GAC. Any ideas? > > Thanks in advance, > Bob > > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > |
From: Geoffrey H. <ge...@ge...> - 2009-03-04 18:53:32
|
On Feb 20, 2009, at 10:35 AM, Bob Trucchi wrote: > I'm having some troubles with getting OBDotNet to work and am hoping > for some help. I have OpenBable-2.2.0 installed and am using VS 2008 > sp1. I made the simplest program Have you tried 2.2.1? The OBDotNet code has been significantly improved. Cheers, -Geoff |
From: Bob T. <Bob...@co...> - 2009-02-20 17:09:44
|
I'm having some troubles with getting OBDotNet to work and am hoping for some help. I have OpenBable-2.2.0 installed and am using VS 2008 sp1. I made the simplest program using System; using OpenBabel; namespace OpenBabelTesting { class Program { static void Main(string[] args) { OBConversion obc = new OBConversion(); } } } and when I run it I get this exception: System.TypeInitializationException was unhandled Message="The type initializer for 'OpenBabel.openbabelPINVOKE' threw an exception." Source="OBDotNet" TypeName="OpenBabel.openbabelPINVOKE" StackTrace: at OpenBabel.openbabelPINVOKE.new_OBConversion__SWIG_2() at OpenBabel.OBConversion..ctor() at OpenBabelTesting.Program.Main(String[] args) in C:\Projects\Constellation.HTS\ChemRegistration\OpenBabelTesting\Program.cs:line 10 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.TypeInitializationException Message="The type initializer for 'SWIGExceptionHelper' threw an exception." Source="OBDotNet" TypeName="SWIGExceptionHelper" StackTrace: at OpenBabel.openbabelPINVOKE.SWIGExceptionHelper..ctor() at OpenBabel.openbabelPINVOKE..cctor() InnerException: System.DllNotFoundException Message="Unable to load DLL 'openbabel': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" Source="OBDotNet" TypeName="" StackTrace: at OpenBabel.openbabelPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_openbabel(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate) at OpenBabel.openbabelPINVOKE.SWIGExceptionHelper..cctor() InnerException: I thought it had something to do with openbabel.dll but I could not add it as a reference to my project or the GAC. Any ideas? Thanks in advance, Bob |
From: Noel O'B. <bao...@gm...> - 2009-02-18 21:28:30
|
Hello Xavier, Pybel does not allow assignment of coordinate values (the next version will raise an error when you try, instead of failing silently). To set the coordinates you need to use the SetVector() method of the underlying OBAtom, e.g. >>> mol = pybel.readstring("smi", "CCC") >>> mol.make3D() >>> mol.atoms[0].coords (0.9762193757974641, -0.018350366821008612, 0.0057426618097852662) >>> a = mol.atoms[0].OBAtom >>> a.SetVector(1,2,3) >>> mol.atoms[0].coords (1.0, 2.0, 3.0) >>> Perhaps I will add setting coordinates as a feature in a future version of Pybel? - Noel 2009/2/18 Xavier Prat-Resina <xav...@gm...>: > Hi, > > I'm trying to change the coordinates of a molecule using > the coordinates from another file: > > gaussbel = pybel.readfile("g03", "myfile.g03").next() > molbel = pybel.readfile("mol", "myfile.mol").next() > > If I try to change the coordinates directly: > molbel.atoms[0].coords[0] = gaussbel.atoms[0].coords[0] > it gives > TypeError: 'tuple' object does not support item assignment > > I can loop over atoms: > > for atom in molbel: > (assign x,y,z) > atom.coords = numpy.array([x,y,z], "float64") > > but then, how can I update the molbel molecule with the new atom.coords? > > I know I'm missing something very simple. > Sorry for such naive questions :) > > Xavier > > -- > Xavier Prat-Resina > Research Associate > Journal of Chemical Education and University of Wisconsin > 209 N. Brooks St. Madison, WI 53715-1116 > > Tel: 608 8901702 // Fax: 608 2627145 > e-mail: xavier ( ) chem.wisc.edu ; skype: xavierprat > http://x.prat.resina.googlepages.com > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > |
From: Xavier Prat-R. <xav...@gm...> - 2009-02-18 17:59:59
|
Hi, I'm trying to change the coordinates of a molecule using the coordinates from another file: gaussbel = pybel.readfile("g03", "myfile.g03").next() molbel = pybel.readfile("mol", "myfile.mol").next() If I try to change the coordinates directly: molbel.atoms[0].coords[0] = gaussbel.atoms[0].coords[0] it gives TypeError: 'tuple' object does not support item assignment I can loop over atoms: for atom in molbel: (assign x,y,z) atom.coords = numpy.array([x,y,z], "float64") but then, how can I update the molbel molecule with the new atom.coords? I know I'm missing something very simple. Sorry for such naive questions :) Xavier -- Xavier Prat-Resina Research Associate Journal of Chemical Education and University of Wisconsin 209 N. Brooks St. Madison, WI 53715-1116 Tel: 608 8901702 // Fax: 608 2627145 e-mail: xavier ( ) chem.wisc.edu ; skype: xavierprat http://x.prat.resina.googlepages.com |
From: Noel O'B. <bao...@gm...> - 2009-01-08 16:31:17
|
Sorry - my mistake. This is clearly a different issue. I don't seem to have any record of the original email (01/07/09). Good to hear it's working though :-) Noel 2009/1/8 Noel O'Boyle <bao...@gm...>: > Am confused. The original issue was resolved at the time (24/10/08). > It was due to the fact that python didn't remove the build directory > when you changed versions of GCC. > > Noel > > 2009/1/8 Nick England <nic...@gm...>: >> Interestingly I have now got it to compile and work fine, after >> compiling and using GCC 4.3.2. >> >> Were there any important changes from GCC 4.2.1 to 4.3.2 which would >> affect the python bindings compiling? Seems like a strange error. >> >> - Nick England >> >> 2009/1/7 Nick England <nic...@gm...>: >>> My system was recently upgraded to 10.3 from 10.2 since 10.2 was out of support. >>> >>> I had to reinstall openbabel, and I had no problems compiling and >>> running babel itself (both the 2.2.0 release and the SVN version both >>> work fine.) >>> >>> However, when I try to compile the python bindings, I get the attached >>> error log from >>> >>> python setup.up build >>> >>> A few google searches seems to show similar problems which were fixed >>> by altering the source code, but I am assuming it is working for other >>> people so there must be something wrong with my system? >>> >>> Any ideas as to what the problem is? >>> >>> gcc version is gcc (GCC) 4.2.1 (SUSE Linux) >>> >>> Thanks, >>> >>> Nick England >>> >> >> ------------------------------------------------------------------------------ >> Check out the new SourceForge.net Marketplace. >> It is the best place to buy or sell services for >> just about anything Open Source. >> http://p.sf.net/sfu/Xq1LFB >> _______________________________________________ >> OpenBabel-scripting mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting >> > |
From: Noel O'B. <bao...@gm...> - 2009-01-08 16:30:43
|
Am confused. The original issue was resolved at the time (24/10/08). It was due to the fact that python didn't remove the build directory when you changed versions of GCC. Noel 2009/1/8 Nick England <nic...@gm...>: > Interestingly I have now got it to compile and work fine, after > compiling and using GCC 4.3.2. > > Were there any important changes from GCC 4.2.1 to 4.3.2 which would > affect the python bindings compiling? Seems like a strange error. > > - Nick England > > 2009/1/7 Nick England <nic...@gm...>: >> My system was recently upgraded to 10.3 from 10.2 since 10.2 was out of support. >> >> I had to reinstall openbabel, and I had no problems compiling and >> running babel itself (both the 2.2.0 release and the SVN version both >> work fine.) >> >> However, when I try to compile the python bindings, I get the attached >> error log from >> >> python setup.up build >> >> A few google searches seems to show similar problems which were fixed >> by altering the source code, but I am assuming it is working for other >> people so there must be something wrong with my system? >> >> Any ideas as to what the problem is? >> >> gcc version is gcc (GCC) 4.2.1 (SUSE Linux) >> >> Thanks, >> >> Nick England >> > > ------------------------------------------------------------------------------ > Check out the new SourceForge.net Marketplace. > It is the best place to buy or sell services for > just about anything Open Source. > http://p.sf.net/sfu/Xq1LFB > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Nick E. <nic...@gm...> - 2009-01-08 16:21:47
|
Interestingly I have now got it to compile and work fine, after compiling and using GCC 4.3.2. Were there any important changes from GCC 4.2.1 to 4.3.2 which would affect the python bindings compiling? Seems like a strange error. - Nick England 2009/1/7 Nick England <nic...@gm...>: > My system was recently upgraded to 10.3 from 10.2 since 10.2 was out of support. > > I had to reinstall openbabel, and I had no problems compiling and > running babel itself (both the 2.2.0 release and the SVN version both > work fine.) > > However, when I try to compile the python bindings, I get the attached > error log from > > python setup.up build > > A few google searches seems to show similar problems which were fixed > by altering the source code, but I am assuming it is working for other > people so there must be something wrong with my system? > > Any ideas as to what the problem is? > > gcc version is gcc (GCC) 4.2.1 (SUSE Linux) > > Thanks, > > Nick England > |
From: Nick E. <nic...@gm...> - 2009-01-07 16:05:42
|
My system was recently upgraded to 10.3 from 10.2 since 10.2 was out of support. I had to reinstall openbabel, and I had no problems compiling and running babel itself (both the 2.2.0 release and the SVN version both work fine.) However, when I try to compile the python bindings, I get the attached error log from python setup.up build A few google searches seems to show similar problems which were fixed by altering the source code, but I am assuming it is working for other people so there must be something wrong with my system? Any ideas as to what the problem is? gcc version is gcc (GCC) 4.2.1 (SUSE Linux) Thanks, Nick England |
From: Noel O'B. <bao...@gm...> - 2008-12-17 09:24:57
|
2008/12/16 Nathan Rice <exn...@gm...>: >> It shouldn't be necessary to to copy libopenbabel.so anywhere. Don't >> the instructions in the readme describe how to set LD_LIBRARY_PATH to >> point to the directory containing libopenbabel.so? Have you tried >> this? > > I did try that, I have two copies of libopenbabel.so, one which was created > and installed on initial make install of the core package (filesize ~12M), > and a second one which was in my scripts/java/ directory (filesize ~2M). > The one that is in my scripts/java directory is the one that has to be in > the same directory as OBTest. The LD_LIBRARY_PATH points to the other one. > Is this incorrect? The two libopenbabel.so files are different (we should probably rename the small one). As described in the README, the PATHs to both should be added to LD_LIBRARY_PATH (in the order shown in the README - this is important). It shouldn't be necessary to use LD_PRELOAD if these are set correctly. If this is done, it might help solve your problems with Eclipse also. BTW, you are unlikely to get a useful response over at openbabel-discuss, as very few people will be using the Java bindings, which were only released in an experimental form in the last OB release. - Noel |
From: Noel O'B. <bao...@gm...> - 2008-12-16 23:29:34
|
(please cc to the list - I may need help :-) ) 2008/12/16 Nathan Rice <exn...@gm...>: > Thanks so much for the fast reply Noel. > > Everything works for other users if they point their classpath to the > uncompressed contents of openbabel.jar and copy the compiled libopenbabel.so > file to the directory that contains the OBTest program. So if you're busy I > should be ok now :) It shouldn't be necessary to to copy libopenbabel.so anywhere. Don't the instructions in the readme describe how to set LD_LIBRARY_PATH to point to the directory containing libopenbabel.so? Have you tried this? > If the classpath is set to point to either the directory which contains > openbabel.jar, and the archive itself (as in the directions) or both, a > classdefnotfound error occurs: > > nathan@acelot2:~/test$ ls > libopenbabel.so OBTest.java openbabel.jar > nathan@acelot2:~/test$ pwd > /home/nathan/test > nathan@acelot2:~/test$ echo $CLASSPATH > /home/nathan/test/openbabel.jar:/home/nathan/test > nathan@acelot2:~/test$ LD_PRELOAD=$OB_LIBDIR/libopenbabel.so $JAVA/bin/java > OBTest > Exception in thread "main" java.lang.NoClassDefFoundError: OBTest > Caused by: java.lang.ClassNotFoundException: OBTest > at java.net.URLClassLoader$1.run(URLClassLoader.java:200) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) If you've sent me the correct commands and output, the problem is that Java cannot find OBTest.class. You need to compile the OBTest.java file first. > If I change the classpath to point to the extracted contents of the jar, it > works perfectly. I imagine that is probably an issue on my end, just seemed > a little strange. I am using ubuntu (hardy) x86, for reference if that is > helpful. I still cannot figure this part out...maybe I've included OBTest.class by accident in the jar file...? > Happy Holidays, > Nathan > > On Tue, Dec 16, 2008 at 6:50 AM, Noel O'Boyle <bao...@gm...> wrote: >> >> Hello Nathan, >> >> If I understand you correctly, you are using the OpenBabel Java >> bindings available from Cinfony along with OpenBabel 2.2.0 (the next >> release of OpenBabel will include the Jar file directly). It shouldn't >> be necessary to extract the jar file. Just add it to your CLASSPATH >> and it should work. >> >> Regarding making it all available to all users on the system, it is >> just a question of setting the environment variables as described in >> the README. If it works for you, it should work for other users in the >> same way. The best way to test is to copy the test program to a new >> directory, and see whether you can compile and run it there. >> >> If it doesn't work for you, please describe exactly what OS you're >> using, what commands you used, and where it failed. >> >> Regards, >> Noel >> >> 2008/12/16 Noel O'Boyle <bao...@gm...>: >> > Forwarding to list... >> > >> > ---------- Forwarded message ---------- >> > From: Nathan Rice <exn...@gm...> >> > Date: 2008/12/16 >> > Subject: java bindings installation question >> > To: bao...@gm... >> > >> > >> > Hello, >> > >> > I went through the entire installation process described in the README >> > file for the installation of the java bindings as a non root user, and >> > successfully ran the test program (after extracting the jar file into >> > the classpath to solve some classdefnotfound errors). A >> > libopenbabel.so file was created in the script directory with a >> > filesize of about 2 megabytes. I would like the bindings to be >> > available to all users on the system, are there additional >> > installation steps that I can do so that users only have to call the >> > library from within java without having to copy/move/etc anything? >> > >> > Thank you for any help you can provide, >> > >> > Nathan Rice >> > > > |
From: Nathan R. <exn...@gm...> - 2008-12-16 22:38:08
|
I had some other issues which I posted to the openbabel-discussion list, I hope that wasn't the wrong place to post them - some java bindings stuff on nabble archives came up there so I went ahead and posted it. On Tue, Dec 16, 2008 at 1:30 PM, Noel O'Boyle <bao...@gm...> wrote: > (please cc to the list - I may need help :-) ) > > 2008/12/16 Nathan Rice <exn...@gm...>: > > Thanks so much for the fast reply Noel. > > > > Everything works for other users if they point their classpath to the > > uncompressed contents of openbabel.jar and copy the compiled > libopenbabel.so > > file to the directory that contains the OBTest program. So if you're > busy I > > should be ok now :) > > It shouldn't be necessary to to copy libopenbabel.so anywhere. Don't > the instructions in the readme describe how to set LD_LIBRARY_PATH to > point to the directory containing libopenbabel.so? Have you tried > this? > I did try that, I have two copies of libopenbabel.so, one which was created and installed on initial make install of the core package (filesize ~12M), and a second one which was in my scripts/java/ directory (filesize ~2M). The one that is in my scripts/java directory is the one that has to be in the same directory as OBTest. The LD_LIBRARY_PATH points to the other one. Is this incorrect? > > If the classpath is set to point to either the directory which contains > > openbabel.jar, and the archive itself (as in the directions) or both, a > > classdefnotfound error occurs: > > > > nathan@acelot2:~/test$ ls > > libopenbabel.so OBTest.java openbabel.jar > > nathan@acelot2:~/test$ pwd > > /home/nathan/test > > nathan@acelot2:~/test$ echo $CLASSPATH > > /home/nathan/test/openbabel.jar:/home/nathan/test > > nathan@acelot2:~/test$ LD_PRELOAD=$OB_LIBDIR/libopenbabel.so > $JAVA/bin/java > > OBTest > > Exception in thread "main" java.lang.NoClassDefFoundError: OBTest > > Caused by: java.lang.ClassNotFoundException: OBTest > > at java.net.URLClassLoader$1.run(URLClassLoader.java:200) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) > > If you've sent me the correct commands and output, the problem is that > Java cannot find OBTest.class. You need to compile the OBTest.java > file first. > > > If I change the classpath to point to the extracted contents of the jar, > it > > works perfectly. I imagine that is probably an issue on my end, just > seemed > > a little strange. I am using ubuntu (hardy) x86, for reference if that > is > > helpful. > > I still cannot figure this part out...maybe I've included OBTest.class > by accident in the jar file...? > I went back and checked this, since you are totally right about that error, and it looks like I probably copied the OBTest.class there accidentally at some point. Glad I'm just being a tard on that account. > > > Happy Holidays, > > > Nathan > > > > On Tue, Dec 16, 2008 at 6:50 AM, Noel O'Boyle <bao...@gm...> > wrote: > >> > >> Hello Nathan, > >> > >> If I understand you correctly, you are using the OpenBabel Java > >> bindings available from Cinfony along with OpenBabel 2.2.0 (the next > >> release of OpenBabel will include the Jar file directly). It shouldn't > >> be necessary to extract the jar file. Just add it to your CLASSPATH > >> and it should work. > >> > >> Regarding making it all available to all users on the system, it is > >> just a question of setting the environment variables as described in > >> the README. If it works for you, it should work for other users in the > >> same way. The best way to test is to copy the test program to a new > >> directory, and see whether you can compile and run it there. > >> > >> If it doesn't work for you, please describe exactly what OS you're > >> using, what commands you used, and where it failed. > >> > >> Regards, > >> Noel > >> > >> 2008/12/16 Noel O'Boyle <bao...@gm...>: > >> > Forwarding to list... > >> > > >> > ---------- Forwarded message ---------- > >> > From: Nathan Rice <exn...@gm...> > >> > Date: 2008/12/16 > >> > Subject: java bindings installation question > >> > To: bao...@gm... > >> > > >> > > >> > Hello, > >> > > >> > I went through the entire installation process described in the README > >> > file for the installation of the java bindings as a non root user, and > >> > successfully ran the test program (after extracting the jar file into > >> > the classpath to solve some classdefnotfound errors). A > >> > libopenbabel.so file was created in the script directory with a > >> > filesize of about 2 megabytes. I would like the bindings to be > >> > available to all users on the system, are there additional > >> > installation steps that I can do so that users only have to call the > >> > library from within java without having to copy/move/etc anything? > >> > > >> > Thank you for any help you can provide, > >> > > >> > Nathan Rice > >> > > > > > > |
From: Noel O'B. <bao...@gm...> - 2008-12-16 14:53:57
|
Hello Nathan, If I understand you correctly, you are using the OpenBabel Java bindings available from Cinfony along with OpenBabel 2.2.0 (the next release of OpenBabel will include the Jar file directly). It shouldn't be necessary to extract the jar file. Just add it to your CLASSPATH and it should work. Regarding making it all available to all users on the system, it is just a question of setting the environment variables as described in the README. If it works for you, it should work for other users in the same way. The best way to test is to copy the test program to a new directory, and see whether you can compile and run it there. If it doesn't work for you, please describe exactly what OS you're using, what commands you used, and where it failed. Regards, Noel 2008/12/16 Noel O'Boyle <bao...@gm...>: > Forwarding to list... > > ---------- Forwarded message ---------- > From: Nathan Rice <exn...@gm...> > Date: 2008/12/16 > Subject: java bindings installation question > To: bao...@gm... > > > Hello, > > I went through the entire installation process described in the README > file for the installation of the java bindings as a non root user, and > successfully ran the test program (after extracting the jar file into > the classpath to solve some classdefnotfound errors). A > libopenbabel.so file was created in the script directory with a > filesize of about 2 megabytes. I would like the bindings to be > available to all users on the system, are there additional > installation steps that I can do so that users only have to call the > library from within java without having to copy/move/etc anything? > > Thank you for any help you can provide, > > Nathan Rice > |
From: Noel O'B. <bao...@gm...> - 2008-12-16 14:40:37
|
Forwarding to list... ---------- Forwarded message ---------- From: Nathan Rice <exn...@gm...> Date: 2008/12/16 Subject: java bindings installation question To: bao...@gm... Hello, I went through the entire installation process described in the README file for the installation of the java bindings as a non root user, and successfully ran the test program (after extracting the jar file into the classpath to solve some classdefnotfound errors). A libopenbabel.so file was created in the script directory with a filesize of about 2 megabytes. I would like the bindings to be available to all users on the system, are there additional installation steps that I can do so that users only have to call the library from within java without having to copy/move/etc anything? Thank you for any help you can provide, Nathan Rice |
From: Noel O'B. <bao...@gm...> - 2008-12-09 17:55:04
|
Chris made the point this bug has already been fixed in r2700. All you need to do to fix it yourself is to remove the word "return" at line 237 (or so) in obiter.cpp as shown here: http://openbabel.svn.sf.net/viewvc/openbabel/openbabel/trunk/src/obiter.cpp?r1=2627&r2=2700&pathrev=2700 Just rerun "make" and "make install" (no need to redo the configure), and the Python bindings should work straightaway (no need to recompile). Noel 2008/12/9 Noel O'Boyle <bao...@gm...>: > Hello Fredrik, > > I must admit that OBMol.Separate() usually causes a segfault for me > too, but I've never gotten around to reporting the bug. I've just > tested it a little bit. It seems that separating a methane is fine, > but separating ethane causes a segault. > >>>> import pybel >>>> pybel.readstring("smi", "C").OBMol.Separate() > (<openbabel.OBMol; proxy of <Swig Object of type 'OpenBabel::OBMol *' at 0x12887 > 78> >,) >>>> pybel.readstring("smi", "CC").OBMol.Separate() > # It's a segger > > I'll file a bug. > > Noel > > > 2008/12/9 Noel O'Boyle <bao...@gm...>: >> ---------- Forwarded message ---------- >> From: <fre...@gm...> >> Date: 2008/12/9 >> Subject: Bus error using OBMol.Separate >> To: Cinfony <ci...@go...> >> >> Hi! >> >> I'm trying to use pybel from cinfony in order to find the different R- >> groups on a general scaffold. I have managed to delete the scaffold, >> leaving the R-groups as disconnected fragments in the molecule. >> However, when I tried to separate the fragments I ran into a bus >> error. The error appears every time I try to do .Separate() on a OBMol >> such as in the following code: >> >> from cinfony import pybel >> >> mol = pybel.readstring("smi", "[NH3+]c1ccccc1.[Cl-]") >> print "Initial molecule: ", mol.write("smi") >> mol.OBMol.StripSalts(2) >> print "After StripSalts(2): ", mol.write("smi") >> mol = pybel.readstring("smi", "[NH3+]c1ccccc1.[Cl-]") >> print "Back again: ", mol.write("smi") >> temp = mol.OBMol.Separate() >> for tempMol in temp: >> print "Fragment: ", tempMol.write("smi") >> >> Do you know what can be the problem, or should I rather post the >> question with OpenBabel? >> >> I'm running cinfony on an Intel Mac with 10.5.5 and Python2.5 from >> fink and OpenBabel 2.2.0 >> >> Kind regards, >> Fredrik Wallner >> >> --~--~---------~--~----~------------~-------~--~----~ >> You received this message because you are subscribed to the Google >> Groups "Cinfony" group. >> To post to this group, send email to ci...@go... >> To unsubscribe from this group, send email to >> cin...@go... >> For more options, visit this group at >> http://groups.google.com/group/cinfony?hl=en >> -~----------~----~----~----~------~----~------~--~--- >> > |
From: Noel O'B. <bao...@gm...> - 2008-12-09 13:52:26
|
Hello Fredrik, I must admit that OBMol.Separate() usually causes a segfault for me too, but I've never gotten around to reporting the bug. I've just tested it a little bit. It seems that separating a methane is fine, but separating ethane causes a segault. >>> import pybel >>> pybel.readstring("smi", "C").OBMol.Separate() (<openbabel.OBMol; proxy of <Swig Object of type 'OpenBabel::OBMol *' at 0x12887 78> >,) >>> pybel.readstring("smi", "CC").OBMol.Separate() # It's a segger I'll file a bug. Noel 2008/12/9 Noel O'Boyle <bao...@gm...>: > ---------- Forwarded message ---------- > From: <fre...@gm...> > Date: 2008/12/9 > Subject: Bus error using OBMol.Separate > To: Cinfony <ci...@go...> > > Hi! > > I'm trying to use pybel from cinfony in order to find the different R- > groups on a general scaffold. I have managed to delete the scaffold, > leaving the R-groups as disconnected fragments in the molecule. > However, when I tried to separate the fragments I ran into a bus > error. The error appears every time I try to do .Separate() on a OBMol > such as in the following code: > > from cinfony import pybel > > mol = pybel.readstring("smi", "[NH3+]c1ccccc1.[Cl-]") > print "Initial molecule: ", mol.write("smi") > mol.OBMol.StripSalts(2) > print "After StripSalts(2): ", mol.write("smi") > mol = pybel.readstring("smi", "[NH3+]c1ccccc1.[Cl-]") > print "Back again: ", mol.write("smi") > temp = mol.OBMol.Separate() > for tempMol in temp: > print "Fragment: ", tempMol.write("smi") > > Do you know what can be the problem, or should I rather post the > question with OpenBabel? > > I'm running cinfony on an Intel Mac with 10.5.5 and Python2.5 from > fink and OpenBabel 2.2.0 > > Kind regards, > Fredrik Wallner > > --~--~---------~--~----~------------~-------~--~----~ > You received this message because you are subscribed to the Google > Groups "Cinfony" group. > To post to this group, send email to ci...@go... > To unsubscribe from this group, send email to > cin...@go... > For more options, visit this group at > http://groups.google.com/group/cinfony?hl=en > -~----------~----~----~----~------~----~------~--~--- > |
From: Noel O'B. <bao...@gm...> - 2008-12-09 13:44:30
|
---------- Forwarded message ---------- From: <fre...@gm...> Date: 2008/12/9 Subject: Bus error using OBMol.Separate To: Cinfony <ci...@go...> Hi! I'm trying to use pybel from cinfony in order to find the different R- groups on a general scaffold. I have managed to delete the scaffold, leaving the R-groups as disconnected fragments in the molecule. However, when I tried to separate the fragments I ran into a bus error. The error appears every time I try to do .Separate() on a OBMol such as in the following code: from cinfony import pybel mol = pybel.readstring("smi", "[NH3+]c1ccccc1.[Cl-]") print "Initial molecule: ", mol.write("smi") mol.OBMol.StripSalts(2) print "After StripSalts(2): ", mol.write("smi") mol = pybel.readstring("smi", "[NH3+]c1ccccc1.[Cl-]") print "Back again: ", mol.write("smi") temp = mol.OBMol.Separate() for tempMol in temp: print "Fragment: ", tempMol.write("smi") Do you know what can be the problem, or should I rather post the question with OpenBabel? I'm running cinfony on an Intel Mac with 10.5.5 and Python2.5 from fink and OpenBabel 2.2.0 Kind regards, Fredrik Wallner --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cinfony" group. To post to this group, send email to ci...@go... To unsubscribe from this group, send email to cin...@go... For more options, visit this group at http://groups.google.com/group/cinfony?hl=en -~----------~----~----~----~------~----~------~--~--- |
From: Noel O'B. <bao...@gm...> - 2008-12-09 10:38:45
|
Hello David, The handling of descriptors changed between 2.1.0 and 2.2.0. It was decided to implement them as plugins so we didn't need to add a new class for every new descriptor. So the current API (at http://openbabel.org/api/2.2.0/classes.shtml) doesn't have an OBLogP class. Here's how you use them (just tested in OB2.2.0): my $obdesc = Chemistry::OpenBabel::OBDescriptor::FindType("LogP"); my $logp = $obdesc->Predict($obMol); print $logp."\n"; By the way, you are absolutely correct in how to add classes to SWIG. In this case, this isn't the problem. Regards, Noel 2008/12/8 David Rose <tom...@gm...>: > Hi: > 18 months ago or so I posted a question about using OBLogP from perl. I > turned out that support for the method had not been added to the perl > bindings; Geoff was good enough to cook up a version of Chemistry::OpenBabel > that supported the method, and I was all set. > Now I'm installing the latest version of OB on a new machine, and I've got > the same problem. Because Geoff was kind enough to fix it for me before, I > don't know how to fix it for myself this time, so I'm back; sorry about > that. > My understanding is that I need to make a change to openbabel-perl.i, > then configure openbabel using --enable-maintainer-mode, then build > openbabel and then build the perl bindings. What I don't know is what > changes I need to make to openbabel-perl.i. It appears that OBLogP is in > groupcontrib.h, so I tried adding > the following lines to openbabel-perl.i: > #include <openbabel/groupcontrib.h> > %include <openbabel/groupcontrib.h> > in places where similar include statements were located. Went through the > build steps without any errors but still no OBLogP. If it is not too > involved, can someone give me a quick tutorial on adding methods to the > bindings? > Thanks, > David Rose > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > |
From: David R. <tom...@gm...> - 2008-12-08 20:35:56
|
Hi: 18 months ago or so I posted a question about using OBLogP from perl. I turned out that support for the method had not been added to the perl bindings; Geoff was good enough to cook up a version of Chemistry::OpenBabel that supported the method, and I was all set. Now I'm installing the latest version of OB on a new machine, and I've got the same problem. Because Geoff was kind enough to fix it for me before, I don't know how to fix it for myself this time, so I'm back; sorry about that. My understanding is that I need to make a change to openbabel-perl.i, then configure openbabel using --enable-maintainer-mode, then build openbabel and then build the perl bindings. What I don't know is what changes I need to make to openbabel-perl.i. It appears that OBLogP is in groupcontrib.h, so I tried adding the following lines to openbabel-perl.i: #include <openbabel/groupcontrib.h> %include <openbabel/groupcontrib.h> in places where similar include statements were located. Went through the build steps without any errors but still no OBLogP. If it is not too involved, can someone give me a quick tutorial on adding methods to the bindings? Thanks, David Rose |
From: Brian B. <bri...@am...> - 2008-11-13 21:38:12
|
Hi Matt, It works! The key was dropping the whole folder contents into the debug folder as you said. Here is the working code in case there is some other VB soul out there: Imports OpenBabel Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim strFolder As String = "c:\Structures\" Dim OBConv As New OBConversion() Dim OBMol As New OBMol() OBConv.SetInAndOutFormats("sdf", "smi") OBConv.ReadFile(OBMol, strFolder & "Structure1.sdf") OBConv.WriteFile(OBMol, strFolder & "Structure1.smi") End Sub End Class Just replace the Structure1.sdf with your own sdf file. Enjoy! Brian Brian Bordeau wrote: > > Hi Matt, > I've referenced the OBdotnet.dll in my project and based on the errors > am wondering if I missed referencing a library or set up the OBConv > incorrectly. Could you check the following app (in VB.net 2008) and see if > there is anything obvious: > > Imports OpenBabel > > Public Class Form1 > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As > System.EventArgs) Handles Button1.Click > Dim strFolder As String = "c:\Structures\" > Dim OBConv As New OBConversion() > Dim OBBase As New OBBase() > > OBConv.SetInAndOutFormats("sdf", "smi") > > OBConv.ReadFile(OBBase, strFolder & "*.sdf") > OBConv.WriteFile(OBBase, strFolder & "*.smi") > > End Sub > End Class > > I'm getting the error(s) : > > System.TypeInitializationException was unhandled > Message="The type initializer for 'OpenBabel.openbabelPINVOKE' threw an > exception." > Source="OBDotNet" > TypeName="OpenBabel.openbabelPINVOKE" > > and inner exceptions: > > InnerException: System.TypeInitializationException > Message="The type initializer for 'SWIGExceptionHelper' threw an > exception." > Source="OBDotNet" > TypeName="SWIGExceptionHelper" > > and > > InnerException: System.DllNotFoundException > Message="Unable to load DLL 'openbabel': The specified module > could not be found. (Exception from HRESULT: 0x8007007E)" > Source="OBDotNet" > TypeName="" > StackTrace: > at > OpenBabel.openbabelPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_openbabel(ExceptionDelegate > applicationDelegate, ExceptionDelegate arithmeticDelegate, > ExceptionDelegate divideByZeroDelegate, ExceptionDelegate > indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, > ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, > ExceptionDelegate nullReferenceDelegate, ExceptionDelegate > outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate > systemExceptionDelegate) at > OpenBabel.openbabelPINVOKE.SWIGExceptionHelper..cctor() > InnerException: > > Thanks > > Brian > > > > > > > > Matt Sprague wrote: >> >> Hi Brian, >> >> In regards to your question about OBDotNet it is useable from any >> language >> that compiles for the CLR. This includes C#, VB, F#, S# (small talk.net) >> etc. Because all of these languages compile to a common byte code and use >> the FCL (framework class library) the assemblies are mostly >> interchangeable >> and the choice of language is really just a matter of personal >> preference. >> VB.Net is a core MS language so OBDotNet should work just fine. Worst >> case, >> if something wasn't supported it just won't be exposed when you reference >> an >> assembly but it won't prevent the rest of the library from functioning. >> >> If you have any further questions or need any help just post to the >> mailing >> list. Noel knows more about OpenBabel and I handle the more specific >> CLR/FCL related stuff. >> >> -Matt Sprague >> >> >> On Thu, Nov 13, 2008 at 12:57 AM, Noel O'Boyle <bao...@gm...> >> wrote: >> >>> 2008/11/13 Bordeau, Brian <Bri...@am...>: >>> > Hi Noel, >>> > >>> > I am relatively new to using open source libraries, >>> message >>> > boards and the like so I don't know if/how people post messages or >>> > questions. >>> Generally, we cc everything to ope...@li... so >>> that we have a record. I've forwarded your original message. Welcome >>> to open source. :-) >>> >>> > I am a relatively proficient VB.net programmer and would like to >>> > use the OBdotnet.dll library but am not sure if it has been designed >>> for >>> > this purpose – is this library solely for IronPython or could it be >>> used >>> in >>> > a .net program. >>> It's actually designed for .NET. I'm just more interested in >>> IronPython than the other .NET languages. The main OBdotnet developer >>> is interested in C# (Matt Sprague). >>> >>> We welcome feedback on this code, so let us know how it goes. >>> >>> Regards, >>> Noel >>> >>> ------------------------------------------------------------------------- >>> This SF.Net email is sponsored by the Moblin Your Move Developer's >>> challenge >>> Build the coolest Linux based applications with Moblin SDK & win great >>> prizes >>> Grand prize is a trip for two to an Open Source event anywhere in the >>> world >>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>> _______________________________________________ >>> OpenBabel-scripting mailing list >>> Ope...@li... >>> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting >>> >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> OpenBabel-scripting mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting >> >> > > -- View this message in context: http://www.nabble.com/Re%3A-OBdotnet-tp20476218p20490071.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |
From: Matt S. <mes...@gm...> - 2008-11-13 18:52:56
|
As an addendum: After the first problem is corrected... This code will probably fail Dim OBBase As New OBBase() OBConv.SetInAndOutFormats("sdf", "smi") > > OBConv.ReadFile(OBBase, strFolder & "*.sdf") > OBConv.WriteFile(OBBase, strFolder & "*.smi") Pass the method an OBMol not an OBBase. OBMol extends OBBase but if you declare the object as an OBBase the code will probably fail because OpenBabel won't be able to cast it down to an OBMol when it goes to process the file. -Matt |
From: Matt S. <mes...@gm...> - 2008-11-13 18:44:57
|
Because OBDotNet was built with SWIG it uses an intermediate managed C++ dll to access OpenBabel. Thats what openbabel.dll is. The program needs to be able to see the full contents of the OBDotNet distribution. Follow the directions in the IronPython instructions with regards to setting environment variables. Remember that VS (I assume thats what your using) by default will copy a referenced assembly to the release/debug directories but won't know to bring any dependencies with it. I'm working on creating an installer for the package but it won't be ready for a while yet. -Matt On Thu, Nov 13, 2008 at 11:33 AM, Brian Bordeau < bri...@am...> wrote: > > Hi Matt, > I've referenced the OBdotnet.dll in my project and based on the errors > am wondering if I missed referencing a library or set up the OBConv > incorrectly. Could you check the following app (in VB.net 2008) and see if > there is anything obvious: > > Imports OpenBabel > > Public Class Form1 > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As > System.EventArgs) Handles Button1.Click > Dim strFolder As String = "c:\Structures\" > Dim OBConv As New OBConversion() > Dim OBBase As New OBBase() > > OBConv.SetInAndOutFormats("sdf", "smi") > > OBConv.ReadFile(OBBase, strFolder & "*.sdf") > OBConv.WriteFile(OBBase, strFolder & "*.smi") > > End Sub > End Class > > I'm getting the error(s) : > > System.TypeInitializationException was unhandled > Message="The type initializer for 'OpenBabel.openbabelPINVOKE' threw an > exception." > Source="OBDotNet" > TypeName="OpenBabel.openbabelPINVOKE" > > and inner exceptions: > > InnerException: System.TypeInitializationException > Message="The type initializer for 'SWIGExceptionHelper' threw an > exception." > Source="OBDotNet" > TypeName="SWIGExceptionHelper" > > and > > InnerException: System.DllNotFoundException > Message="Unable to load DLL 'openbabel': The specified module > could not be found. (Exception from HRESULT: 0x8007007E)" > Source="OBDotNet" > TypeName="" > StackTrace: > at > > OpenBabel.openbabelPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_openbabel(ExceptionDelegate > applicationDelegate, ExceptionDelegate arithmeticDelegate, > ExceptionDelegate > divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, > ExceptionDelegate invalidCastDelegate, ExceptionDelegate > invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate > nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, > ExceptionDelegate overflowDelegate, ExceptionDelegate > systemExceptionDelegate) at > OpenBabel.openbabelPINVOKE.SWIGExceptionHelper..cctor() > InnerException: > > Thanks > > Brian > > > > > > > > Matt Sprague wrote: > > > > Hi Brian, > > > > In regards to your question about OBDotNet it is useable from any > language > > that compiles for the CLR. This includes C#, VB, F#, S# (small talk.net) > > etc. Because all of these languages compile to a common byte code and use > > the FCL (framework class library) the assemblies are mostly > > interchangeable > > and the choice of language is really just a matter of personal > preference. > > VB.Net is a core MS language so OBDotNet should work just fine. Worst > > case, > > if something wasn't supported it just won't be exposed when you reference > > an > > assembly but it won't prevent the rest of the library from functioning. > > > > If you have any further questions or need any help just post to the > > mailing > > list. Noel knows more about OpenBabel and I handle the more specific > > CLR/FCL related stuff. > > > > -Matt Sprague > > > > > > On Thu, Nov 13, 2008 at 12:57 AM, Noel O'Boyle <bao...@gm...> > > wrote: > > > >> 2008/11/13 Bordeau, Brian <Bri...@am...>: > >> > Hi Noel, > >> > > >> > I am relatively new to using open source libraries, > message > >> > boards and the like so I don't know if/how people post messages or > >> > questions. > >> Generally, we cc everything to ope...@li... so > >> that we have a record. I've forwarded your original message. Welcome > >> to open source. :-) > >> > >> > I am a relatively proficient VB.net programmer and would like to > >> > use the OBdotnet.dll library but am not sure if it has been designed > >> for > >> > this purpose – is this library solely for IronPython or could it be > >> used > >> in > >> > a .net program. > >> It's actually designed for .NET. I'm just more interested in > >> IronPython than the other .NET languages. The main OBdotnet developer > >> is interested in C# (Matt Sprague). > >> > >> We welcome feedback on this code, so let us know how it goes. > >> > >> Regards, > >> Noel > >> > >> > ------------------------------------------------------------------------- > >> This SF.Net email is sponsored by the Moblin Your Move Developer's > >> challenge > >> Build the coolest Linux based applications with Moblin SDK & win great > >> prizes > >> Grand prize is a trip for two to an Open Source event anywhere in the > >> world > >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ > >> _______________________________________________ > >> OpenBabel-scripting mailing list > >> Ope...@li... > >> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > >> > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > challenge > > Build the coolest Linux based applications with Moblin SDK & win great > > prizes > > Grand prize is a trip for two to an Open Source event anywhere in the > > world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > OpenBabel-scripting mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > > > > > -- > View this message in context: > http://www.nabble.com/Re%3A-OBdotnet-tp20476218p20486773.html > Sent from the openbabel-scripting mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |