switch for respa, D aminoacids, saxs tutorial, license
[django_unres.git] / django_simple / todo / views.py
index c513fbf..2f358cc 100644 (file)
@@ -25,11 +25,11 @@ res_codes = [
 three_to_one = dict(res_codes)
 
 def seq_add_x(sequence):
-    if sequence[0] != 'G':
+    if sequence[0] != 'G' and sequence[0] != 'g':
         sequence='X'+sequence
-    if sequence[-1] != 'G':
+    if sequence[-1] != 'G' and sequence[-1] != 'g':
         sequence=sequence+'X'
-    set ='CDSQKIPTFNGHLRWAVEYMX'
+    set ='CDSQKIPTFNGHLRWAVEYMXcdsqkiptfnghlrwaveym'
     sequence = ''.join([c for c in sequence if c in set])
 
     return(sequence)    
@@ -332,6 +332,7 @@ def add_md_a(request,task_id):
              task.md_scal_fric=form.cleaned_data["md_scal_fric"]
              task.md_mdpdb=form.cleaned_data["md_mdpdb"]
              task.unres_ff=form.cleaned_data["unres_ff"]
+             task.md_respa=form.cleaned_data["md_respa"]             
              task.boxx=form.cleaned_data["boxx"]
              task.boxy=form.cleaned_data["boxy"]             
              task.boxz=form.cleaned_data["boxz"]             
@@ -506,6 +507,7 @@ def add_remd_a(request,task_id):
              task.remd_nstex=form.cleaned_data["remd_nstex"]
              task.md_ntwx=form.cleaned_data["md_ntwx"]             
              task.md_ntwe=form.cleaned_data["md_ntwe"]
+             task.md_respa=form.cleaned_data["md_respa"]
 #             task.remd_traj1file=form.cleaned_data["remd_traj1file"]
 #             task.remd_rest1file=form.cleaned_data["remd_rest1file"]