anchor.diff:        if (score_type .eq. 1) then
             call read_score_matrix(nst,n_str,amat,rmsd_delta, rmsd_a)
         elseif (score_type .eq. 2) then
  -          call tm_score_all(ndim,nst,n_str,Lch,x,y,z,amat,rmsd_delta,
  +          call tm_score_all(ndim,n_str,Lch,x,y,z,amat,rmsd_delta,
        &                      rmsd_a)
         else
  -          call rmsd_score_all(ndim,nst,w,n_str,Lch,x,y,z,amat,
  +          call rmsd_score_all(ndim,w,n_str,Lch,x,y,z,amat,
        &                        rmsd_delta,rmsd_a)
         endif
   
  
positive.code:       rmsd2_a=rmsd2_a/n_rmsd
        rmsd_delta=sqrt(rmsd2_a-rmsd_a**2) ! 68.2% is in [-d,+d]
  
  
  c^^^^^^^^^^^^RMSD matrics finished ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  c      write(*,*)"RETURNING rmsd_a ",rmsd_a
  c      write(*,*)"RETURNING rmsd_delta ",rmsd_delta
  c      write(*,*)"MINA MAXA ",mina,maxa
        return
        end
  
  
        subroutine read_score_matrix(nst,n_str,amat,rmsd_delta,
       & rmsd_a)
  
negative.code:       dimension xtemp(ndim),ytemp(ndim),ztemp(ndim) !structure close to templ
        dimension xt(ndim),yt(ndim),zt(ndim) !temporal coordinate
        dimension x_n(ndim),y_n(ndim),z_n(ndim) !native structure
  cjmht dimension x(ndim,nst),y(ndim,nst),z(ndim,nst) !used structures
  cjmht dimension amat(nst,nst)    !RMSD matrics
        real, allocatable :: x(:,:), y(:,:), z(:,:)
        real, allocatable :: amat(:,:)
  cjmht
        dimension mark(nst)       !for removing used structures
        dimension n_str_near(nst) !numbef of neighboring structures
        dimension itra(nst),istr(nst),E(nst)
  