csacutoff fix
[unres.git] / source / ga / GA.f
index 47a65a5..2304bfd 100644 (file)
@@ -200,6 +200,10 @@ c --- debug end ---
          call ReadBank(bank)
          write(tmptext,'(F7.5)') avrd
          call write2log("Average distance in 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 "//trim(tmptext))
   
          do i=1,BANK_MULTIPLIER*banksize
           write(tmptext,'(I4)') i
@@ -243,12 +247,6 @@ c --- debug end ---
 
          call WriteBank(bank)
 
-         csacutoff=maxco*avrd-generation*avrd*(maxco-minco)/maxgen
-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 "//trim(tmptext))
         endif
        case('cluster')
         write(*,*) "Some stuff here in the future"