[BiO BB] Save protein structure image as an adobe SVG file
marchywka at hotmail.com
Mon Dec 29 12:16:36 EST 2008
>> From: boris.steipe at utoronto.ca
>> Date: Wed, 26 Nov 2008 17:33:39 -0500
>> To: bbb at bioinformatics.org
>> Subject: Re: [BiO BB] Save protein structure image as an adobe SVG format file
>>> Spheres aren't that hard for z-sorting,
>> Yes, a collection of atoms can be well approximated with a Z-sorted
>> stack of circles in 2D. But *molecules* are represented by
>> intersecting spheres and the line of intersection is a circle at an
>> arbitrary orientation relative to the viewer. It projects as an
>> ellipse, and part of the ellipse is occluded.
IIRC, the OP asked a general question apparently not having any specific viewer
or rendering model in mind so I assume that a ball model would be worth consideration.
I haven't done much with graphics lately ( while I did write an openGL
app, it hides most of the graphics stuff) and needed to review some trig/spherical eqns for location based services, so I thought I would give this a shot.
It doesn't turn out to be that hard for most cases,
[ I cleverly put a large bmp file on the page,along with links to generated svg,
it may load slowly and I may go ahead and update or delete this ]
but could take some thought to make a clean application. I don't recall if there
are a lot of analytical approaches to this as oppposed to more brute force/empirical and more general things like ray tracing but probably in CAD solid modelling this is well known.
It wouldn't be hard to generalize to more simple object types like rods or fix some
of the obvious problems with the current code.
Note that your concern with arbitrary angles etc is easily handled with vector
dot and cross products, expanded in Cartesian coordinates as the last step,
to produce simple results. It took a while to figure out a few rules and
how the SVG arc code works.
>> Think "methane".
The illustration uses this
$ head cd25sulfenic.pdb
HEADER Hydrolase, Cell Cycle 21-Jan-05 1YML
COMPND Crystal Structure Of The Cdc25b Phosphatase Catalytic Domain
COMPND 2 With The Active Site Cysteine In The Sulfenic Form
SOURCE ORGANISM_SCIENTIFIC: Homo sapiens; ORGANISM_COMMON: human
AUTHOR G.K.Buhrman, B.Parker, J.Sohn, J.Rudolph & C.Mattos
It’s the same Hotmail®. If by “same” you mean up to 70% faster.
More information about the BBB