import numpy
d=numpy.load("cullpdb+profile_6133_filtered.npy.gz")
file = open("cullpdb+profile_6133_filtered.txt","w") 
for p in range(5534):
    w=1
    for i in range(700):
        s=''
        if w==1:
                for j in range(33):
		    x='0'
                    if d[p,(i*57)+j]>0:
                        x='1'
		    s+=x
                s+='\n'
                file.write(s)
                if d[1,(i*57+32)]==1:
                           w=0
file.close()
