From: Bjoern Olausson (
Date: Wed Aug 24 2011 - 06:10:45 CDT

On Wednesday 24 August 2011 11:48:09 hamze rahimi wrote:
> In resulted pdb from namd or vmd, the HETATM records will become ATOM
> records, and the previously empty chain ID field (between residue name and
> residue ID) will be set to X , therefore H have problem when I want
> analysis pdb file with other software. How can I convert this pdb to
> normal pdb format?
> Thanks for kindly help

First of all, do not cross post between VMD/NAMD lists unless there is a
reason to.

I try to stay away from the PDB format wherever it is possible. PDB format is
the worst of all I have to deal with in most cases it is way better to use the
mol2 format.

Try to convert your PDB with "Open Babel"
( from PDB to PDB or manually fix the
errors with "sed" or an text editor.

Save the part which contains the HETATM records, open it in any editor and
just use search and replace to fix the RECORD or use "sed":
sed -e "s/HETATM/ATOM /g" -i file_with_the_hetatm_part.txt

Keep track of the column width when using search and replace.
Then just merge the files again.

You might want to try "simulaid" as well, it can "Convert atom and residue
names among Charmm, Amber, Gromos/Gromacs, Moil, ChemX, and PDB conventions"


Bjoern Olausson
Martin-Luther-Universitšt Halle-Wittenberg 
Fachbereich Biochemie/Biotechnologie
Kurt-Mothes-Str. 3
06120 Halle/Saale
Phone: +49-345-55-24942