Preliminary "Ribbon" Support in AvogadroMonday, October 22. 2007 |
Me![]() Calendar
Amazon WishlistQuicksearchCategoriesTop Exitssourceforge.net (51)
code.google.com (48) geoffhutchison.net (31) avogadro.sourceforge.net (30) gallery.cryos.net (29) www.gentoo.org (28) openbabel.sourceforge.net (21) akademy2007.kde.org (18) www.amazon.co.uk (18) www.kde.org (18) |
|||||||||||||||||||||||||||||||||||||||||||||||||
Oh I just had another idea: why not take the orthogonal point of view: instead of slicing the tube into small cylinders, you could slice it in the orthogonal way, in long "shoe laces". The advantages are that:
1) building the shoe laces GL_TRIANGLE_STRIP is much easier and doesn't require you to add flat triangles
2) the number of required shoe laces is independant of the length/complexity of the ribbon, it only depends on the required visual quality, and probably doesn't exceed 15 or 20.
The disadvantage is that your vertices are no longer sorted by locality, which may harm performance depending on the OpenGL implementation.
You can check out some screenshots on www.thomasmargraf.org. The orientation of the band in alpha helices is a bit unusual, but if you use the surface normals of the peptide-bond plain to generate your control-points, you can get the more traditional look as well.
If I can help you at all, or if you want to have a look at my code, feel free to get in touch.
I would love to get our support of biological molecules to a useful level but this is outside of my areas of expertise
See, I told you it was close enough to grab more expert opinion.
They seem to have done it for their Java application...
As for ribbons, it shows alpha helices and beta sheet. Sometimes those secondary structures can be found inside the pdb file downloaded from rcsb, for example 5RSA. In those cases you will, if I'm not misstaken, just have to add some color between the amino acids mentioned and you will be done. If the structures are not in the file, it can be calculated, however tI don't know how at the moment.
I can be wrong though, as I have only studied those things as part of my education in bionmedicine.