Revision 11 src/CalcRmsd.f90

CalcRmsd.f90 (revision 11)
56 56
      real(KREAL) ::  U(3,3), rmsd
57 57
      LOGICAL  FRot,FAlign,Debug
58 58

  
59
      REAL(KREAL) :: Coord1(3,Nat), Coord2(3,Nat)
59
      REAL(KREAL),ALLOCATABLE :: Coord1(:,:), Coord2(:,:) ! 3,Nat
60 60
      real(KREAL) ::  x0c1,y0c1,z0c1, xc2,yc2,zc2
61 61
      
62 62

  
......
76 76

  
77 77
      debug=valid('CalcRmsd').OR.valid('align').OR.valid('alignpartial')
78 78

  
79
      if (debug) Call Header("Entering CalcRmsd")
80

  
81
      if (debug) THEN
82
         WRITE(*,*) "NAt=",NAt
83
         WRITE(*,*) x0
84
         WRITE(*,*) y0
85
         WRITE(*,*) z0
86
      END IF
87

  
88
      ALLOCATE(Coord1(3,Nat),Coord2(3,Nat))
79 89
  ! calculate the barycenters, centroidal coordinates, and the norms
80 90
      x_norm = 0.0d0
81 91
      y_norm = 0.0d0
......
86 96
      yc2=0.
87 97
      zc2=0.
88 98
      do ia=1,Nat
99
         if (debug) WRITE(*,'(A,I5,4(1X,F10.4))') 'ia...',ia,x0(ia), &
100
                             x2(ia),x0c1,xc2
89 101
         x0c1=x0c1+x0(ia)
90 102
         xc2=xc2+x2(ia)
91 103
         y0c1=y0c1+y0(ia)
92 104
         yc2=yc2+y2(ia)
93 105
         z0c1=z0c1+z0(ia)
94 106
         zc2=zc2+z2(ia)
95
!         if (debug) WRITE(*,'(A,I5,4(1X,F10.4))') 'ia...',ia,x0(ia),
96
!     &                        x2(ia),x0c1,xc2
107
         if (debug) WRITE(*,'(A,I5,4(1X,F10.4))') 'ia...',ia,x0(ia), &
108
                             x2(ia),x0c1,xc2
97 109
      END DO
98 110
      x0c1=x0c1/dble(Nat)
99 111
      y0c1=y0c1/dble(Nat)
......
195 207
         END DO
196 208
      END IF
197 209

  
198
      END
210
      DEALLOCATE(Coord1,Coord2)
211

  
212
    END subroutine CalcRmsd

Also available in: Unified diff