From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Mon Oct 12 2009 - 10:10:06 CDT

On Mon, 2009-10-12 at 10:04 -0400, Christine Horejs wrote:
> Hi everybody,

hi christine,

> I was editing a pdb-file using awk in Linux. Now I wanted to see the
> structure in VMD, but looks like I have a format mistake now in the
> file. I can see the beads, but they are all in one line, so the
> coordinates are obviously not recognized.

i find it usually much easier to edit coordinates in VMD directly
using selection functions generated by the atomselect command.

> Does anyone know, how to get the right format in awk for the following
> file (the last two columns are only information for me and should not
> influence the structure):

you can check out the PDB format right from the PBD homepage at:
http://www.wwpdb.org/docs.html

the PDB format is based on fixed(!) format fortran i/o which is
difficult to completely emulate from c i/o based code like awk.
the easiest way to test is to put a column marker into your output
and compare to the column requirements of the PDB format:

REMARK 1 2 3 4 5 6 7
REMARK78901234567890123456789012345678901234567890123456789012345678901234567890

> ATOM 0 BB SER 1 0 -31.958 -25.125 -11.061 1.00
> 0.00 -0.8 0
> ATOM 1 BB GLY 1 1 -32.079 -26.085 -14.466 1.00
> 0.00 -0.4 0

[...]

cheers,
   axel.

> I am thankful for every information,
>
>
> best wishes,
> Christine

-- 
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com 
Institute for Computational Molecular Science
College of Science and Technology
Temple University, Philadelphia PA, USA.