filter stat files before plot
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Thu, 24 Aug 2017 20:57:01 +0000 (22:57 +0200)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Sat, 26 Aug 2017 11:28:21 +0000 (13:28 +0200)
Conflicts:

files/matplotlib_fit_hist.py
files/pbs8.csh
files/pbs_md.csh

files/matplotlib_fit_hist.py
files/pbs_md.csh

index a932a04..bd4dbea 100755 (executable)
@@ -20,17 +20,17 @@ def prob_T(x,a):
 #x,y= np.loadtxt('1L2Y_NH_GB000.stat',usecols=(0,11),skiprows=10000,unpack=True)
 #x,y= np.loadtxt('1L2Y_B_GB000.stat',usecols=(0,10),skiprows=30,unpack=True)
 g=int(sys.argv[1])
-with open('file_GB000.stat','r') as f:
+with open('md.stat','r') as f:
   for line in f:
     pass
   ncolumns=len(line.split())
 
 if ncolumns==14:  
- x,y= np.loadtxt('file_GB000.stat',usecols=(0,10),skiprows=10,unpack=True)
- x1,e,r= np.loadtxt('file_GB000.stat',usecols=(0,3,5),skiprows=0,unpack=True)
+ x,y= np.loadtxt('md.stat',usecols=(0,10),skiprows=10,unpack=True)
+ x1,e,r,gy= np.loadtxt('md.stat',usecols=(0,3,5,12),skiprows=0,unpack=True)
 else:
- x,y= np.loadtxt('file_GB000.stat',usecols=(0,6),skiprows=10,unpack=True)
- x1,e= np.loadtxt('file_GB000.stat',usecols=(0,3),skiprows=0,unpack=True)
+ x,y= np.loadtxt('md.stat',usecols=(0,6),skiprows=10,unpack=True)
+ x1,e,gy= np.loadtxt('md.stat',usecols=(0,3,8),skiprows=0,unpack=True)
  
 h,bin=np.histogram(y,bins=50,density=True)
 
index 00e3840..d5344d9 100755 (executable)
@@ -33,7 +33,14 @@ setenv OUT1FILE YES
 
 $MPIRUN -machinefile $PBS_NODEFILE -np $NPROCS $UNRES_BIN
 
-../files/matplotlib_fit_hist.py $dimen3
+if ( `grep -c pdbref file.inp` ) then
+ awk '{if ( NF == 14 ) print}' file_GB000.stat > md.stat
+else
+ awk '{if ( NF == 10 ) print}' file_GB000.stat > md.stat
+endif
+
+../../files/matplotlib_fit_hist.py $dimen3
+rm md.stat
 
 if ( -f "file_MD000.pdb" ) then
  mkdir tmp