Advertisement
reeps

the part of parser

Apr 25th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. visited = {}
  2. for line in open('3GFT.pdb'):
  3.     list = line.split()
  4.     id = list[0]
  5.     if id == 'ATOM':
  6.         type = list[2]
  7.         if type == 'CA':
  8.             residue = list[3]
  9.             type_of_chain = list[4]
  10.             atom_count = int(list[5])
  11.             position = list[6:8]
  12.             if atom_count >= 0:
  13.                 if type_of_chain not in visited:
  14.                     visited[type_of_chain] = 1
  15.                     print residue,type_of_chain,atom_count,' '.join(position)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement