Answers.Body: <p>The backbone can be specified using a selector for the names of these, which are <code>N</code>, <code>CA</code> (Cα) and <code>C</code> (C-prime).</p>
  <pre><code>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
  </code></pre>
  <p>If you do not wish the proteins to be moved you can use <code>rms_cur</code>, which is just the rmsd.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-13T01:51:42.017Z
Answers.Text: 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?
Answers.UserDisplayName: chengyun zhang
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-10T18:29:12.463Z
Answers.LastActivityDate: 2023-02-10T18:29:12.463Z
Answers.UserDisplayName: Matteo Ferla
Body: <p>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.</p>
  <pre><code>import pymol2
  with pymol2.PYMOL() as pymol:
      pymol.cmd.load('foo.pdb', 'foo')
      pymol.cmd.load('bar.pdb', 'bar')
      pymol.cmd.align('foo', 'bar')
      
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-02-09T10:00:58.040Z
Comments.Text: 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.
Comments.UserDisplayName: Community
Tags: <python><pymol>
Title: calculate the backchain RMSD between two pdb files by pymol in Python
ThreadText: # calculate the backchain RMSD between two pdb files by pymol in Python
  
  (Asked by: username_0 on 2023-02-09)
  
  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')
      
  
  ```
  
  **Tags:** python, pymol
  
  > **Comments:**
  > **username_1**: 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.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2023-02-10. Score: 2
  
  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.
  
  > **Comments:**
  > **username_0**: 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?  
  
  ---
  
  