#!/usr/bin/python # -- George Shackelford # # takes the 'blank' T0240 pdb file and fills in x,y,z values from the corresponding # residues in the 1ihr pdb file # we have to be able to open, read and write to .gz files... # we note that the T0240 index 15 corresponds to index 216 in 1ihr # then skip fifteen again and continue with 1ihr # NOTE: UNFINISHED! We may not need this program... include gzip PDB = "/projects/compbio/data/pdb/" CASP = "~/casp6/T0240/dimer/" def skiptoatoms(name,extra=None): f = GZipFile.open() pdb = f.readlines() f.close() topdb = [] getstart = (extra!=None) for line in pdb: if get if line[0:4]=="ATOM": topdb.append(line) getstart = False if getstart: prelude.append(line) return topdb def skipresidues(pdb,start,count): # get current residues fields = pdb[start].split() ihr = skiptoatoms(PDB+"1ihr.pdb.gz") T0240 = skiptoatoms(CASP+"T0240.blank.pdb.gz",prelude) # skip 15 residues Tstart = skipresidues(T0240,0,15)