Better verbosity and format cleanup in bank update
authorDawid Jagiela <lightnir@chem.univ.gda.pl>
Wed, 4 Jul 2012 09:36:10 +0000 (05:36 -0400)
committerDawid Jagiela <lightnir@chem.univ.gda.pl>
Wed, 4 Jul 2012 09:36:10 +0000 (05:36 -0400)
source/ga/GA.f
source/ga/input-templates/matrix/start_all.pbs
source/ga/pdby.sh [new file with mode: 0755]
source/ga/tester.sh

index 3446217..0173d36 100644 (file)
@@ -213,31 +213,37 @@ c --- debug end ---
            if (populacja(i,20).lt.bank(j,20)) then
             write(tmptext,'(I4)') j
             write(tmptext2,'(I4)') i
-            call write2log("Swaping ind"//trim(tmptext)//" from bank to &
-     &ind "//trim(tmptext2)//" from population")
-            write(tmptext2,'(21F7.5)') bank(j,:)
-            call write2log("BANK"//trim(tmptext)//":"//trim(tmptext2))
+            call write2log("  Swaping ind"//trim(tmptext)//" from bank t&
+     &o ind "//trim(tmptext2)//" from population")
+            write(tmptext2,'(19F8.5,E15.7,F8.5)') bank(j,:)
+            call write2log("  BANK"//trim(tmptext)//":"//trim(tmptext2))
 
             write(tmptext,'(I4)') i
-            write(tmptext2,'(21F7.5)') populacja(i,:)
-            call write2log("POP"//trim(tmptext)//":"//trim(tmptext2))
+            write(tmptext2,'(19F8.5,E15.7,F8.5)') populacja(i,:)
+            call write2log("  POP "//trim(tmptext)//":"//trim(tmptext2))
       
             bank(j,:)=populacja(i,:)
+           else
+            call write2log("  Found simialar but not better")
            endif
           else              ! W banku nie ma podobnego 
            j=FindWorst(banksize,bank)
-           write(tmptext,'(I4)') j
+           write(tmptext2,'(I4)') j
            if (populacja(i,20).lt.bank(j,20)) then
-            call write2log("Worst in bank is "//trim(tmptext))
-            write(tmptext2,'(21F7.5)') bank(j,:)
-            call write2log("BANK"//trim(tmptext)//":"//trim(tmptext2))
-           
+            call write2log("  Worst in bank is "//trim(tmptext2))
+            write(tmptext,'(I4)') i
+            call write2log("  Swaping worst ind in bank to "//trim(tmpte&
+     &xt))
+            write(tmptext,'(I4)') j
+            write(tmptext2,'(19F8.5,E15.7,F8.5)') bank(j,:)
+            call write2log("  BANK"//trim(tmptext)//":"//trim(tmptext2))
             write(tmptext,'(I4)') i
-            call write2log("Swaping worst ind in bank to "//trim(tmptext&
-     &))
-            write(tmptext2,'(21F7.5)') populacja(i,:)
-            call write2log("POP"//trim(tmptext)//":"//trim(tmptext2))
+            write(tmptext2,'(19F8.5,E15.7,F8.5)') populacja(i,:)
+            call write2log("  POP "//trim(tmptext)//":"//trim(tmptext2))
             bank(j,:)=populacja(i,:)
+           else
+            call write2log("  The worst in bank is better then this Ind"&
+     &)
            endif
           endif
          enddo
@@ -1316,7 +1322,7 @@ c        call write2log("Delta is "//tmp)
           mindelta=delta
           pozycja=i
           write(tmp,'(F7.5,X,I4)') delta,pozycja
-          call write2log("Delta is "//tmp)
+          call write2log("  Delta is "//tmp)
         endif
       end do
 
index 0a7c42a..1d8dd1a 100755 (executable)
@@ -20,6 +20,8 @@ time /users/software/mpich_ssh/bin/mpirun -machinefile $PBS_NODEFILE -np 16 ./op
 set DATA=`date +%Y-%m-%d-%H%M%S`
 mkdir ceiksy-$DATA
 mv *.cx ceiksy-$DATA
+cp *.pdb ceiksy-$DATA
+cp unresga.bank ceiksy-$DATA   
 
 #mail -s "Scheraga - wyniki dla single-test sa dostepne" lightnir@gmail.com
 
diff --git a/source/ga/pdby.sh b/source/ga/pdby.sh
new file mode 100755 (executable)
index 0000000..5dcb57b
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+cd build
+
+PIERWSZY=`ls -1d *"/"|head -n1`
+echo $PIERWSZY
+
+cd $PIERWSZY
+echo "Najniższy RMS"
+grep "RMS" 1LE1_wham_*.pdb|sort -k6|head -n1
+
+#echo "Najcześciej występująca konformacja"
+#grep "FREE" 1LE1_wham_*.pdb
+cd ..
+
+OSTATNI=`ls -1d *"/"|tail -n1`
+echo $OSTATNI
+
+echo "Najniższy RMS"
+grep "RMS" 1LE1_wham_*.pdb|sort -k6|head -n1
+cd ..
+
index 253fab2..1a1934b 100755 (executable)
@@ -6,9 +6,10 @@ if [ -d build ]; then
 fi
 make
 cd build
-cp -r ~/poligon/first-step/* ./
+cp -r ~/poligon/third-step/* ./
 ./unresga
 
 echo ""
 
-cat unresga.bank
+vim unresga.log
+#cat unresga.bank