Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 212689 - sci-chemistry/ghemical-2.10: import scrambles molecule structure
Summary: sci-chemistry/ghemical-2.10: import scrambles molecule structure
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Chemistry-Related Packages
URL:
Whiteboard: patch and ebuild available
Keywords: InOverlay
Depends on:
Blocks:
 
Reported: 2008-03-08 09:34 UTC by Reinis Danne
Modified: 2010-06-21 14:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
working *.gpr file generated by ghemical-2.95 (ciklohex.gpr,1.56 KB, text/plain)
2008-08-21 14:21 UTC, Reinis Danne
Details
the same structure, but saved trough "Export.." dialog (cyclohex2.gpr,493 bytes, text/plain)
2008-08-21 14:23 UTC, Reinis Danne
Details
Exported as *.pdb (cyclohex2.pdb,3.22 KB, text/plain)
2008-08-21 14:24 UTC, Reinis Danne
Details
How it should look (and in one case does) (screenshot0.png,68.66 KB, image/png)
2008-08-21 14:45 UTC, Reinis Danne
Details
How it does look 1 (screenshot1.png,46.53 KB, image/png)
2008-08-21 14:46 UTC, Reinis Danne
Details
How it does look 2 (screenshot2.png,49.14 KB, image/png)
2008-08-21 14:47 UTC, Reinis Danne
Details
How it does look 3 (screenshot3.png,52.49 KB, image/png)
2008-08-21 14:48 UTC, Reinis Danne
Details
a patch for import/export errors due to non-"C" system locale (ghemical-2.95-import_export.patch,1.26 KB, patch)
2008-11-10 21:54 UTC, Reinis Danne
Details | Diff
a patch for configure.ac - test for libf2c which is needed for Mopac (ghemical-2.95-libf2c_config_test.patch,321 bytes, patch)
2008-11-10 21:56 UTC, Reinis Danne
Details | Diff
a ebuild which works with two previously posted patches (ghemical-2.95.ebuild,1.75 KB, text/plain)
2008-11-10 21:58 UTC, Reinis Danne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reinis Danne 2008-03-08 09:34:34 UTC
Ghemical can properly read only *.gpr files trough "Open" dialog, but for all other formats I have tried using "Import..." dialog the structure is with changed coordinates and lost bonding information (got a set of dots.. seperate atoms.. wich has weak similarity to the original molecule). For example for cyclohexane I got a square with C's and 6 H in the same plane as C's and 3 above and 3 below that plane each exactly on top of the C, but in original file there is cyclohexane in chair conformation.

It seems that it writes files correctly (at least it writes the same way it displays), but reads correctly only *.gpr files, so I guess the problem is with interface to OpenBabel, but I don't know how to attack this problem further.

Have tried to install different versions of OpenBabel, disable all USE flags but "openbabel" for Ghemical and even tried to install libghemical-2.96 and ghemical-2.12 manually, but I got the same problem.

Even though the structure is displayed incorrectly all atoms are there in atoms list and Ghemical doesn't produces any error messages relevant to this even if I run it from commandline.

Reproducible: Always

Steps to Reproduce:
1.Open Ghemical
2.Right Click -> File -> Import...
3.Browse for a *.pdb file (or other) -> Ok -> Ok

Actual Results:  
Get the wrong structure displayed (different coordinates, no bonds and different atom count), but in atoms tab all atoms are there.

Expected Results:  
Correctly loaded and displayed molecular structure, e.g., cyclohexane in a chair conformation.

The current workaround I have is to convert structure file to *.gpr format from commandline using OpenBabel:

>$ babel -ipdb abc.pdb -ogpr abc.gpr

and then open *.gpr file from Ghemical using File->Open dialog.

File saving and exporting works.

Any ideas?

