2
$\begingroup$

i have two protein pdb files and want to calculate the backchain RMSD between them. As far as I know the GUI of Pymol can use align to calculate the RMSD (but I don't know if it is the backchain RMSD).I want to use the python code to use pymol to calculate the backchain RMSD. I know how to align them but don't know how to calculate the RMSD.

import pymol2
with pymol2.PYMOL() as pymol:
    pymol.cmd.load('foo.pdb', 'foo')
    pymol.cmd.load('bar.pdb', 'bar')
    pymol.cmd.align('foo', 'bar')
    
$\endgroup$
1
  • $\begingroup$ Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. $\endgroup$
    – Community Bot
    Feb 9 at 10:00

1 Answer 1

2
$\begingroup$

The backbone can be specified using a selector for the names of these, which are N, CA (Cα) and C (C-prime).

out = pymol.cmd.align('foo and name N+CA+C and polymer', 'bar and name N+CA+C and polymer')
rmsd, n_atoms, n_cyles, n_rmsd_pre, n_atom_pre, score, n_res = out

If you do not wish the proteins to be moved you can use rms_cur, which is just the rmsd.

$\endgroup$
1
  • $\begingroup$ Thank you for your answer! It works well! however,i want to further learn related knowledge about pymol like this. Can you provide some web/cook book name? $\endgroup$ Feb 13 at 1:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.