Draw a helical wheel plot from a pdb file
Many programs are available that draw helical wheels from a given peptide primary structure (sequence), assuming a perfect alpha helix. Sometimes it may be interesting to see what the helical-wheel plot of a non-ideal helix looks like.
Because I could not find such a program, I created one myself. It is a Perl script that uses the PDL (perl data language) module for the calculations and the SVG module to generate the image. You should have Perl and these two modules installed to use it. You also need the Getopt::Long and Pod::Usage modules, but you already have those. I only tested it on Linux, but I think it should work on other platforms as well (let me know!).
I have made the script available under the creative commons by-nc-sa licence, which means you may use and distribute it as long as you say you got it from me. And not for commercial purposes. If you publish any results, I would appreciate it if you mention my name in your article. At the moment there is no scientific publication related to this software.
click here to download (wheel.tar.bz2)
(but please continue reading for more information)
To learn how to use the program, you can take a look at the man-page with
./wheel.pl -m
The program goes through the following steps to draw the helical wheel:
- Read the coordinates of the CA atoms from the pdb file
- Find the principal axis of those atoms (the longest axis)
- Move the mass-midpoint to the origin
- Calculate the mass distribution tensor of the CA atoms
- Calculate the eigenvectors and eigenvalues of this matrix (the matrix of eigenvectors is the rotation matrix)
- Rotate the principal axis to coincide with the z-axis
- Draw the xy-plane, which is the helical wheel plot
The numerical data for all steps is written to a log-file, in case you want to know what happened.
The output image will look similar to this (it is resized and converted to a png file here for web publishing):

Because the program creates an SVG image, it may be edited and resized without losing quality. I recommend inkscape for this purpose.
Note that the script makes several assumptions regarding the way your pdb file looks. If your pdb-file looks like the example below, it should work:
ATOM 1 N LYS+ 1 2.006 -6.797 -16.583 1.00 0.00 ATOM 2 H LYS+ 1 2.409 -5.881 -16.443 1.00 0.00 ATOM 3 CA LYS+ 1 1.934 -7.721 -15.428 1.00 0.00 ATOM 4 HA LYS+ 1 0.893 -7.948 -15.252 1.00 0.00 ATOM 5 CB LYS+ 1 2.689 -9.032 -15.717 1.00 0.00
At the moment, pdf-files that contain a chain identifier field cannot be read without making a small change to the source code of the script. This will be corrected in a next version. The easiest way around this is probably to temporarily remove the chain identifier from your pdb file with your favorite editor (try a regexp in vi).
Feel free to contact me if you have any ideas, questions, problems or comments.

Hello Louic!
I have very strange issue with your good program.
(I adapted it to put also a moments of variability on the picture, but this surely is not the source of the error).
I wanted to build a scheme of 3-D model of GPCR with variability vectors and other data. I liked very much results for TM helices 1-3, but for TM4 not
The problem is that program distorts molecule while ‘normalizing’ coordinates and after that it builds incorrect wheel, viewed from the ’side’ rather than from the ‘top’. This is not due to rotations — I checked with -norotate option as well as reconstructed PDB file from the CA-coordinates from the log-file after internal rotation.
I would be thankful if you tell me what’s the mess. Where I can send you my file and a picture with erroneous result?
Thanks in advance.
Anton
29 Oct 08 at 10:10 pm
Most probably the error is in
$x .= $x/abs($x)->max;
$y .= $y/abs($y)->max;
$z .= $z/abs($z)->max;
lines.
I don’t understand them completely since I’m new to Perl.
Anton
29 Oct 08 at 10:11 pm
Hi Anton!
Thank you for the useful comments. It appears you have found a serious error in the script, both in the part you mention, and in another place as well. I have corrected these two errors, so it should work now.
Thanks again for your useful comments!
louic
30 Oct 08 at 3:15 pm