{"id":198,"date":"2008-10-17T18:21:54","date_gmt":"2008-10-17T16:21:54","guid":{"rendered":"http:\/\/blog.louic.nl\/?p=198"},"modified":"2011-05-27T17:36:23","modified_gmt":"2011-05-27T15:36:23","slug":"draw-a-helical-wheel-plot-from-a-pdb-file","status":"publish","type":"post","link":"https:\/\/blog.louic.nl\/?p=198","title":{"rendered":"Draw a helical wheel plot from a pdb file"},"content":{"rendered":"<p>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.<\/p>\n<p><strong>This script needs the PDL and SVG modules, and makes some assumptions as to how your pdb file looks. Please read below.<\/strong><\/p>\n<p>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. The modules can be downloaded from http:\/\/www.cpan.org. You also need the Getopt::Long and Pod::Usage modules, but you probably already have those. I only tested it on Linux, but it should work on windows XP (and other versions) as well.<\/p>\n<p>I have made the script available under the <a href=\"http:\/\/creativecommons.org\/licenses\/by-nc-sa\/2.5\/\">creative commons by-nc-sa licence<\/a>, 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.<\/p>\n<p><a href=\".\/files\/wheel.tar.bz2\">click here to download (wheel.tar.bz2)<\/a><br \/>\n(but please continue reading for more information)<\/p>\n<p>To learn how to use the program, you can take a look at the man-page with<\/p>\n<pre>.\/wheel.pl -m<\/pre>\n<p>The program goes through the following steps to draw the helical wheel:<\/p>\n<ul>\n<li>Read the coordinates of the CA atoms from the pdb file<\/li>\n<li>Find the principal axis of those atoms (the longest axis)<\/li>\n<li>Move the centre of mass to the origin<\/li>\n<li>Calculate the mass distribution tensor of the CA atoms<\/li>\n<li>Calculate the eigenvectors and eigenvalues of this matrix (the matrix of eigenvectors is the rotation matrix)<\/li>\n<li>Rotate the principal axis to coincide with the z-axis<\/li>\n<li>Draw the xy-plane, which is the helical wheel plot<\/li>\n<\/ul>\n<p>The numerical data for all steps is written to a log-file, in case you want to know what happened.<\/p>\n<p>The output image will look similar to this (it is resized and converted to a png file here for web publishing):<br \/>\n<img decoding=\"async\" loading=\"lazy\" src=\".\/files\/wheel-example.png\" alt=\"helical wheel plot example\" height=\"300\" width=\"300\" \/><br \/>\nBecause the program creates an SVG image, it may be edited and resized without losing quality. I recommend <a href=\"http:\/\/www.inkscape.org\/\">inkscape<\/a> for this purpose.<\/p>\n<p>It is important to realize that this program does not show the idealized helical wheel representation, but a projection of the CA atoms on the xy plane of the actual pdb coordinates. This is useful, but of course leads to images that \"look less nice\" than the idealized helical wheels. If a helix is curved, has a kink, or flexible termini, the output may not be what you expect. If this is the case, the principal helix axis that is calculated by the software does not lead to the \"nice\" representation you want to see, even though it is technically correct.<\/p>\n<p>There are three ways I can think of to solve this problem:<\/p>\n<ol>\n<li>remove some amino acid residues (by using the -startres and -endres options of the program, or by removing them from the pdb file). But this may not be what you want.<\/li>\n<li>align (a part of) the helix to the z-axis manually (for example using <a href=\"http:\/\/blog.louic.nl\/?p=397\">molmol<\/a>), and then use the -norotate option of the program. Although the helix will not be aligned to the principal axis, it may better represent the relative position of the amino acids as you want to show it (and still be correct).<\/li>\n<li>a combination of (1) and (2)<\/li>\n<\/ol>\n<p>Please also 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:<\/p>\n<pre>ATOM      1  N   LYS+    1       2.006  -6.797 -16.583  1.00  0.00\r\nATOM      2  H   LYS+    1       2.409  -5.881 -16.443  1.00  0.00\r\nATOM      3  CA  LYS+    1       1.934  -7.721 -15.428  1.00  0.00\r\nATOM      4  HA  LYS+    1       0.893  -7.948 -15.252  1.00  0.00\r\nATOM      5  CB  LYS+    1       2.689  -9.032 -15.717  1.00  0.00<\/pre>\n<p>At the moment, pdb-files that contain a chain identifier field cannot be read without making a small change to the source code of the script. 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).<\/p>\n<p>Feel free to contact me if you have any ideas, questions, problems or comments.<\/p>\n<p><a href=\".\/files\/wheel.tar.bz2\">download (wheel.tar.bz2)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <a href=\"https:\/\/blog.louic.nl\/?p=198\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[37],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.louic.nl\/index.php?rest_route=\/wp\/v2\/posts\/198"}],"collection":[{"href":"https:\/\/blog.louic.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.louic.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.louic.nl\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.louic.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=198"}],"version-history":[{"count":39,"href":"https:\/\/blog.louic.nl\/index.php?rest_route=\/wp\/v2\/posts\/198\/revisions"}],"predecessor-version":[{"id":564,"href":"https:\/\/blog.louic.nl\/index.php?rest_route=\/wp\/v2\/posts\/198\/revisions\/564"}],"wp:attachment":[{"href":"https:\/\/blog.louic.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.louic.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.louic.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}