fluct bfactor for pdb with alternate conformations CA
[django_unres.git] / files / fluct_plot.py
index 8d6e214..609ca4d 100755 (executable)
@@ -49,13 +49,15 @@ for i in range(1,natom+1):
    y.append(fluct)
 
 b=[]
+ires=''
 if os.path.exists('plik.pdb'):
  with open('plik.pdb') as f:
    for line in f:
       if line[0:4]=='ATOM' and line[13:15]=='CA':
 #         print line
+        if ires=='' or int(line[22:26])>ires:
          b.append(math.sqrt(float(line[60:66])*3/8/math.pi/math.pi))
-                  
+         ires=int(line[22:26])         
 
 
 plt.xlabel('residue')