From 5a52e318fbba09f787c91fadc8d364d16c2d452d Mon Sep 17 00:00:00 2001 From: Cezary Czaplewski Date: Tue, 10 Apr 2018 23:13:28 +0200 Subject: [PATCH] restart for md and remd --- django_simple/todo/jobfiles.py | 10 +++---- django_simple/todo/models.py | 1 + django_simple/todo/templates/details.html | 28 ++++++++++++++++--- django_simple/todo/urls.py | 1 + django_simple/todo/views.py | 42 +++++++++++++++++++++++++++++ files/matplotlib_fit_hist.py | 19 +++++++------ files/matplotlib_hist.py | 14 +++++----- 7 files changed, 92 insertions(+), 23 deletions(-) diff --git a/django_simple/todo/jobfiles.py b/django_simple/todo/jobfiles.py index 6328f4e..61d2c45 100644 --- a/django_simple/todo/jobfiles.py +++ b/django_simple/todo/jobfiles.py @@ -147,7 +147,7 @@ CUTOFF=7.00000 WCORR4=0.00000""" if instance.md_pdbref: control_line = control_line+'pdbref ' - type_line = 'reset_vel=0'\ + type_line = 'restart reset_vel=0'\ +' t_bath='+str(instance.md_temp)\ +' nstep='+str(instance.md_nstep)\ +' ntwe='+str(instance.md_ntwe)\ @@ -187,7 +187,7 @@ CUTOFF=7.00000 WCORR4=0.00000""" cntrl_saxs=' nsaxs='+str(nsaxs)+' scal_rad='+str(instance.scal_rad) control_line += cntrl_saxs - type_line = 'reset_vel='+ str(instance.remd_nstex)\ + type_line = 'restart reset_vel='+ str(instance.remd_nstex)\ +' nstep='+str(instance.md_nstep)\ +' ntwe='+str(instance.md_ntwe)\ +' ntwx='+str(instance.md_ntwx)\ @@ -400,12 +400,12 @@ CUTOFF=7.00000 WCORR4=0.00000""" isampl=1 else: isampl=int(instance.md_nstep/instance.md_ntwx*nreplicas/8000) - + f.write('{:79}'.format(' isampl='+str(isampl))+'&\n') if instance.md_pdbref: - f.write('{:79}'.format('SEED='+str(instance.md_seed)+' isampl='+str(isampl)+ + f.write('{:79}'.format('SEED='+str(instance.md_seed)+ ' einicheck=1 rescale=2 delta=0.02 cxfile classify')+'&\n') else: - f.write('{:79}'.format('SEED='+str(instance.md_seed)+' isampl='+str(isampl)+ + f.write('{:79}'.format('SEED='+str(instance.md_seed)+ ' einicheck=1 rescale=2 delta=0.02 cxfile')+'&\n') if instance.md_2d != '': f.write('{:79}'.format(' WITH_DIHED_CONSTR')+'&\n') diff --git a/django_simple/todo/models.py b/django_simple/todo/models.py index fc0f358..0291472 100644 --- a/django_simple/todo/models.py +++ b/django_simple/todo/models.py @@ -70,6 +70,7 @@ class Task(models.Model): md_mdpdb = models.BooleanField(default=False) md_seq = models.TextField(max_length=2000,default='') md_2d = models.TextField(max_length=2000,default='') + md_total_steps = models.IntegerField(default=200000) #remd remd_nrep = models.IntegerField(default=8) diff --git a/django_simple/todo/templates/details.html b/django_simple/todo/templates/details.html index 783ed7e..d32f9fe 100644 --- a/django_simple/todo/templates/details.html +++ b/django_simple/todo/templates/details.html @@ -43,6 +43,18 @@ Created {{ task.created_date }}
{% if task.done %} + {% if task.type == "md" or task.type == "remd" %} +
+ {% csrf_token %} + + +
+ {% endif %} {% else %} {% if task.running > 0 %} {{ task.md_nstep}}
  • +
    total steps (with restarts)
    +
    {{ task.md_total_steps}}
    +
  • +
  • ntwe
    {{ task.md_ntwe}}
  • @@ -262,6 +278,10 @@ Created {{ task.created_date }}
    {{ task.md_nstep}}
  • +
    total steps (with restarts)
    +
    {{ task.md_total_steps}}
    +
  • +
  • ntwe
    {{ task.md_ntwe}}
  • @@ -427,7 +447,8 @@ Created {{ task.created_date }}
    Movie
    -