[MMTK] all atom pdb to c alpha

Konrad Hinsen research at khinsen.fastmail.net
Wed Jun 13 07:00:38 UTC 2012

Naomi Fox writes:

 > Not sure what the commands in MMTK are, but if you don't care about
 > losing the header at the top, you are only working with
 > single-model files, and just want the ATOM lines, you can just use
 > grep.

The problem with using grep is that you will get not only the C-alpha
atoms, but also the calcium ions in the output file.

One way to do a better check is to verify the chemical element column
for "C". Unfortunately many PDB files don't have it, but if the files
are recent downloads from the PDB itself, that's a good
solution. Otherwise one could check the residue name field, but that's
a tricky business if the files come from non-PDB sources, which may
use non-standard residue names even for standard residues.

Either of these approaches become messy with grep. The attached Python
script shows how to do this using MMTK, verifying atom name and chemical
element. It reads in the whole PDB file, removes everything but C-alpha
atoms, and writes the structure to a new file.

Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: research AT khinsen DOT fastmail DOT net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ca_filter.py
Type: application/octet-stream
Size: 486 bytes
Desc: not available
URL: <http://starship.python.net/pipermail/mmtk/attachments/20120613/df22d325/attachment.obj>

More information about the mmtk mailing list