Benoît Jacob ([info]bjacob) wrote,
@ 2006-11-17 10:23:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Entry tags:kalzium 3d eigen kde

First benefits of using Eigen for Kalzium
In Kalzium's 3D viewer, a problem was that when you loaded a molecule, the default viewpoint was not always optimal, sometimes totally unreadable. For instance, look at this molecule of L-tryptophan :
L-tryptophan, bad viewpoint
Of course, Kalzium always allowed to freely rotate around the molecule, so after some mouse effort, you could get that:
L-tryptophan, bad double bonds orientation
But then, a second problem appears: depending on the viewing angle, double bonds can look like single bonds. In the above pic, one should see 6 double bonds. This even mislead some people into believing that our molecule files were wrong! So I sat down and figured that the first thing to do was to perform a linear regression to compute the best-fitting plane for the molecule. Once we know that plane, elementary geometry allows to find a nice viewpoint and to orient the multiple bonds in a convenient way. So I implemented linear regression and a computeFittingHyperplane function in Eigen, and reworked Kalzium's 3D viewer to make use of it. Result:
L-tryptophan, nice viewpoint, nice double bonds :)
I haven't had to do any manual rotation for this screenshot, this is the exact viewpoint you get when you load the molecule. Also note that now the 6 double bonds clearly appear. Maximizing the window, I got this.

About speed: for these screenies, I take the high-quality mode, and get 56 FPS on my software-only (no hardware acceleration) 1.66 GHz Intel Core 1. In low-quality mode, I get 178 FPS, and at this window size, the visual difference is not too big. Even on Carsten's laptop, it runs OK ;)

Update: as a comment pointed out, the molecule file is wrong, there is one hydrogen atom missing and one double bond too much. This was a bug in the (very old) molecule file that I used, and has been fixed since in the BlueObelisk project.




(Post a new comment)

My Laptop
[info]cniehaus
2006-11-17 09:31 am UTC (link)
To put it into perspective: My laptop has only 256mb RAM and 1200MHz and no 3D-stuff at all. The 3D-stuff in Kalzium still runs nicely!

(Reply to this) (Thread)

Re: My Laptop
(Anonymous)
2006-11-17 10:15 am UTC (link)
i still wonder if it would be possible to do something about the jagged lines... some anti-aliasing wouldn't hurt?!? is that even possible? even beryl/compiz look bad because of those lines.

anyway, kalzium doesn't compile for me, hasn't since a long time. i get:
[ 71%] Generating solver.o
/bin/sh: -output-obj: command not found
make[2]: *** [kalzium/src/solver.o] Error 127

this is with the latest cmake cvs, latest openbabel svn, latest kalzium svn, etcetera... i use kdesvn-build, running cmake directly always leads to a:
CMake Error: Error in cmake code at
/home/kde4/kdesvn/kdeedu/kalzium/src/CMakeLists.txt:68:
Unknown CMake command "kde4_automoc"

any idea what is wrong?!? i can't find anything...

(Reply to this) (Parent)(Thread)

Re: My Laptop - [info]bjacob, 2006-11-17 10:27 am UTC
Re: My Laptop - [info]cniehaus, 2006-11-17 10:27 am UTC
Re: My Laptop - (Anonymous), 2006-11-17 10:40 am UTC
Re: My Laptop - [info]cniehaus, 2006-11-17 02:49 pm UTC
Re: My Laptop - (Anonymous), 2006-11-17 06:23 pm UTC
Re: My Laptop - [info]cniehaus, 2006-11-17 07:00 pm UTC
(no subject) - [info]judyzubit, 2008-07-10 11:24 pm UTC
(no subject) - [info]beckeragudo, 2008-07-16 01:17 am UTC
Re: My Laptop - [info]cniehaus, 2006-11-17 02:51 pm UTC
Re: My Laptop - (Anonymous), 2006-11-17 06:26 pm UTC
Re: My Laptop - [info]cniehaus, 2006-11-17 06:56 pm UTC
(no subject) - [info]sallyfasum, 2008-07-16 01:31 am UTC
Jagged lines - [info]bjacob, 2006-11-17 10:43 am UTC
Re: Jagged lines - (Anonymous), 2006-11-17 03:35 pm UTC
Re: Jagged lines - [info]bjacob, 2006-11-17 04:13 pm UTC
(no subject) - [info]raynejanyp, 2008-07-16 03:54 am UTC
VutVXdlZeuvVd
(Anonymous)
2008-06-22 11:11 pm UTC (link)
hHpUuX df1zv853gvrvb7gv94gmlas

