ATOM 1 N ASN A 2 18.668 27.299 52.379 1.00 41.19 N
ATOM 2 CA ASN A 2 19.400 26.674 53.492 1.00 40.18 C
ATOM 3 C ASN A 2 19.710 27.737 54.550 1.00 37.56 C
ATOM 4 O ASN A 2 19.123 27.737 55.640 1.00 38.90 O
ATOM 5 N LEU A 3 20.637 28.606 54.184 1.00 34.40 N
Those in bold are the coordinates i need to extract and in the form of (x,y,z) down the list.
Would greatly appreciate your help.
From my research it seems that i can't directly extract columns but i have to do a parsing and a split token. Could someone justify this?
Pierre, PDB files are generally parsed using column numbers. Please check ATOM records for a detailed description.
I would like to add that PDB files might look simple and thus it is tempting to write your own little parser like that above. In reality there are many subtle issues in the parsing that are best left to mature libraries to handle. Thus I'd recommend the use of Biojava too, see the tutorial