[PyOpenGL-Users] Molecular graphics demo?
Brought to you by:
mcfletch
From: Richard P. M. <rp...@wa...> - 2003-05-09 18:27:29
|
I put together a very simple module to render balls and sticks in an Tk/OpenGL window called BallStickOGL.py. It's only 100 lines of code, and was inspired by looking through some of the other demos that were distributed with PyOpenGL. Using this demo, I put together a simple molecular renderer called xyz_render_ogl.py. It takes another 150 lines of code, but then allows some pretty nice ball-and-stick pictures of molecules to be visualized. I've attached a structure file for the protein crambin. You don't want to try this on a slow machine (computing all of the pairwise distances in python is a time-sink) but it's surprisingly fast, really (much faster than jmol for crambin). I also attached a screenshot of what the whole thing looks like, after a bit of rescaling. I would be glad to have this demo added to the PyOpenGL demos, if the powers that be believe it would be helpful to other people. Rick -- Richard P. Muller, Ph.D. rp...@wa... http://www.wag.caltech.edu/home/rpm |