(Reply to this) (Parent)

Double bonds...
(Anonymous)
2006-11-17 10:14 am UTC (link)
Wouldn't it be possible to make the double-bonds always "face" the camera? That way, you could rorate the molecule in any direction you wanted and you'd always see the double bonds correctly...

(Reply to this) (Thread)

Re: Double bonds...
[info]bjacob
2006-11-17 10:23 am UTC (link)
I see what you mean. We have considered that, but in the end we thought that it would look a bit strange. Another drawback would be that it would force to recompute the geometry on every redraw, while we're currently caching it in a OpenGL display list for better performance.

(Reply to this) (Parent)

Re: Double bonds... - (Anonymous), 2006-11-17 01:07 pm UTC
Re: Double bonds... - [info]alanhorkan, 2006-11-17 01:14 pm UTC
Awesome!
(Anonymous)
2006-11-17 10:16 am UTC (link)
It's in the little things Benoît. Keep up the good work! Too bad I know squat about chemistry and slept my way through chemistry classes in highschool :)

Aron Stansvik

(Reply to this) (Thread)

Re: Awesome!
[info]bjacob
2006-11-17 10:24 am UTC (link)
Thanks! Btw, I also slept during the chemistry classes. I'm doing only the math here, the chemistry is being done by Carsten and the OpenBabel library.

(Reply to this) (Parent)

Double bond
(Anonymous)
2006-11-17 10:24 am UTC (link)
Looks nice, but I think there are too many double bonds in the -COOH group. One of the CO bonds should be a single bond.

(Reply to this) (Thread)

Re: Double bond
[info]bjacob
2006-11-17 10:26 am UTC (link)
I don't know much in chemistry, but I think that there is no COOH group in this molecule. Look, no hydrogen atom is bound to an oxygen atom.

(Reply to this) (Parent)(Thread)

Woops! - [info]bjacob, 2006-11-17 10:33 am UTC
Re: Woops! - [info]bjacob, 2006-11-17 10:35 am UTC
Re: Woops! - (Anonymous), 2006-11-17 05:10 pm UTC
Re: Woops! - [info]cniehaus, 2006-11-17 05:18 pm UTC
Re: Woops! - [info]bjacob, 2006-11-17 06:16 pm UTC
Re: Woops! - [info]bjacob, 2006-11-17 07:06 pm UTC
pharma best top
(Anonymous)
2007-10-09 01:55 am UTC (link)
Hello

G'night

(Reply to this)

Hello
(Anonymous)
2007-10-27 10:56 am UTC (link)
Hello!
How are you?

(Reply to this)

Viagra For Stamina: A Soldier's Best Friend?
(Anonymous)
2007-11-19 08:43 pm UTC (link)
Why you should buy vagra?
First of all, if you buy us gneric viagra you get quality service and great discounts!
Why would you need vigra sale?
Viagra in the first place make a uverenost, most of the problems are solved in the privacy of using our products. We will help you learn infinite possibilities in the intimate lives.
Why do you have to use our shop?
You pay only real value of the goods, without deductions resellers percent! Ordering viagr pharmacy us, you get free delivery and discounts on other products.
On our site you can order viagra onlie. The lowest price. Large discounts. Full anonymity. Free shipping.
More info about viagra onine you can be found on our website http://buy-viagra-for-love.info/index116.html

(Reply to this)

