How to do a RMS fit of two sets of PDB coordinates with CNS and Rasmol

  1. Start with a pdb file
  2. Run changepdb
    1. Enter the file name
    2. Select cns
    3. 0
    4. enter the name of the residue (3 letters)
    5. y
    6. enter the name of the other pdb file
    7. return
    8. h
    9. q
  3. Now, you have got dummy topology and parameter files for the molecule

  4. You also get the two cns script files generate and rmsfit
  5. Run

  6. cns <generate >gen.out
    Check the output file that the run was sucessful
    You have now got the structure file <residue>.mtf
  7. Change the atom names, residue name, and residue number in the alternative pdb file so that they are the same as in the first file after point 2 above.

  8. This can be done either by emacs (copying the coordinates) or by running changepdb again on the other file.
  9. Run

  10. cns <rmsfit >rms.out
    Check the output file that the run was sucessful
    The result is in fit.pdb, where the second pdb file has been rotated and translated to an optimum fit.
  11. If you want to visualise these two files with rasmol, do the following
  12. changepdb
    1. <residue>.pdb
    2. con
    3. p1
    4. q
  13. changepdb
    1. Enter the name of the second pdb file
    2. ren
    3. Enter a number at larger than the number of atoms in the file
    4. con
    5. p2
    6. q
  14. cat p1 p2 | sort >mergfit
  15. rasmol mergfit
  16. You may want to change the connetions in the mergfit file.


Example of a CNS file (only protein) for generating structure and performing the rms fit
remarks CNS generate and rmsfit file
remarks Ulf Ryde, 22/2-01
remarks Subroutine for generating the a  .mtf file
remarks Subroutine for making RMS fit of two pdb files with CNS

{Set flags}
set echo=off end

{Read topology, parameter, segment and coordinates}
topology    @CNS_TOPPAR:protein.top  end
! topology    @xxx.top  end
parameter   @CNS_TOPPAR:protein_rep.param  end
! parameter   @xxx.par  end
segment
   name=" "
   chain coordinates @file.pdb end
end
! write structure   output=xxx.mtf end

{Read the alternative coordinates}
coordinates copy end
coordinates @alt.pdb

{Perform a RMS fit of the alt coordinates
 and write them out in file fit.pdb}
coordinates fit selection=(all) end
write coordinates output=fit.pdb end

stop