anchor.diff:    open(111,file='out.txt',status='replace')
     !~write(111,*) '#energy,', 'occurrence,', 'matching structures with increasing energy'
     do i=1,size(tl)
  -    write(111,'(F16.5,I4,F10.5,F10.5,9999I5)') (struc_rep(tl(i)%i(1))%energy-e_ub)*h2kcm, size(tl(i)%i), maxrmsd(i), maxediff(i),&
  +    write(111,'(F16.5,I4,F10.5,F10.5,9999I5)') (struc_rep(tl(i)%i(1))%energy-e_ub)*econv, size(tl(i)%i), maxrmsd(i), maxediff(i),&
       & struc_rep(tl(i)%i(:))%tag
     end do
     close(111)
  
positive.code: 	call progressbar_add(tmpratio,curratio)
  	tmpratio = curratio
      do j=1,size(tl)
        ediff_tmp = abs(struc_get_energy(struc_rep(i)) - struc_get_energy(struc_rep(tl(j)%i(1))))*h2kcm
        if (ediff_tmp .gt. ediff_lim) cycle
        
        call rmsd_set_anc_s2(struc_rep(tl(j)%i(1)))
        call rmsd_calc(rmsd_tmp,cnt)
        
        write(95,'(A,I4.1,A,I4.1,A,F10.4,A,F10.4,A,I4)') 'compare ',struc_rep(i)%tag,' and ',struc_rep(tl(j)%i(1))%tag,&
        &'; RMSD [A]: ',rmsd_tmp,';    Delta E [kcal/mol]: ',(struc_rep(tl(j)%i(1))%energy-struc_rep(i)%energy)*h2kcm,&
        &';  Match count:', cnt
        
        if (rmsd_tmp .ge. rmsd) cycle
  
negative.code:   maxrmsd(1) = 0.d0
    maxediff(1) = 0.d0
  
  
    write(6,'(A)') 'Starting analysis ...'
    
    tmpratio=0
  