(Reply from suspended user)
My blog about pharma care
(Anonymous)
2008-01-25 06:02 pm UTC (link)
Why you should buy viaga info?
First of all, if you buy us viagra alternatve you get quality service and great discounts!
Why would you need pfizer viara?
Viagra in the first place make a uverenost, most of the problems are solved in the privacy of using our products. We will help you learn infinite possibilities in the intimate lives.
Why do you have to use our shop?
You pay only real value of the goods, without deductions resellers percent! Ordering cheap vagra us, you get free delivery and discounts on other products.
On our site you can order viagra oline. The lowest price. Large discounts. Full anonymity. Free shipping.
More info about viagra oline you can be found on our website http://buy-viagra-online-pharmacy-in-canada.info/buy-cheap-viagra-online-now/cheap-price-viagra.php

(Reply to this)

Help needed...
(Anonymous)
2008-02-23 06:20 am UTC (link)
Hi, nice post. Thanks.
Continue writing...

(Reply to this)

xrumer is the BEST!
(Anonymous)
2008-03-14 10:30 pm UTC (link)
X-Rumer is the BEST!

[img]http://upload.wikimedia.org/wikipedia/en/thumb/6/6b/XRumer_screenshot.gif/200px-XRumer_screenshot.gif[/img]

;)

(Reply to this)

My favourite pharma supermarket world-pharma.pillsfm.com
(Anonymous)
2008-03-22 05:46 pm UTC (link)
Go with me
Here is a few words about pharma business
http://world-pharma.pillsfm.com
My favourite pharma supermarket
WBR,
Alex

(Reply to this)

UIXlvnvvVvCLATRtF
(Anonymous)
2008-06-05 06:25 am UTC (link)
tickets_3.txt;2;2

(Reply to this)

eSLMVLYrcTzJXZO
(Anonymous)
2008-06-09 05:14 pm UTC (link)
great work great site thanks http://groups.google.us/group/linkmaps bye see you

(Reply to this)

jJEQNwVxNMsHRnNVz
(Anonymous)
2008-06-14 09:00 am UTC (link)
hi nice site thx http://google.us/group/nteens teen twink galleries >:(((

(Reply to this)

czdqbFguFSbDcWdyA
(Anonymous)
2008-06-14 09:06 am UTC (link)
Thanks funny site http://google.us/group/jteens teen quotes 931494

(Reply to this)

Free Unlimited Qualified Web Traffic
(Anonymous)
2008-06-20 11:53 am UTC (link)
Turn any website into an instant success with this powerful new software!
Mind-Blowing Technology Delivers An Endless Flood Of Traffic
To Your website automatically at the push of a button!
This software is real counter killer!
Your hits counter will explode! Traffic Add is a killer application.
If you are a serious webmaster - forget about other free or paid traffic generation methods.
Enjoy unlimited hits for life!

http://trafficadd.net

(Reply to this)

CUyJDyrUxUyroi
(Anonymous)
2008-06-23 06:47 am UTC (link)
umd9GI dfv078fnw8f934ndvkg2l

(Reply to this)

vlvEziYTiPyQRZef
(Anonymous)
2008-07-22 04:35 pm UTC (link)
iDxlgh gfb07yvt9d6t94wbtx63bgq7d

(Reply to this)

xIHlSOVdIBd
(Anonymous)
2008-07-27 03:32 pm UTC (link)
RdEHRY hi! hice site!

(Reply to this)

Want to download XRumer 5.0 for free!
(Anonymous)
2009-05-01 01:34 am UTC (link)
Huh! I want to get program X-Rumer 5.07 Palladium free. Any link???
I'm so need this magic program! It's can break captchas automatically! Activate accounts via email automatically too! Absolutely great software! Help me!
And did you hear news - price for XRumer 5.0 Palladium will grow up to $540 after 15 may 2009... And XRumer 2.9 and 3.0 - too old versions, it's cant break modern catpchas and cant break modern anti-bot protections. But XRumer 5.0 Palladium CAN!!!!
So help me for download this great soft for free! Thanks!

(Reply to this)

growth-flexv pro
(Anonymous)
2009-06-05 04:48 pm UTC (link)
It’s an Amazing post!


http://growth-flex.com

(Reply to this)


Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…