From d368b6f6d2c47c7f30ca7a0d8dfb02c73de314da Mon Sep 17 00:00:00 2001 From: Cezary Czaplewski Date: Thu, 3 Sep 2020 22:51:05 +0200 Subject: [PATCH] number of clusters <> 5 --- django_simple/todo/forms.py | 2 + django_simple/todo/jobfiles.py | 3 +- django_simple/todo/models.py | 1 + django_simple/todo/templates/details.html | 8 +- django_simple/todo/templates/details1.html | 214 +++++----------------------- django_simple/todo/templatetags/index.py | 7 +- django_simple/todo/views.py | 50 +++++-- 7 files changed, 87 insertions(+), 198 deletions(-) diff --git a/django_simple/todo/forms.py b/django_simple/todo/forms.py index 50dab80..74779e2 100644 --- a/django_simple/todo/forms.py +++ b/django_simple/todo/forms.py @@ -620,6 +620,8 @@ class TaskForm_dock_a(forms.Form): remd_cluter_temp = forms.FloatField(label='TEMPER', help_text='temperature for cluster analysis',initial=280) + remd_cluster_n = forms.IntegerField(label='NCLUST',initial=10,min_value=2, + max_value=50,help_text='number of clusters') def clean(self): cleaned_data = super(TaskForm_dock_a, self).clean() diff --git a/django_simple/todo/jobfiles.py b/django_simple/todo/jobfiles.py index 5248031..e2f0829 100644 --- a/django_simple/todo/jobfiles.py +++ b/django_simple/todo/jobfiles.py @@ -524,7 +524,8 @@ rm tmp_plik2.pdb act.rebuilt.pdb\n""") f.write(instance.name + ' UNRES server job'+ '\n') f.write('{:79}'.format('nres='+str(len(seq)) +' one_letter rescale=2 PRINT_CART PDBOUT=1 iopt=1' - +' temper='+str(instance.remd_cluter_temp))+'&\n') + +' temper='+str(instance.remd_cluter_temp) + +' nclust='+str(instance.remd_cluster_n))+'&\n') if instance.md_2d != '': f.write('{:79}'.format(' WITH_DIHED_CONSTR')+'&\n') if instance.type == 'dock': diff --git a/django_simple/todo/models.py b/django_simple/todo/models.py index 5629bf5..c235012 100644 --- a/django_simple/todo/models.py +++ b/django_simple/todo/models.py @@ -86,6 +86,7 @@ class Task(models.Model): remd_model4 = models.TextField(default='') remd_model5 = models.TextField(default='') remd_models = models.TextField(default='') + remd_cluster_n = models.IntegerField(default=5) #saxs scal_rad = models.FloatField(default=1.0) diff --git a/django_simple/todo/templates/details.html b/django_simple/todo/templates/details.html index 9fd9a03..c6bfd20 100644 --- a/django_simple/todo/templates/details.html +++ b/django_simple/todo/templates/details.html @@ -349,6 +349,10 @@ Created {{ task.created_date }}
temperature for clustering
{{ task.remd_cluter_temp}}
+
  • +
    number of clusters
    +
    {{ task.remd_cluster_n}}
    +
  • {% if task.saxs_data != "" %}
  • wsaxs
    @@ -638,7 +642,7 @@ Created {{ task.created_date }}
  • - {% for iii in "12345" %} + {% for iii in range %} {% with istr=forloop.counter|stringformat:"s" %} {% with MODELi="MODEL"|add:istr|add:".pdb" %} @@ -652,7 +656,7 @@ Created {{ task.created_date }} {% if not task.damino %} after conversion to allatom {% endif %} - {{ remd_models|index:forloop.counter|linebreaks }} + {{ remd_models|index:iii|linebreaks }} NGL viewer
    diff --git a/django_simple/todo/templates/details1.html b/django_simple/todo/templates/details1.html index 27b5a1f..be13e07 100644 --- a/django_simple/todo/templates/details1.html +++ b/django_simple/todo/templates/details1.html @@ -1,5 +1,6 @@ {% extends "base.html" %} +{% load index %} {% load i18n lazysignup_tags %} {% block content %} @@ -339,6 +340,11 @@ Created {{ task.created_date }}
    temperature for clustering
    {{ task.remd_cluter_temp}}
    +
  • +
    number of clusters
    +
    {{ task.remd_cluster_n}}
    +
  • + {% if task.saxs_data != "" %}
  • wsaxs
    @@ -627,188 +633,45 @@ Created {{ task.created_date }}
  • - + + {% for iii in range %} + + {% with istr=forloop.counter|stringformat:"s" %} + {% with MODELi="MODEL"|add:istr|add:".pdb" %} + {% with viewporti="viewport_M"|add:istr %} + {% with toggleRefi="toggleRefM"|add:istr %} + {% with toggleSidechainsi="toggleSidechainsM"|add:istr %} +
    - -
  • -
    model1 - {% if not task.damino %} - after conversion to allatom - {% endif %} - {{ task.remd_model1|linebreaks }} - NGL viewer
    -
    -
    -
  • -
  • -
    - {% if task.md_pdbref %} - - {% endif %} - - Download -
    -
  • - -
    -
    - -
  • -
    model2 - {% if not task.damino %} - after conversion to allatom - {% endif %} - {{ task.remd_model2|linebreaks }} - NGL viewer
    -
    -
    -
  • -
  • -
    - {% if task.md_pdbref %} - - {% endif %} - - Download -
    -
  • - - -
    -
    - -
  • -
    model3 - {% if not task.damino %} - after conversion to allatom - {% endif %} - {{ task.remd_model3|linebreaks }} - NGL viewer
    -
    -
    -
  • -
  • -
    - {% if task.md_pdbref %} - - {% endif %} - - Download -
    -
  • - -
    -
    - -
  • -
    model4 - {% if not task.damino %} - after conversion to allatom - {% endif %} - {{ task.remd_model4|linebreaks }} - NGL viewer
    -
    -
    -
  • -
  • -
    - {% if task.md_pdbref %} - - {% endif %} - - Download -
    -
  • - -
    -
    -
  • -
    model5 +
    model {{ iii }} {% if not task.damino %} after conversion to allatom {% endif %} - {{ task.remd_model5|linebreaks }} + {{ remd_models|index:iii|linebreaks }} NGL viewer
    -
  • {% if task.md_pdbref %} - + {% endif %} - + Download + href="/myfiles/download-file/{{task.jobdirname}}/{{MODELi}}">Download
  • -
    + {% endwith %} + {% endwith %} + {% endwith %} + {% endwith %} + {% endwith %} + {% endfor %} + {% endif %} {% endif %} @@ -836,8 +699,9 @@ $('.majorpointslegend').click(function(){ {% if task.type == "remd" or task.type == "dock" %}