Over a million developers have joined DZone.

A Simple Python Script To Extract CA Coordinates From A Protein Data Bank File

·
A simple python script to extract CA coordinates from a protein data bank file


pdb = open("1D9Z.pdb", "r")

for line in pdb:
    if line[:4] == 'ATOM' and line[12:16] == " CA ":
        print line

# that's all, folks!
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}