ATOM lines in PDB files
column 1 2 3 4 5 6 7 8 number 12345678901234567890123456789012345678901234567890123456789012345678901234567890 ATOM 1 N GLY A 3 17.119 0.186 36.320 1.00 64.10 N ATOM 2 CA GLY A 3 16.944 -0.800 35.208 1.00 63.46 C ATOM 3 C GLY A 3 16.818 -0.087 33.851 1.00 61.22 C ATOM 4 O GLY A 3 15.721 0.337 33.463 1.00 62.81 O ATOM 5 N PRO A 4 17.944 0.077 33.129 1.00 57.39 N ATOM 6 CA PRO A 4 17.950 0.742 31.815 1.00 53.27 C ATOM 7 C PRO A 4 18.005 -0.247 30.629 1.00 49.78 C ATOM 8 O PRO A 4 19.086 -0.678 30.218 1.00 48.17 O ATOM 9 CB PRO A 4 19.191 1.613 31.898 1.00 54.33 C ATOM 10 CG PRO A 4 20.161 0.686 32.625 1.00 55.45 C ATOM 11 CD PRO A 4 19.305 0.019 33.701 1.00 55.83 C field id 1 2 3 4 5 6 7 8 9 10 11 12 13 1415
field id | definition | length | format | range | string slicing (Python) |
1 | "ATOM " or "HETATM" | 6 | {:6s} | 01-06 | [0:6] |
2 | atom serial number | 5 | {:5d} | 07-11 | [6:11] |
3 | atom name | 4 | {:^4s} | 13-16 | [12:16] |
4 | alternate location indicator | 1 | {:1s} | 17 | [16:17] |
5 | residue name | 3 | {:3s} | 18-20 | [17:20] |
6 | chain identifier | 1 | {:1s} | 22 | [21:22] |
7 | residue sequence number | 4 | {:4d} | 23-26 | [22:26] |
8 | code for insertion of residues | 1 | {:1s} | 27 | [26:27] |
9 | orthogonal coordinates for X (in Angstroms) | 8 | {:8.3f} | 31-38 | [30:38] |
10 | orthogonal coordinates for Y (in Angstroms) | 8 | {:8.3f} | 39-46 | [38:46] |
11 | orthogonal coordinates for Z (in Angstroms) | 8 | {:8.3f} | 47-54 | [46:54] |
12 | occupancy | 6 | {:6.2f} | 55-60 | [54:60] |
13 | temperature factor | 6 | {:6.2f} | 61-66 | [60:66] |
14 | element symbol | 2 | {:>2s} | 77-78 | [76:78] |
15 | charge on the atom | 2 | {:2s} | 79-80 | [78:80] |
Formated string for ATOM
lines in PDB files (copy and paste this line into your Python code):
"{:6s}{:5d} {:^4s}{:1s}{:3s} {:1s}{:4d}{:1s} {:8.3f}{:8.3f}{:8.3f}{:6.2f}{:6.2f} {:>2s}{:2s}".format(...)
The table above should be compliant with the PDB File Format as described in the Contents Guide Version 3.3 (Nov. 21, 2012)