Hello,

First I would like to thanks all developers involved in Open Babel.

I use Open Babel in a java program and I encountered two problems:

*# problem 1: mol file generation*
I have the same problem described here:
http://forums.openbabel.org/Building-3D-Coordinates-in-Java-with-OpenBabel-td2134508.html

I get "M  V30" and other char sequences in the mol file, I tried the
recommended alternative code:
*OBConversion convMol = new OBConversion();*
*OBOp gen3d =
OBOp.FindType("Gen3D");gen3d.Do(molecule);convMol.SetOutFormat("mol");String
mol = convMol.WriteString(molecule);*

but its take 240 seconds to generate the caffeine mol file. Does anyone
know if there is a version of open babel without this trouble or if there
is a way to get the result faster?
Thanks

*# problem 2: svg file generation*
I try to generate svg files from molecules,
with the following code I get empty files, even for simple molecules like
caffeine:
*OBConversion conv = new OBConversion(); *
*conv.SetOutFormat("svg");*

*conv.SetOptions("--gen2d", OBConversion.Option_type.OUTOPTIONS);*
*conv.WriteFile(mol, outFile.getAbsolutePath());*

(same result with option "*--gen3d*" )

With this alternative code (without output option), simple molecules like
caffeine work perfectly, however big molecules crash the JVM (I get the
following fatal error message (in red))

*OBConversion conv = new OBConversion(); *
*conv.SetOutFormat("svg");*
*conv.WriteFile(mol, outFile.getAbsolutePath());*
*#*
*# A fatal error has been detected by the Java Runtime Environment:*
*#*
*#  SIGSEGV (0xb) at pc=0x00007fd49d9fa3d0, pid=1520, tid=140551769212672*
*#*
*# JRE version: OpenJDK Runtime Environment (7.0_65-b32) (build
1.7.0_65-b32)*
*# Java VM: OpenJDK 64-Bit Server VM (24.65-b04 mixed mode linux-amd64
compressed oops)*
*# Problematic frame:*
*# C  [libopenbabel.so.4+0x673d0]  OpenBabel::OBAtom::GetVector()+0x0*
*#*
*# Failed to write core dump. Core dumps have been disabled. To enable core
dumping, try "ulimit -c unlimited" before starting Java again*
*#*
*# An error report file with more information is saved as:*
*# /home/bobmarcel/Workspace/externalTools-api/hs_err_pid1520.log*
*#*
*# If you would like to submit a bug report, please include*
*# instructions on how to reproduce the bug and visit:*
*#   http://icedtea.classpath.org/bugzilla
<http://icedtea.classpath.org/bugzilla>*
*# The crash happened outside the Java Virtual Machine in native code.*

*# See problematic frame for where to report the bug.#*
(I get this error with big molecule like Naringin (
https://en.wikipedia.org/wiki/Naringin)),
the command "ulimit -c unlimited" didn't change anything.

I do not get any error when I use open babel in command line; only when I
use it through java.

# my configuration:
*-OS: ubuntu 12.04*
*-Java version "1.7.0_65"*
*OpenJDK Runtime Environment (IcedTea 2.5.1)
(7u65-2.5.1-4ubuntu1~0.12.04.2)*
*OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)*
*-Open babel version: **Open Babel 2.3.2*

Regards,

Todd

ps: excuse my english, it's not my mother thong
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to