1) csacutoff log write fix 2) matrix input-template corrections
authorDawid Jagiela <lightnir@chem.univ.gda.pl>
Tue, 13 Mar 2012 13:41:44 +0000 (09:41 -0400)
committerDawid Jagiela <lightnir@chem.univ.gda.pl>
Tue, 13 Mar 2012 13:41:44 +0000 (09:41 -0400)
source/ga/GA.f
source/ga/input-templates/matrix/start_all.pbs
source/ga/input-templates/matrix/unresga.inp

index cfb58a3..47a65a5 100644 (file)
@@ -81,8 +81,6 @@ c No. Prepere next generation
        read(ostate,'(L2)') do_ga
        read(ostate,'(F7.5)') avrd
        close(ostate)
-       write(tmptext,'(I4)') generation 
-       call write2log("This is genaration "//tmptext)
        if (do_ga) then
         call write2log("Doing GA in this step")
        endif
@@ -91,7 +89,8 @@ c No. Prepere next generation
         call write2log("ZSCORE weights minimalization disabled for now")
         generation=generation+1
        endif
-
+       write(tmptext,'(I4)') generation 
+       call write2log("This is genaration "//tmptext)
        call ReadOptimaW(BANK_MULTIPLIER*banksize,populacja)
 
 c Yes. Generate random zero-population
@@ -166,9 +165,12 @@ c --- debug begin ---
 c --- debug end ---
          call GetNBest(populacja,bank,banksize)
          call CalcAvgDist(bank,avrd)
+         write(tmptext,'(F7.5)') avrd
+         call write2log("Average distance between individuals in initial&
+     & bank is "//trim(tmptext))
+         csacutoff=(maxco*avrd)-generation*avrd*(maxco-minco)/maxgen
          write(tmptext,'(F7.5)') csacutoff
-         call write2log("CSA cutoff is now set to "//tmptext)
-          csacutoff=(maxco*avrd)-generation*avrd*(maxco-minco)/maxgen
+         call write2log("CSA cutoff is now set to "//trim(tmptext))
 c         csacutoff=maxco*avrd         
 
          
@@ -201,7 +203,7 @@ c --- debug end ---
   
          do i=1,BANK_MULTIPLIER*banksize
           write(tmptext,'(I4)') i
-          call write2log("Checking ind "//tmptext)  
+          call write2log("Checking ind "//trim(tmptext))  
           j=ZnajdzPodobnego(banksize,bank,populacja(i,:),csacutoff)
           if (j.gt.0) then
            if (populacja(i,20).lt.bank(j,20)) then
@@ -246,7 +248,7 @@ c         csacutoff=csacutoff-(generation*cicutoff/maxgen)
 c       csacutoff=cicutoff*(0.8**(iter-1))
 
          write(tmptext,'(F7.5)') csacutoff
-         call write2log("CSA cutoff is now set to "//tmptext)
+         call write2log("CSA cutoff is now set to "//trim(tmptext))
         endif
        case('cluster')
         write(*,*) "Some stuff here in the future"
@@ -388,7 +390,7 @@ c
       else
        if (do_fs) then
         do_optima=.not.do_optima
-        if (generation.eq.1) then
+        if (generation.eq.0) then
          do_ga=.false.
         else
          do_ga=.not.do_ga
@@ -408,7 +410,7 @@ c      call WritePopSum()
 c
 c Create the inputs
 c 
-      write(tmptext,'(I)') generation
+      write(tmptext,'(I)') generation+1
       call write2log("Preparing inputs for next generation ("//trim(adju&
      &stl(tmptext))//")")
       call CreateInputs(BANK_MULTIPLIER*banksize,populacja)
index 3a7a92c..0a7c42a 100755 (executable)
@@ -1,4 +1,4 @@
-#PBS -N 1LE1-1LY2
+#PBS -N 1LE1
 #PBS -q dque
 #PBS -l nodes=32:ppn=8
 #PBS -l walltime=1:00:00
index a4e74ce..6fa5253 100644 (file)
@@ -1,7 +1,8 @@
 pdb=1LE1.pdb
 alg=csa
 generations=5
-cicutoff=0.01
+minco=0.0
+maxco=0.5
 population=8
 whamtemplate=1LE1_wham.tpl
 mremdtemplate=1LE1_mremd.tpl