From: Dawid Jagiela Date: Thu, 5 Jul 2012 12:12:35 +0000 (-0400) Subject: filename changes X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?p=unres.git;a=commitdiff_plain;h=56c5d798bd1ac963ac768c9f27747c928e4e795f filename changes --- 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 diff --git a/source/ga/common.inc b/source/ga/common.inc index b392108..343d7c8 100644 --- a/source/ga/common.inc +++ b/source/ga/common.inc @@ -13,19 +13,20 @@ real*8 :: minco = 0.0 ! minimal CSA cutoff factor real*8 :: maxco = 0.0 ! maximal CSA cutoff factor real*8 :: avrd = 0.0 ! average distance between ind in first bank - logical :: do_optima = .false. - logical :: do_ga = .false. - logical :: do_fs = .false. - character*32 :: pdbfiles(maxnpdb) - character*32 :: scripts(maxscripts) - character*32 :: whamtemplate(maxnpdb) - character*32 :: mremdtemplate(maxnpdb) - character*16 :: alg + logical :: do_optima = .false. ! do optimization in this step (internal variable) + logical :: do_ga = .false. ! do genetic algotithm in this step (internal variable) + logical :: do_fs = .false. ! do first step (internal variable) + character*32 :: pdbfiles(maxnpdb) ! PDB filenames + character*32 :: scripts(maxscripts) ! shell scripts filenames + character*32 :: whamtemplate(maxnpdb) ! WHAM template filenames + character*32 :: mremdtemplate(maxnpdb) ! MREMD template filenames + character*32 :: zscoretemplate ! ZSCORE template filename + character*16 :: alg ! algorithm type (internal variable) common /inputy/ npdb,nscripts,ntwham,ntmremd,maxgen,banksize,csacu& &toff,avrd,minco,maxco,alg,pdbfiles,scripts,whamtemplate,mremdtempl& &ate,generation,maxminstep,do_optima, do_ga - character*7 :: version = "1.1.1" - character*50 :: info = "= Last modified by Lightnir 09/03/2012" + character*7 :: version = "1.1.2" + character*50 :: info = "= Last modified by Lightnir 04/07/2012" real*8,allocatable :: bank(:,:),populacja(:,:),temppopulacja(:,:) integer*4, allocatable :: pairs(:) diff --git a/source/ga/io.inc b/source/ga/io.inc index 77604fa..3ac741b 100644 --- a/source/ga/io.inc +++ b/source/ga/io.inc @@ -16,6 +16,7 @@ c -- I/O units integer :: izsoptw = 16 ! zscore optimized weights files integer :: izenergy = 17 integer :: iobank = 18 + integer :: obankh = 19 ! csa bank history file c -- I/O filenames character*20 :: owfn = "weights" @@ -30,4 +31,5 @@ c character*20 :: imremdfn = "mremd.tpl" ! mremd input template file character*20 :: opopsumfn = "population.summary" character*20 :: ostatefn = "unresga.state" ! unresga state file character*20 :: izenergyfn = "zscore.out_par" ! zscore generated output prefix - character*20 :: iobankfn = "unresga.bank" ! csa bank file + character*20 :: iobankfn = "unresga.bank" ! csa current bank file + character*20 :: obankhfn = "unresga.bank.history" ! csa bank history file