Renumbering

Francesco Pietra chiendarret at gmail.com
Tue Sep 2 22:57:05 CEST 2008


Hi;

I would like to renumber, starting from 1, column 6 (i.e, 428 become
1, 429 becomes 2, etc for a very long list)

ATOM   3424  N   LEU B 428     143.814  87.271  77.726  1.00115.20       2SG3426
ATOM   3425  CA  LEU B 428     142.918  87.524  78.875  1.00115.20       2SG3427
ATOM   3426  CB  LEU B 428     141.559  88.057  78.392  1.00115.20       2SG3428
ATOM   3427  CG  LEU B 428     140.577  88.341  79.544  1.00115.20       2SG3429
ATOM   3428  CD1 LEU B 428     141.102  89.464  80.454  1.00115.20       2SG3430
ATOM   3429  CD2 LEU B 428     139.159  88.615  79.017  1.00115.20       2SG3431
ATOM   3430  C   LEU B 428     142.680  86.253  79.615  1.00115.20       2SG3432
ATOM   3431  O   LEU B 428     142.725  86.226  80.842  1.00115.20       2SG3433
ATOM   3432  N   SER B 429     142.432  85.155  78.878  1.00134.86       2SG3434
ATOM   3433  CA  SER B 429     142.175  83.908  79.534  1.00134.86       2SG3435
ATOM   3434  CB  SER B 429     141.666  82.805  78.590  1.00134.86       2SG3436
ATOM   3435  OG  SER B 429     140.392  83.155  78.069  1.00134.86       2SG3437
ATOM   3436  C   SER B 429     143.451  83.432  80.141  1.00134.86       2SG3438
ATOM   3437  O   SER B 429     144.543  83.756  79.676  1.00134.86       2SG3439

Distinctive character is column 5, i.e., it must be set that only
lines containing "B" should be renumbered.

As you can see, the number of lines for a particular value in column 6
changes from situation to situation, and may even be different for the
same name in column 4. For example, LEU can have a different number of
lines depending on the position of this amino acid (leucine).

I was unable to set non-proportional characters, sorry.

Thanks for help

francesco pietra



More information about the Python-list mailing list