Proteins are typically represented in a cartoon form, with β sheets as arrows and α helices as coils:

Example cartoon representation of a protein

I'm wondering, is there somewhere a reference that describes the construction of this representation? That is, what mathematical objects are used to construct these graphics, and on which atoms/directions are they built?


2 Answers 2


Some of the algorithms are available from the source code for the different packages. PyMol is one such, and VMD's source is also accessible.

I implemented VMD's ribbon algorithm in the 1990s. The first step is the structure determination - where are the amino acids? which are connected into a chain? where are the C-alpha atoms?

Next, as Kyle said, is the spline. VMD uses a Catmull–Rom spline, with the C-alphas as control points. This is a 3rd order spline, and the splines goes through the C-alphas. If you work out the math, there's a single free parameter, which corresponds to how stiff the spline is around the control point. I tried a few values until I found the one which was esthetically pleasing.

There's also some trickiness about how to handle the end, which don't have enough C-alphas. I extrapolated to get the other points.

That gives the path. A circular extrusion along the path gives a tube. You can vary the cross-section radii to give an ellipse, and with a bit more work define the ribbon.

The problem is to find the correct norm, so that the ribbons are aligned with an alpha helix. I tried various things then gave up, looked at the Raster3D implementation, got permission to use it, and added that to VMD. It's a cumulative sum of the previous vector norm and the current norm defined by the C-alpha trace. I would have to look at the source for how it works again. Interestingly, Ethan Merritt, the Raster3D author, pointed out that he got that bit of code from FRODO, so it has a long history.

VMD now has "NewRibbons", which was implemented after my time. I don't know how it works.

The easiest way to do an alpha helix is to draw a line from the first to the last residue; extrude a circle along the line and you have a cylinder. You can also do a linear best-fit to the helix, but I think that caused problems for short helices. There's likely more clever ways to do it, including ways like Kyle suggested, which allows for soft bends.

Beta strands are easy. There are two control paths, one for each side. Those define the strand path, and the normal. You do have to be a bit careful with twists, so that your strand doesn't twist 290 degrees when it should twist 70 degrees, but that wasn't hard to handle.

A hard part, which you didn't mention, is how to detect where the alpha-helix and beta-strands are located. Some PDB records contain that, but not all. I punted and used a 3rd-party tool, STRIDE, for that. Warren implemented his own algorithm. Roger Sayle implemented his own version of DSSP for Raster3D.

  • $\begingroup$ A very interesting and thorough answer. If you haven't come across it yet, we somewhat recently launched Matter Modeling SE, which focuses on the theory and software behind computational chemistry/material science/biology/etc. $\endgroup$
    – Tyberius
    Commented Jan 19, 2022 at 17:03

I'll take a stab at it.

The protein cartoon (also known as ribbon) representation consist of three parts corresponding to the three types of protein secondary structure.

  • Random Coil (shown in green) - A B-spline, usually of order 2 or 3, passing through the alpha-carbons of each amino acid residue. Occasionally the spline will also pass through the amino-nitrogens to more closely show the conformation of the protein.
  • Alpha Helix (shown in red) - Another spline with a flattened 'ribbon' shape which wraps around an imaginary cylinder formed by the residues in the helix.
  • Beta Sheets (shown in yellow) - Splines with the shape of the wide, flat arrow passing through the peptide plane (the plane formed by the alpha-carbon, carbonyl-carbon, and carbonyl-oxygen). The normal vector to the top of the arrow is the normal of the peptide plane. The arrows points from the N-terminus to the C-terminus of the protein chain.

The wikipedia page on ribbon diagrams has additional information on the origins of this type of visualization for showing protein structure.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.