Re: odd display of ambpdb generated files

From: Mark Forster <>
Date: Tue 17 Apr 2001 16:58:49 +0100

Dear Amber Users

Richard is quite right in his assessment that the main problem here is
the column in which the atom name starts. Most PDB entries
that include protons have the majority of atom names starting
in the 14th column, with names such as HG21 altered to 1HG2
and started in the 13th column. This avoids the atom name and
residue name running into one another, and is what insightII
expects. To keep space between the atom and residue names
the ambpdb code elects to start all atom names in the 13th column.

I have provided a simple fix with a PERL script to modify the atom names
and columns used for an ambpdb generated PDB file.

The usage for the script is ambpdb.pdb > newfile.pdb

# M Forster, NIBSC, April 2001
# read PDB file created by AMBER ambpdb program
# using command line ambpdb < inpcrd > ambpdb.pdb
# fix atom names so that they start in 14th rather than 13th column
# but names HG21 ARE altered to 1HG2 starting in 13th column.
if ($#ARGV != 0) {
        die "usage: file.pdb\n";
# --------------------------------------------------------
# read PDB file
open(FILE1,$filename1) || die "cant open $filename1: $! \n";
# read ATOM or HETATM records
while ($_ = <FILE1>) {
 # read ATOM records - store for later analysis
 if ($str1 eq 'ATOM ' || $str1 eq 'HETATM') {
  $atomname=~ s/ //g;
  substr($_,12,4)=" ";
  if ($len < 4) {
  } else {
  print $_;
 } else {
  print $_;


Hope this helps

Mark F

Richard W Dixon wrote:

> I also suspect that the atom label is justified too far to the left.
> Specifically, (note spacing and alignment)
> 1HG2 ILE
> or
> HG21 ILE
> The first two forms are handled by Insight in the way you would want (but do
> generate a "template mismatch"). The third causes Insight to assume you have
> mercury in your pdb file and to perform a distance based bond check. The colat
> (Color by atom) command should also generate weird results (purple atoms) in
> this case. There are not too many fixes for this other than convincing ambpdb
> to conform to Insight's expectations, or visualizing with some other, more
> understanding, program. If you don't need a builder, there are many other
> options out there. Since Insight relabels and reorders the atoms to conform to
> its interpretation of V2.0 of the PDB format specs whether you want it to or
> not, I tend to avoid mixing amber and insight for anything unless I am forced.
> HTH.
> Richard
> Richard Dixon
> Abbott Bioresearch Center (formerly BASF)
> Elsa Sousa Henriques <> on 04/16/2001 01:49:03 PM
> Please respond to
> To: Jake Isaacs <rjisaa0
> cc: AMBER list <amber
> Subject: Re: odd display of ambpdb generated files
> ------------------------------------------------------------------------
> Jake Isaacs wrote:
> >
> > When I use InsightII to view a pdb file created from prmtop
> > and inpcrd via ambpdb, multiple anomalous bonds appear.
> > What might be the cause and solution for this?
> >
> Assuming that your pdb is for a protein or a DNA (i.e. with
> standard residues InsightII recognizes), are there only heavy
> atoms or did you include hydrogens also? My experience is that
> since there are no unique labelling for the H's (e.g. a 3HA in
> AMBER might be a 2HA in InsightII), many of the AMBER H's will
> be unknown atoms to InsightII ... thus the anomalous bonds.
> Hope it helps,
> Elsa
> _______________________________________________________________
> 互户互户互户户互户互户互互户互
> 
> 獿'amore che muove il sol e l 'altre stelle
> Dante Alighieri
> (La Divina Commedia)
> _______________________________________________________________
> 互户互户互户户互户互户互互户互
> 
> Elsa F. Sousa Henriques e-mail:
> Dept. Quimica, FCUP phone: +351-22-6082827
> Rua do Campo Alegre, 687 fax: +351-22-6082959
> 4169-007 PORTO

  Dr Mark J Forster Ph.D.
  Principal Scientist
  Informatics Laboratory
  National Institute for Biological Standards and Control
  Blanche Lane, South Mimms,
  Hertfordshire EN6 3QG, United Kingdom.
  Tel  +44 (0)1707 654753
  FAX  +44 (0)1707 646730
Received on Tue Apr 17 2001 - 08:58:49 PDT
Custom Search