I was aware of this function before asking the question. For this class, I was required to actually understand what I was doing on a mathematical level. Plus, the program I wrote was in C (personal choice), so that wouldn't have helped much.
Disclaimer: I'm taking a class to get some experience with structural informatics and this question is related to an assignment for that class.
Given a PDB file, I have written a program that will calculate various lengths and angles from the atom coordinates provided in the file. I now need to select a certain amino acid, set its phi and psi angles to 0, recalculate the atomic coordinates for all affected atoms, and check for steric clashing.
I'm struggling conceptually with how to recalculate atomic coordinates. What types of concepts do I need to understand to tackle this type of question?
3 answers
After some research, I ended up using Rodrigues' rotation formula. Given a vector v, an axis of rotation k, and a (right-handed) angle θ, the new rotated vector is calculated using the following formula.
v_rot = v cos(θ) + (k x v)sin(θ) + k (k · v)(1 - cos(θ))
In this case, the axis of symmetry k is the bond around which I'm rotating, the angle is θ is -phi or -psi (I'm setting the angles to 0), and the rotation is applied to every vector v subsequent to the axis of rotation.
Daniel, i'd start looking at rotation matrices, which have to be applied to the part of the structure affected by the dihedral angle change.
Dima
It is much much easier than all that. You just learn some basic pymol/python scripting and just using "set_dihedral", you do not have to worry about the rest, pymol does it.
Log in to answer this question.