How to easily align two molecular structures in VMD
When I say “easily”, I mean that this method does not require scripting. There is still potentially a lot of guesswork required to identify a good set of atoms for Step 3 below. Bosco Ho has an alternative take on this task that is definitely worth a read.
-
Open the two structures:
vmd -m structure1.pdb structure2.pdb
-
Open the RMSD Calculator (NOT the RMSD Trajectory Tool): Extensions > Analysis > RMSD Calculator You can use the Trajectory Tool to align structures too, but the Calculator actually changes the coordinates of the aligned structure so that you can save them, while the Trajectory Tool only changes the orientation of how the two molecules are displayed with respect to one another.
-
Specify the atoms you want to use in the text box in the upper left corner of the RMSD Calculator. If you want to use every atom from both structures, simply type “protein”. If you want to use only a portion of each molecule to align the structures, open the Sequence viewer: Extensions > Analysis > Sequence viewer and identify the residue ID numbers from each structure. Now you can type a list in the atomselect box, e.g. “residue 30 to 40”.
If the residue numbers differ between the two structures, a cumbersome, though simple workaround is to specify the residue name, or some other attribute that is different between the 2 structures, in addition to the number, e.g. “(resid 30 and resname “LYS”) or (resid 31 and resname “LYS”)” where the lysine of interest is residue 30 in one structure and residue 31 in the other.
-
Click the Align button.
-
Right-click on the structure you aligned (the one that is NOT the reference) in the VMD Main window, and select Save Coordinates… to save your new aligned structure to a new file.