aminoacid list update and chain without CA correction
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Wed, 24 Jan 2018 09:26:46 +0000 (10:26 +0100)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Wed, 24 Jan 2018 09:26:46 +0000 (10:26 +0100)
django_simple/todo/forms.py
django_simple/todo/views.py

index 22aef8d..61b9144 100644 (file)
@@ -9,9 +9,10 @@ import urllib
 
 aa_3letter = [
      'DPR','DLY','DAR','DHI','DAS','DGL','DSG','DGN','DSN','DTH',
-     'DYY','DAL','DTY','DTR','DVA','DLE','DIL','DPN','MED','DCY',
+     'DAL','DTY','DTR','DVA','DLE','DIL','DPN','MED','DCY',
      'CYS','MET','PHE','ILE','LEU','VAL','TRP','TYR','ALA','GLY','THR',
-     'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO']
+     'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO',
+     'SME','AIB','ABU','DBZ']
 
 
 def pdb_code_chain(pdbid):
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