anchor.diff:        return
         end
   
  -      subroutine tm_score_all(ndim,nst,n_str,Lch,x,y,z,amat,rmsd_delta,
  +      subroutine tm_score_all(ndim,n_str,Lch,x,y,z,amat,rmsd_delta,
        &                        rmsd_a)
  +c
         implicit none
  +
   c     Intent In
         integer ndim
         integer n_str ! Number of structures in use
  -      integer nst ! Max number of structures
         integer Lch ! Chain length of the structures (all same)
  -      real x(ndim,nst),y(ndim,nst),z(ndim,nst)
  +c      real x(ndim,nst),y(ndim,nst),z(ndim,nst)
  +      real, allocatable, intent(in) :: x(:,:),y(:,:), z(:,:)
  +      real, allocatable, intent(inout) :: amat(:,:)
   c     Intent Out
  -      real amat(nst,nst)
  +c      real amat(nst,nst)
         real rmsd_delta
         double precision rmsd_a
   
  
positive.code: ccc   
        dimension xt(ndim),yt(ndim),zt(ndim) !temporal coordinate
        dimension x_n(ndim),y_n(ndim),z_n(ndim) !native structure
        dimension x(ndim,nst),y(ndim,nst),z(ndim,nst) !used structures
        dimension amat(nst,nst)    !RMSD matrics
        dimension mark(nst)       !for removing used structures
        dimension n_str_near(nst) !numbef of neighboring structures
        dimension itra(nst),istr(nst),E(nst)
  
negative.code:       
  cjmht Calculate the amat with the all-by-all scores
        if (n_para.eq.-2) then
            call tm_score_all(ndim,n_str,Lch,x,y,z,amat,rmsd_delta,
       &                      rmsd_a)
        elseif (n_para.eq.-3) then
            call read_score_matrix(nst,n_str,amat,rmsd_delta, rmsd_a)
        else
            call rmsd_score_all(ndim,w,n_str,Lch,x,y,z,amat,
       &                        rmsd_delta,rmsd_a)
        endif
  
  