What options do I have to align two PDB-files of ribosomes but with different number of atoms? I need to do the alignment using selection "name CA or name P", because the ribosome has both protein and RNA.

From my previous work I learned that PyMol can do alignment where it doesn't matter if the number of atoms is different, but there is problem because PyMol can only do the alignment using CA atoms, and thus it ignores my "name P" from rRNA.

I also tried to align the structures in VMD using RMSD Calculator but there needs to be same number of atoms in both selections. I also tried MDAnalysis code but there is also the problem that the selection doesn't have the same number of atoms.

Are there any suggestions on how to perform such an alignment? The best option seems to be PyMol (as it works with a different number of atoms in the two selections), but how do I incorporate the RNA into the alignment?

  • 4
    $\begingroup$ You may have more luck on SE Bioinformatics. (Oh, and amount of sugar, number of lumps.) $\endgroup$
    – David
    Commented Jul 22, 2022 at 21:53
  • 2
    $\begingroup$ I use ChimeraX for structural superposition and it may work for your needs. See this command specifically. It also has a GUI. $\endgroup$
    – canadianer
    Commented Jul 23, 2022 at 1:54
  • $\begingroup$ Does this answer your question? How to perform a DNA structural alignment in pymol $\endgroup$
    – pippo1980
    Commented Apr 9 at 4:11

1 Answer 1


When encountering that problem for single pdb files I often default to using the MultiSeq tool in VMD. This pairs sequence information and structural information to create very good alignments. MultiSeq can also align RNA.

If you require to do this over a trajectory, I would start by doing an alignment with MultiSeq and from this alignment identify residue-residue correspondences. Ignore gaps in the sequence alignment and align the backbone atoms of all other residues. This ensures that the number of atoms is identical in both selection and that you can use the "meausure fit" command in VMD.

In VMD you need to make sure that the selected atoms are in the correct order. Assume that you have two sequences that align like this:


then you can do

set idA [mol new MoleculeA.pdb]
set selA [atomselect $idA "backbone and resid 1 to 8"]
set idB [mol new MoleculeB.pdb]
set selB [atomselect \$idB"backbone and (resid 1 to 4 or resid 8 to 12)"]
\$selB move [measure fit \$selA \$selB]

Trajectories are then done similarly by moving through with animate goto \$frame in between.

When using the MDAnalysis python library you can make use of a selection dictionary for alignment. The select option of MDAnalysis.analysis.align.AlignTraj can take in a dictionary like this:

{'mobile':"resid 1-8", 'reference':"resid 1-4 or resid 8-12"}


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .