Over the last couple of days I have made a few commits to improve the ribbon support in Avogadro. Many thanks to Geoff for fixing some bugs we found in Open Babel and to Thomas Margraf for his helpful suggestions and for letting me take a look at a little of his code that renders ribbons.
Right now the ribbon is drawn as a tube between the carbon atoms of the backbone and so isn't really a ribbon at all. Then I looked at the image and it is looking quite a bit like a ribbon. The code is checked in and so feel free to take a look at it. I am using NURBS but am far from an expert on their use. My laptop failure has lost some of the tuning I had done too - this is my first screenshot from Apple Mac OS X Leopard!
Points if you can tell me why the alpha helix looks pretty good despite me having not yet implemented anything to find the correct plane! Still needs some tuning but I hope you will agree that this is looking pretty nice now. It has also led to some optimisation of molecule loading but I am sure that there are lots of biologists who will tell me it still isn't quite right.
Update: Geoff has now shown me how to do screen capture and so here is a pretty video of Avogadro rendering ribbons in action!
It's really amazing. I don't think the screencast really does it justice. It's extremely fluid.
It'd be nice to get back the real "tube" (or slinky?) model for another option, but it's great to get the helix out.
In talking with you in person, I do think it's because NURBS is "stretching" the points around the helix -- so it's inevitable to get that shape using the number of control points.
If you change the radius a bit, it becomes more "tube like."
I hope you will eventually sort out the details of why-it-does-look-like-this as it is always important to fully understand things.
I am also sorry to read about your broken laptop. Good that you were able to work on Mac instead.
I enabled Ribbon together with a semitransparent VdW... and this really demonstrates the power of our multi-engines framework!
It'd be nice to get back the real "tube" (or slinky?) model for another option, but it's great to get the helix out.
In talking with you in person, I do think it's because NURBS is "stretching" the points around the helix -- so it's inevitable to get that shape using the number of control points.
If you change the radius a bit, it becomes more "tube like."