AW: AW: tclBC incorrect output

From: Norman Geist (
Date: Fri May 04 2012 - 01:10:57 CDT


yes of course you find the right atoms in the pdb, this part works, but you
count every line of the pdb that you are looping through as atom numbers,
this is wrong. Look to the line containing "incr atomID". This causes, that
with every line of the pdb, this number is raised by 1, but this are not the
right atom numbers. So you find your first atom you want, but your counter
is already +1 to high as your first line is not an atom. Then somewhere else
you get the coordinates to that wrong atom numbers, so for other atoms than
you expect. This script would only work if all lines of the pdb would be
atoms and numbered from 1, no TER no REMARK or something else allowed, but
this is really unlikely. You could simply remove the two lines I told you in
the previous post, and add an additional line where I told you which could
look like:

set atomID [string range $line 6 10]

The above line simply take a range of character positions out of the pdb
line and should exactly get the right atom numbers from the pdb. If I got it
right, the script should work then. I don't understand why someone publish a
script, that reads several information from the pdb file, and then, instead
of reading the right atom number also, as it is so easy, do such a nonsense.
But that’s not your fault.

Let me know

Norman Geist.

> -----Ursprüngliche Nachricht-----
> Von: P.-L. Chau []
> Gesendet: Donnerstag, 3. Mai 2012 08:44
> An: Norman Geist
> Cc: Namd Mailing List
> Betreff: Re: AW: namd-l: tclBC incorrect output
> Many thanks for your message.
> > is there a special reason why you are using your own atomID ??
> As I said, I adapted this from a tclBC script.
> > Remember that not all lines of an pdb are atoms, but you inc every
> > iteration of the foreach loop. As the getcoord command uses the real
> > atomids and yours are wrong, your coordinates put are for different
> > atoms.
> In my file, I know that all lines are atoms, except for the first line.
> The initial six lines of output shows that the initial part of the
> script
> (the bit before the ####### line) works correctly:
> LEU A 250 CA
> LEU B 256 CA
> LEU C 264 CA
> LEU D 250 CA
> LEU E 259 CA
> 71170 77036 83081 89113 95134
> These are indeed the atoms whose coordinates I would like to print out.
> I
> know what they are from the PDB file, but the output from the script
> does
> not correspond to the numbers in the PBD file.
> I tried your suggestion, but I am afraid it did not work. I still get
> the
> incorrect coordinates.
> Thank you very much anyway.
> email:
> Bioinformatique Structurale
> CNRS URA 2185
> Institut Pasteur
> 75724 Paris
> France
> tel: +33 1 45688546
> fax: +33 1 45688719

This archive was generated by hypermail 2.1.6 : Mon Dec 31 2012 - 23:21:30 CST