From ecc2bc1e0aea2cc133f2627bac923c44248ba503 Mon Sep 17 00:00:00 2001 From: Dawid Jagiela Date: Tue, 13 Mar 2012 09:41:44 -0400 Subject: [PATCH] 1) csacutoff log write fix 2) matrix input-template corrections --- source/ga/GA.f | 20 +++++++++++--------- source/ga/input-templates/matrix/start_all.pbs | 2 +- source/ga/input-templates/matrix/unresga.inp | 3 ++- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/source/ga/GA.f b/source/ga/GA.f index cfb58a3..47a65a5 100644 --- a/source/ga/GA.f +++ b/source/ga/GA.f @@ -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) diff --git a/source/ga/input-templates/matrix/start_all.pbs b/source/ga/input-templates/matrix/start_all.pbs index 3a7a92c..0a7c42a 100755 --- a/source/ga/input-templates/matrix/start_all.pbs +++ b/source/ga/input-templates/matrix/start_all.pbs @@ -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 diff --git a/source/ga/input-templates/matrix/unresga.inp b/source/ga/input-templates/matrix/unresga.inp index a4e74ce..6fa5253 100644 --- a/source/ga/input-templates/matrix/unresga.inp +++ b/source/ga/input-templates/matrix/unresga.inp @@ -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 -- 1.7.9.5