tutorial update, d-amino correction
[django_unres.git] / files / pbs8_new.csh
index 6d9d029..ec056c1 100755 (executable)
@@ -67,6 +67,21 @@ setenv CLUSTER_WHAM_BIN /users2/czarek/UNRES/git3_tmp/build/bin/cluster_wham-mul
 
 $MPIRUN -machinefile $PBS_NODEFILE -np 2 $CLUSTER_WHAM_BIN
 
+if `awk '{cap=toupper($0); if (cap!=$0) {print 1;exit}}' file.seq` then
+#no allatom conversion/refinementkx for proteins with D-aminoacids
+ ln -s file_wham_T*K_ave.pdb ave
+ sed -n '/ENERGY/,/ENDMDL/p' ave >tmp.pdb
+ setenv numstruc `grep ENERGY tmp.pdb|wc -l`
+ setenv allline `cat tmp.pdb|wc -l`
+ setenv onestruc `echo $allline "/" $numstruc| bc -l|sed 's/\.0*//'`
+ foreach i (2 4 6 8 10)
+   setenv headval `echo $i "*" $onestruc|bc -l`
+   setenv halfi `echo $i/2|bc`
+   head -n $headval tmp.pdb | tail -n $onestruc >MODEL${halfi}.pdb
+ end
+ rm ave tmp.pdb
+else
+# proteins with L-aminoacids only
 ln -s file_wham_T*K_ave.pdb ave
 ../files/cluster2allatom.sh ave
 rm ave
@@ -75,6 +90,7 @@ rm ave
 foreach i (`seq 1 5`)
 ../files/refine.sh MODEL$i.pdb $ssbond
 end
+endif
 
 /users2/local/pymol_1.6/pymol -c ../files/model.pml