NEWCT-9P force field
[django_unres.git] / django_simple / todo / jobfiles.py
index ee1ed09..32deb54 100644 (file)
@@ -90,6 +90,12 @@ WSCLOC=0.10554 WTOR=1.34316 WTORD=1.26571 WCORRH=0.19212 WCORR5=0.00000        &
 WCORR6=0.00000 WEL_LOC=0.37357 WTURN3=1.40323 WTURN4=0.64673 WTURN6=0.00000    &
 WVDWPP=0.23173 WHPB=1.00000 WSCCOR=0.25                                        &
 CUTOFF=7.00000 WCORR4=0.00000"""
+     elif  instance.unres_ff =='NEWCT-9P':
+      w="""WSC=0.81230 WSCP=1.20420 WELEC=0.87690 WBOND=1.00000 WANG=1.97730              &
+WSCLOC=0.063657 WTOR=1.41540 WTORD=0.00000 WCORRH=0.00000 WCORR5=0.00000       &
+WCORR6=0.00000 WEL_LOC=0.036638 WTURN3=1.45110 WTURN4=0.00000 WTURN6=0.00000   &
+WSCCOR=0.00000 WVDWPP=0.33393 WHPB=1.00000 WSCP14=0.00000                      &
+CUTOFF=7.00000 WCORR4=0.00000"""
      else:
       w="""WSC=0.82686 WSCP=0.96947 WELEC=0.79373 WBOND=1.00000 WANG=0.46542              &
 WSCLOC=0.07969 WTOR=0.81684 WTORD=0.67806 WCORRH=0.00000 WCORR5=0.00000        &
@@ -117,6 +123,8 @@ CUTOFF=7.00000 WCORR4=0.00000"""
             control_line = control_line+'pdbout '
           if instance.min_unres_pdb:
             control_line = control_line+'unres_pdb '
+          if instance.unres_ff =='NEWCT-9P':
+            control_line = control_line+'tormode=2 '
             
           type_line = 'print_min_ini print_min_res print_min_stat'\
             +' MAXMIN='+str(instance.min_maxmin)\
@@ -146,6 +154,9 @@ CUTOFF=7.00000 WCORR4=0.00000"""
 
           if instance.md_pdbref:
              control_line = control_line+'pdbref '
+             
+          if instance.unres_ff =='NEWCT-9P':
+            control_line = control_line+'tormode=2 '
             
           type_line = '        reset_vel=0'\
              +' t_bath='+str(instance.md_temp)\
@@ -176,6 +187,9 @@ CUTOFF=7.00000 WCORR4=0.00000"""
            
           if instance.md_pdbref:
              control_line = control_line+'pdbref '
+             
+          if instance.unres_ff =='NEWCT-9P':
+            control_line = control_line+'tormode=2 '
           
           cntrl_saxs=''
           if instance.saxs_data != '':
@@ -223,7 +237,7 @@ CUTOFF=7.00000 WCORR4=0.00000"""
            f.write('{:79}'.format(element)+'&\n')
        f.write(word_list[-1]+'\n')
           
-       if instance.md_start == 'pdbstart':
+       if instance.md_start == 'pdbstart' and instance.unres_ff !='NEWCT-9P':
         if instance.type == 'remd' or instance.type == 'dock':
          f.write('print_min_ini print_min_res print_min_stat maxfun='+
            str(instance.min_maxfun)+'\n')
@@ -265,6 +279,9 @@ CUTOFF=7.00000 WCORR4=0.00000"""
           if instance.md_2d == '':
             f.write('0\n')
           else:
+           if instance.unres_ff =='NEWCT-9P':
+            f.write(seq_2d_write_50(seq_2d_xx(instance.md_2d,seq)))
+           else:
             f.write(seq_2d_write(seq_2d_xx(instance.md_2d,seq)))
         
        if instance.type == 'dock':
@@ -286,6 +303,9 @@ CUTOFF=7.00000 WCORR4=0.00000"""
           if instance.md_2d == '':
             f.write('0\n')
           else:
+           if instance.unres_ff =='NEWCT-9P':
+            f.write(seq_2d_write_50(seq_2d_xx(instance.md_2d,seq)))
+           else:
             f.write(seq_2d_write(seq_2d_xx(instance.md_2d,seq)))
 
 
@@ -300,6 +320,9 @@ CUTOFF=7.00000 WCORR4=0.00000"""
           if instance.md_2d == '':
             f.write('0\n')
           else:
+           if instance.unres_ff =='NEWCT-9P':
+            f.write(seq_2d_write_50(seq_2d_xx(instance.md_2d,seq)))
+           else:
             f.write(seq_2d_write(seq_2d_xx(instance.md_2d,seq)))
 
 
@@ -315,6 +338,8 @@ CUTOFF=7.00000 WCORR4=0.00000"""
       os.chdir(instance.jobdirname)
       if  instance.unres_ff =='FF2':
         shutil.copy('../files/pbs.csh','.')
+      elif instance.unres_ff =='NEWCT-9P':
+        shutil.copy('../files/pbs_newct-9p.csh','pbs.csh')
       else:
         shutil.copy('../files/pbs_new.csh','pbs.csh')
       ret_code = subprocess.Popen(' /opt/torque/bin/qsub pbs.csh', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
@@ -323,6 +348,8 @@ CUTOFF=7.00000 WCORR4=0.00000"""
       os.chdir(instance.jobdirname)
       if  instance.unres_ff =='FF2':
         f1 = open('../files/pbs_md.csh', 'r')
+      elif instance.unres_ff =='NEWCT-9P':
+        f1 = open('../files/pbs_md_newct-9p.csh', 'r')
       else:
         f1 = open('../files/pbs_md_new.csh', 'r') 
       f2 = open('pbs.csh', 'w')
@@ -369,6 +396,8 @@ CUTOFF=7.00000 WCORR4=0.00000"""
       os.chdir(instance.jobdirname)
       if  instance.unres_ff =='FF2':
         f1 = open('../files/pbs8.csh', 'r')
+      elif instance.unres_ff =='NEWCT-9P':
+        f1 = open('../files/pbs8_newct-9p.csh', 'r')
       else:
         f1 = open('../files/pbs8_new.csh', 'r')
       f2 = open('pbs8.csh', 'w')
@@ -411,6 +440,8 @@ CUTOFF=7.00000 WCORR4=0.00000"""
                f.write('{:79}'.format(' WITH_DIHED_CONSTR')+'&\n')
           if instance.type == 'dock':
                f.write('{:79}'.format(' n_ene=19 CONSTR_HOMOL=20')+'&\n')
+          if instance.unres_ff =='NEWCT-9P':
+               f.write('{:79}'.format('tormode=2 ')+'&\n')
           f.write('BOXX='+str(instance.boxx)+' BOXY='+str(instance.boxy)+
                     ' BOXZ='+str(instance.boxz)+cntrl_saxs +'\n')
                  
@@ -478,6 +509,8 @@ CUTOFF=7.00000 WCORR4=0.00000"""
                f.write('{:79}'.format(' WITH_DIHED_CONSTR')+'&\n')
           if instance.type == 'dock':
                f.write('{:79}'.format(' CONSTR_HOMOL=20')+'&\n')
+          if instance.unres_ff =='NEWCT-9P':
+               f.write('{:79}'.format('tormode=2 ')+'&\n')
           f.write('BOXX='+str(instance.boxx)+' BOXY='+str(instance.boxy)+
                   ' BOXZ='+str(instance.boxz)+cntrl_saxs +'\n')
           f.write(w+'\n')