Hi:
How to replace with blank the single-character in column 21 of a pdb
file (in pdb numbering it is column 22). Attached is an incomplete
exercise with slices. I am unable to get real plain text with gmail.

Thanks for help

francesco pietra
# Sample line
# Slice indexes cut to the left of the corrresponding item index
#           1         2         3         4         5         6
# 012345678901234567890123456789012345678901234567890123456789012345 ...
# ATOM      1  N   LEU A   1     153.242  64.673  95.851  0.00  0.00           N


data = open('in.pdb', 'r')
outp = open('out.pdb', 'w')

for L in data:
   if L[21] == 'A':
     L = L[ ???
   outp.write(L)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to