UNRES-Dock restart
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Thu, 5 Mar 2020 19:48:14 +0000 (20:48 +0100)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Thu, 5 Mar 2020 19:48:14 +0000 (20:48 +0100)
django_simple/todo/templates/details.html
django_simple/todo/templates/details1.html
django_simple/todo/views.py

index 2b926d1..bbdebb8 100644 (file)
@@ -43,7 +43,7 @@ Created {{ task.created_date  }}
                                <div class="col-md-8">
                                        {% if task.done %}
                                                <span class="fa fa-check-square-o"></span>
-                                           {% if task.type == "md" or task.type == "remd" %}
+                                           {% if task.type == "md" or task.type == "remd" or task.type == "dock" %}
                                              <form action="restart/"
                                                method="get"
                                                style="text-align;float:right;">
index 4860b27..27b5a1f 100644 (file)
@@ -43,7 +43,7 @@ Created {{ task.created_date  }}
                                <div class="col-md-8">
                                        {% if task.done %}
                                                <span class="fa fa-check-square-o"></span>
-                                           {% if task.type == "md" or task.type == "remd" %}
+                                           {% if task.type == "md" or task.type == "remd" or task.type == "dock" %}
                                              <form action="restart/"
                                                method="get"
                                                style="text-align;float:right;">
index 5671118..e819090 100644 (file)
@@ -1017,7 +1017,7 @@ def restart0(task):
       add_restart_inp()
       ret_code = subprocess.Popen(' /opt/torque/bin/qsub pbs.csh', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)            
       os.chdir('..')
-    elif task.type == 'remd':
+    elif task.type == 'remd' or task.type == 'dock':
       os.chdir(task.jobdirname)
       add_restart_inp()
       tmp1=json.loads(task.remd_multi_m)
@@ -1038,6 +1038,15 @@ def restart0(task):
             f2.write(line)
       os.remove('file_wham.inp')
       os.rename('file_wham.tmp','file_wham.inp')
+      if task.type == 'dock':
+        with open('pbs8.csh','r') as f1, open ('pbs8.tmp','w') as f2:
+          for line in f1:
+            if 'generator_v13' in line:
+              f2.write('#'+line)
+            else:
+              f2.write(line)
+        os.remove('pbs8.csh')
+        os.rename('pbs8.tmp','pbs8.csh')
       ret_code = subprocess.Popen(' /opt/torque/bin/qsub pbs8.csh', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)            
       os.chdir('..')
     return