Ed Pozharski wrote:
On Fri, 2010-08-20 at 18:50 +0200, Charles W. Carter, Jr wrote:
Is there a program that will read in a pdb coordinate file and re-order the
side chain atoms in each residue according to a standard order?
I've a program that compares two files for the same structure, but requires
that the order of the atoms be the same in both cases. I'm using a variety of
files in which the residue atoms are ordered either main chain first or
side-chain first. I've not found a suitable program in the CCP4 suite, though
one might exist. MOLEMAN2 doesn't seem suitable, either.
Thanks,
Charlie
How about this
---
cut -c 13-27 a.pdb | awk '{printf "grep \"%s\" b.pdb\n",$0;}' | bash -sf
---
or:
awk '$1~/ATOM|HETATM/' a.pdb \
|sort -t\n -k1.22,1.22 -k1.23,1.26n -k1.13,1.17 > a1.pdb
This will sort the (HET)ATOM records, first by chain (k1.22,1.22),
then by residue (1.23,1.26), then by atom-type(1.13,1.17).
Then do the same for b.pdb.