X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Fga%2FGA.f;h=be7bbdad26ae3c0853b99a747ec4e9e80a8ea753;hb=56c5d798bd1ac963ac768c9f27747c928e4e795f;hp=0173d36d97ac05a087e6be3b14129e6a1906e85c;hpb=1ec0b628c4a65830ef2e63b6b47ef4e4604d37fa;p=unres.git diff --git a/source/ga/GA.f b/source/ga/GA.f index 0173d36..be7bbda 100644 --- a/source/ga/GA.f +++ b/source/ga/GA.f @@ -102,7 +102,7 @@ c Yes. Generate random zero-population do_ga=.false. endif -c End of "fisrst time here?" code +c End of "first time here?" code endif c @@ -168,6 +168,9 @@ c --- debug end --- write(tmptext,'(F7.5)') avrd call write2log("Average distance between individuals in initial& & bank is "//trim(tmptext)) +c +c Cutoff +c csacutoff=(maxco*avrd)-generation*avrd*(maxco-minco)/maxgen write(tmptext,'(F7.5)') csacutoff call write2log("CSA cutoff is now set to "//trim(tmptext)) @@ -267,7 +270,7 @@ c --- debug end --- endif case('cluster') - write(*,*) "Some stuff here in the future" + write(*,*) "Well this is not implemented yet" goto 2010 end select @@ -1639,6 +1642,37 @@ c ---------------------------------------------------------------------- end subroutine c ====================================================================== +c WriteBankHistory subroutine +c ====================================================================== +c Writes CSA BANK History to file +c ---------------------------------------------------------------------- + subroutine WriteBankHistory(b) + include 'io.inc' + include 'common.inc' + real*8,dimension(banksize,21) :: b + character*250 :: tmptext + character*250 :: header + + + header="# WLONG WSCP WELEC WBOND WANG WSC& + &LOC WTOR WTORD WCORRH WCORR4 WCORR5 WCORR6 & + &WEL_LOC WTURN3 WTURN4 WTURN6 WVDWPP WHPB WSCCO& + &R FFV FITNESS" + + call write2log("Writing Bank history to file "//obankhfn) + open(obankh, file = obankhfn) + write(iobank, "(A)") trim(adjustl(header)) + + do i=1,banksize + write(obankh,'(19F10.5,E15.7,F10.5)') (b(i,j),j=1,21) + write(tmptext,'(19F10.5,E15.7,F10.5)') (b(i,j),j=1,21) + call write2log(trim(tmptext)) + enddo + close(iobank) + end subroutine + +c +c ====================================================================== c ReadBank subroutine c ====================================================================== c Read CSA BANK from file