RD-PC ~ # emerge --info
Portage 2.1.4.4 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.23-gentoo-r8 x86_64 Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz
Timestamp of tree: Fri, 07 Mar 2008 17:17:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.linux.ee/pub/gentoo/distfiles/ ftp://ftp.linux.ee/pub/gentoo/distfiles/ "
LANG="lv_LV.UTF-8"
LINGUAS="lv en"
MAKEOPTS="-s -j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="7zip X aac aalib acl acpi alsa amd64 avahi avi bash-completion berkdb bluethooth bzip2 cdparanoia cdr cli cracklib crypt css cups dbus divx dri dv dvd dvdr dvdread encode ffmpeg firefox flac fortran freetype gdbm gif gnome gnutls gpm gtk gtk2 hal iconv ieee1394 ipv6 isdnlog java jpeg kerberos lame ldap live mad midi mjpeg mmx mp3 mudflap ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp pam pcmcia pcre pdf perl png pppd python quicktime rar readline reflection session spl sse sse2 sse3 ssl ssse3 subversion svg tcl tcpd tiff tk truetype udev unicode vcd vorbis wifi wmf xml xorg xv zlib" ALSA_CARDS="via82xx hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" FOO2ZJS_DEVICES="hp1018" INPUT_DEVICES="evdev keyboard mouse synaptic" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="lv en" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 mach64 mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2008-07-08 07:13:28 UTC
Does this work in 2.95? I just added it.
Comment 2 Reinis Danne 2008-08-21 14:16:51 UTC
No it still doesn't work. Coordinates are a bit different, however it doesn't help.
Comment 3 Reinis Danne 2008-08-21 14:21:37 UTC
Created attachment 163479 [details]
working *.gpr file generated by ghemical-2.95
Comment 4 Reinis Danne 2008-08-21 14:23:06 UTC
Created attachment 163481 [details]
the same structure, but saved trough "Export.." dialog
Comment 5 Reinis Danne 2008-08-21 14:24:07 UTC
Created attachment 163482 [details]
Exported as *.pdb
Comment 6 Reinis Danne 2008-08-21 14:45:30 UTC
Created attachment 163487 [details]
How it should look (and in one case does)
Comment 7 Reinis Danne 2008-08-21 14:46:26 UTC
Created attachment 163488 [details]
How it does look 1
Comment 8 Reinis Danne 2008-08-21 14:47:23 UTC
Created attachment 163490 [details]
How it does look 2
Comment 9 Reinis Danne 2008-08-21 14:48:15 UTC
Created attachment 163492 [details]
How it does look 3
Comment 10 Reinis Danne 2008-08-21 14:56:06 UTC
Export doesn't work either now. Coordinates are zeroed out, regardless fail format.
Comment 11 Reinis Danne 2008-11-10 21:49:25 UTC
Found the cause for this. More precisely - Debian developer did and reported it to ghemical-devel mailing list after which the solution was posted.

It turns out that only systems with non-"C" locale are affected by this bug.

As ghemical-2.95 did not compile because of bug 232292, I used the modified ebuild from that bugreport and added a patch for this bug. Also made a separate patch for ghemical-2.95 building error. Tested this configuration and it works for me.

There is still one issue though - ghemical-2.95 fails at a configuration step complaining about missing pkg-config. This can be worked around:

>$ PKG_CONFIG=`which pkg-config` emerge -a ghemical
Comment 12 Reinis Danne 2008-11-10 21:54:19 UTC
Created attachment 171373 [details, diff]
a patch for import/export errors due to non-"C" system locale
Comment 13 Reinis Danne 2008-11-10 21:56:45 UTC
Created attachment 171375 [details, diff]
a patch for configure.ac - test for libf2c which is needed for Mopac
Comment 14 Reinis Danne 2008-11-10 21:58:36 UTC
Created attachment 171376 [details]
a ebuild which works with two previously posted patches
Comment 15 Reinis Danne 2009-02-21 00:11:56 UTC
Added to science overlay
Comment 16 Justin Lecher (RETIRED) gentoo-dev 2010-06-21 14:34:29 UTC
*ghemical-2.99.2 (21 Jun 2010)

  21 Jun 2010; Justin Lecher <jlec@gentoo.org> +files/2.99.2-docs.patch,
  -ghemical-2.10.ebuild, -ghemical-2.95.ebuild, -ghemical-2.98.ebuild,
  +ghemical-2.99.2.ebuild:
  Version Bump, fixing bug 212689, 232292, 246414, thanks rei4dan for working
  on patches, Cleaned old buggy versions, Fixed wrong path for html installation