nmr txt angle
authorczarek <cezary.czaplewski@ug.edu.pl>
Fri, 21 Oct 2022 10:31:36 +0000 (12:31 +0200)
committerczarek <cezary.czaplewski@ug.edu.pl>
Fri, 21 Oct 2022 10:31:36 +0000 (12:31 +0200)
django_simple/todo/jobfiles.py

index 9ba022e..e471b06 100644 (file)
@@ -400,6 +400,15 @@ CUTOFF=7.00000 WCORR4=0.00000"""
             f.write(seq_2d_write(seq_2d_xx(instance.md_2d,seq)))
 #---v
        if instance.type == 'remd' and instance.use_nmr and instance.nmr_format == 'txt':
+            fnmr = open(instance.jobdirname+'/plik3.nmr', 'r')
+            nmr_txt_gamatheta=False
+            for linmr in fnmr:
+              if 'phi' in linmr or 'psi' in linmr :
+                f.write('@include gamatheta.txt\n')
+                nmr_txt_gamatheta=True
+                break
+            fnmr.close()    
+       
             f.write('ndist='+repr(instance.linijek_nmr)+' restr_type=12 scal_peak=')
             f.write(repr(instance.nmr_scal)+' fordepth_peak='+repr(instance.nmr_fordepth))
             f.write(' slope_peak='+repr(instance.nmr_slope)+'\n')
@@ -592,6 +601,8 @@ rm tmp_plik2.pdb act.rebuilt.pdb\n""")
 
 #---v
           if instance.use_nmr and instance.nmr_format == 'txt':
+            if nmr_txt_gamatheta:
+              f.write('@include gamatheta.txt\n')
             f.write('ndist='+repr(instance.linijek_nmr)+' restr_type=12 scal_peak=')
             f.write(repr(instance.nmr_scal)+' fordepth_peak='+repr(instance.nmr_fordepth))
             f.write(' slope_peak='+repr(instance.nmr_slope)+'\n')
@@ -717,6 +728,8 @@ rm tmp_plik2.pdb act.rebuilt.pdb\n""")
 
 #---v
           if instance.use_nmr and instance.nmr_format == 'txt':
+            if nmr_txt_gamatheta:
+              f.write('@include gamatheta.txt\n')
             f.write('ndist='+repr(instance.linijek_nmr)+' restr_type=12 scal_peak=')
             f.write(repr(instance.nmr_scal)+' fordepth_peak='+repr(instance.nmr_fordepth))
             f.write(' slope_peak='+repr(instance.nmr_slope)+'\n')