in reply to Distance between points in a PDB file
I haven't tried, but I think these may help:
cpan.org/~itub, esp. Chemistry-File-PDB.