This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How To Apply A Rotation Matrix To Pdb File?

Hi everyone! I'm looking for some help how to apply a rotation matrix to pdb file with perl script on ubuntu(linux)? Could you help me how to write a program? i'm not a bioinformatics student but i got that task and i really don't know how to do it. :( Thanks!!!!!

linux perl ubuntu pdb matrix

2 answers

Basically, you have to calculate the dot product of the atom coordinates and the rotation matrix, for all atoms, replacing the coords of each atom as you go.

Have a look here

This page describing the script convpdb.pl might help. You can download the code from there (click "Show source"). I have not tested it.

The rotation matrix and PDB file are supplied as arguments to the script. For example, to rotate 180 degrees around the x-axis:

  convpdb.pl -rotate 1 0 0 0 1 0 0 0 1 myfile.pdb

Log in to answer this question.