UNRES-Dock restart
[django_unres.git] / django_simple / todo / views.py
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