aminoacid list update and chain without CA correction
[django_unres.git] / django_simple / todo / views.py
index 31c5976..2db5186 100644 (file)
@@ -103,7 +103,7 @@ def from_pdb(file):
     unres_shift = {}
     chain_sorted=[]
     newchain = True
-    
+    i=''
     for line in file:
             if line[0:6] == 'ATOM  ' and line[13:15] == 'CA':
               aa = three_to_one.get(line[17:20])
@@ -116,7 +116,7 @@ def from_pdb(file):
                  chain_start[ch]=i
                  chain_sorted.extend(ch)
                  newchain = False
-            if line[0:3] == 'TER':
+            if line[0:3] == 'TER' and i != '':
               sequence.append('XX')
               chain_end[ch]=i
               newchain = True