Index: rmsdfun.f
===================================================================
--- rmsdfun.f	(revision e40e335d8909b50cd784019735fcdb0c28ee19bb)
+++ rmsdfun.f	(revision bd2278d6d1ff11d5a913fabac7fcc16d05c02a33)
@@ -1,31 +1,31 @@
-c **************************************************************
-c
-c This file contains the subroutines: rmsdfun,rmsdopt,fitmol,
-c                                     jacobi,rmsinit
-c
-c Copyright 2003-2005  Frank Eisenmenger, U.H.E. Hansmann,
-c                      Shura Hayryan, Chin-Ku 
-c Copyright 2007       Frank Eisenmenger, U.H.E. Hansmann,
-c                      Jan H. Meinke, Sandipan Mohanty
-c
-c **************************************************************
+! **************************************************************
+!
+! This file contains the subroutines: rmsdfun,rmsdopt,fitmol,
+!                                     jacobi,rmsinit
+!
+! Copyright 2003-2005  Frank Eisenmenger, U.H.E. Hansmann,
+!                      Shura Hayryan, Chin-Ku 
+! Copyright 2007       Frank Eisenmenger, U.H.E. Hansmann,
+!                      Jan H. Meinke, Sandipan Mohanty
+!
+! **************************************************************
 
       real*8 function rmsdfun(nml,ir1,ir2,ixat,xrf,yrf,zrf,isl)
-C
-C --------------------------------------------------------------
-c Wrapping function for calculating rmsd
-c
-c LIMITATION: requires call of rmsinit BEFORE calling this function
-c
-c CALLS: rmsdopt
-c
-c ---------------------------------------------------------------
-c
+!
+! --------------------------------------------------------------
+! Wrapping function for calculating rmsd
+!
+! LIMITATION: requires call of rmsinit BEFORE calling this function
+!
+! CALLS: rmsdopt
+!
+! ---------------------------------------------------------------
+!
       include 'INCL.H'
       include 'INCP.H'
-c
-c Input
+!
+! Input
       dimension ixat(mxat),xrf(mxatp),yrf(mxatp),zrf(mxatp)
-c Local
+! Local
       dimension rm(3,3),av1(3),av2(3)
       call rmsdopt(nml,ir1,ir2,ixat,xrf,yrf,zrf,isl,rm,av1,av2,rssd)
@@ -37,35 +37,35 @@
       end
 
-c*******************************************************************
+!*******************************************************************
       subroutine rmsdopt(nml,ir1,ir2,ixat,xrf,yrf,zrf,isl,
-     #                   rm,av1,av2,rmsd)
-
-c ---------------------------------------------------------------
-c PURPOSE: root mean square deviation (rmsd) between current SMMP
-c          structure and reference atom coordinates 'x,y,zrf()'
-c          for range of SMMP residues [ir1,ir2] in molecule 'nml'
-c
-c          ixat(i) - points to the atom in ref. coords., which is
-c                    equivalent to atom i of SMMP structure
-c                    (=0 if no equivalent in ref. structure exists)
-c
-c          isl = 0  : select all heavy atoms
-c          isl = 1  : backbone atoms n,ca,c
-c          isl = 2  : only ca atoms
-c
-c CALLS:   fitmol [S.K.Kearsley, Acta Cryst. 1989, A45, 208-210]
-c
-c      NB  uncomment last lines in 'fitmol' to return coordinates
-c          in 'x2' after fitting the ref. str. onto SMMP structure 
-c ----------------------------------------------------------------
+     &                   rm,av1,av2,rmsd)
+
+! ---------------------------------------------------------------
+! PURPOSE: root mean square deviation (rmsd) between current SMMP
+!          structure and reference atom coordinates 'x,y,zrf()'
+!          for range of SMMP residues [ir1,ir2] in molecule 'nml'
+!
+!          ixat(i) - points to the atom in ref. coords., which is
+!                    equivalent to atom i of SMMP structure
+!                    (=0 if no equivalent in ref. structure exists)
+!
+!          isl = 0  : select all heavy atoms
+!          isl = 1  : backbone atoms n,ca,c
+!          isl = 2  : only ca atoms
+!
+! CALLS:   fitmol [S.K.Kearsley, Acta Cryst. 1989, A45, 208-210]
+!
+!      NB  uncomment last lines in 'fitmol' to return coordinates
+!          in 'x2' after fitting the ref. str. onto SMMP structure 
+! ----------------------------------------------------------------
 
       include 'INCL.H'
       include 'INCP.H'
 
-c-------------------------------------------------------- input
+!-------------------------------------------------------- input
       dimension ixat(mxat),xrf(mxatp),yrf(mxatp),zrf(mxatp)
-c-------------------------------------------------------- output
+!-------------------------------------------------------- output
       dimension rm(3,3),av1(3),av2(3)
-c-------------------------------------------------------- local
+!-------------------------------------------------------- local
       dimension x1(3,mxat),x2(3,mxat)
       character*4 atnm
@@ -99,14 +99,14 @@
                 if ( isl.eq.0
 
-     #               .or.
-
-     #              (isl.eq.1.and.(index(atnm,'n   ').gt.0 .or.
-     #                             index(atnm,'ca  ').gt.0 .or.
-     #                             index(atnm,'c   ').gt.0 ))
-     #               .or.
-
-     #              (isl.eq.2.and.index(atnm,'ca  ').gt.0)
-
-     #          ) then
+     &               .or.
+
+     &              (isl.eq.1.and.(index(atnm,'n   ').gt.0 .or.
+     &                             index(atnm,'ca  ').gt.0 .or.
+     &                             index(atnm,'c   ').gt.0 ))
+     &               .or.
+
+     &              (isl.eq.2.and.index(atnm,'ca  ').gt.0)
+
+     &          ) then
 
                   n=n+1
@@ -136,27 +136,27 @@
       return
       end
-c *********************************************
+! *********************************************
       subroutine fitmol(n,x1,x2, rm,a1,a2,rmsd)
-c      real*8 function fitmol(n,x1,x2)
-
-c .......................................................
-c PURPOSE: compute RMSD of n positions in x1(3,) & x2(3,)
-c          [S.K.Kearsley Acta Cryst. 1989,A45,208-210]
-c
-c CALLS: jacobi
-c .......................................................
-cf2py intent(out) rmsd
+!      real*8 function fitmol(n,x1,x2)
+
+! .......................................................
+! PURPOSE: compute RMSD of n positions in x1(3,) & x2(3,)
+!          [S.K.Kearsley Acta Cryst. 1989,A45,208-210]
+!
+! CALLS: jacobi
+! .......................................................
+!f2py intent(out) rmsd
                     
       include 'INCL.H'
-c      implicit real*8 (a-h,o-z)
-c      implicit integer*4 (i-n)
+!      implicit real*8 (a-h,o-z)
+!      implicit integer*4 (i-n)
  
-c ------------------------------------------- input/output
+! ------------------------------------------- input/output
       dimension x1(3,mxat),x2(3,mxat)
-c -------------------------------------------------- local
+! -------------------------------------------------- local
       dimension e(4),q(4,4),v(4,4),dm(3),dp(3),a1(3),a2(3),rm(3,3)
 
       dn=dble(n)
-c ------------------- average of coordinates
+! ------------------- average of coordinates
       do i=1,3
         a1(i) = 0.d0
@@ -169,5 +169,5 @@
         a2(i) = a2(i)/dn
       enddo
-c ------------------------- compile quaternion
+! ------------------------- compile quaternion
       do i=1,4
         do j=1,4
@@ -208,8 +208,8 @@
         enddo
       enddo
-c ------------------------------ eigenvalues & -vectors
+! ------------------------------ eigenvalues & -vectors
       ndim4=4
       call jacobi(q,ndim4,e,v)
-c --------------------------- lowest eigenvalue
+! --------------------------- lowest eigenvalue
       im=1
       em=e(1)
@@ -223,7 +223,7 @@
       rmsd = sqrt(em/dn)
 
-c ================= uncomment following lines to fit molecule 2 onto 1
-
-c ---------------------------------------------------rotation matrix
+! ================= uncomment following lines to fit molecule 2 onto 1
+
+! ---------------------------------------------------rotation matrix
       rm(1,1) = v(1,im)**2+v(2,im)**2-v(3,im)**2-v(4,im)**2
       rm(1,2) = 2.d0*( v(2,im)*v(3,im)-v(1,im)*v(4,im) )
@@ -236,38 +236,38 @@
       rm(3,3) = v(1,im)**2+v(4,im)**2-v(2,im)**2-v(3,im)**2
 
-c      do i=1,n
-c        do j=1,3
-c          dm(j) = x2(j,i) - a2(j)
-c        enddo
-c        do j=1,3
-c          dp(j) = a1(j)
-c          do k=1,3
-c            dp(j) = dp(j) + rm(j,k) * dm(k)
-c          enddo
-c          x2(j,i) = dp(j)
-c        enddo
-c      enddo
-
-c      fitmol=rmsd
+!      do i=1,n
+!        do j=1,3
+!          dm(j) = x2(j,i) - a2(j)
+!        enddo
+!        do j=1,3
+!          dp(j) = a1(j)
+!          do k=1,3
+!            dp(j) = dp(j) + rm(j,k) * dm(k)
+!          enddo
+!          x2(j,i) = dp(j)
+!        enddo
+!      enddo
+
+!      fitmol=rmsd
 
       return
       end
-c ******************************
+! ******************************
       subroutine jacobi(a,n,d,v)
 
-c ......................................................
-c PURPOSE: for given symmetric matrix 'a(n,n)
-c          compute eigenvalues 'd' & eigenvectors 'v(,)'
-c
-c  [W.H.Press,S.A.Teukolsky,W.T.Vetterling,
-c   B.P.Flannery, Numerical Recipes in FORTRAN,
-c   Cambridge Univ. Press, 2nd Ed. 1992, 456-462]
-c
-c CALLS: none
-c
-c ......................................................
-
-cf2py intent(out) d
-cf2py intent(out) v
+! ......................................................
+! PURPOSE: for given symmetric matrix 'a(n,n)
+!          compute eigenvalues 'd' & eigenvectors 'v(,)'
+!
+!  [W.H.Press,S.A.Teukolsky,W.T.Vetterling,
+!   B.P.Flannery, Numerical Recipes in FORTRAN,
+!   Cambridge Univ. Press, 2nd Ed. 1992, 456-462]
+!
+! CALLS: none
+!
+! ......................................................
+
+!f2py intent(out) d
+!f2py intent(out) v
       parameter (NMAX=500)
       
@@ -276,5 +276,5 @@
 
       real*8 a(n,n),d(n),v(n,n),
-     #       c,g,h,s,sm,t,tau,theta,tresh,b(NMAX),z(NMAX),smeps
+     &       c,g,h,s,sm,t,tau,theta,tresh,b(NMAX),z(NMAX),smeps
 
       smeps=1.0d-6
@@ -318,5 +318,5 @@
             if((i.gt.4).and.(abs(d(ip))+
 
-     #g.eq.abs(d(ip))).and.(abs(d(iq))+g.eq.abs(d(iq))))then
+     &g.eq.abs(d(ip))).and.(abs(d(iq))+g.eq.abs(d(iq))))then
               a(ip,iq)=0.d0
 
@@ -393,17 +393,17 @@
       end
 
-c ***********************************************************
+! ***********************************************************
 
       subroutine rmsinit(nml,string)
-c
-c------------------------------------------------------------------------------
-c Reads in pdb-file 'string' into INCP.H and initalizes 
-c the files that 'rmdsopt' needs to calculate the rmsd
-c of a configuration with the pdb-configuration
-C
-c CALLS: pdbread,atixpdb
-c
-c ----------------------------------------------------------------------------
-c
+!
+!------------------------------------------------------------------------------
+! Reads in pdb-file 'string' into INCP.H and initalizes 
+! the files that 'rmdsopt' needs to calculate the rmsd
+! of a configuration with the pdb-configuration
+!
+! CALLS: pdbread,atixpdb
+!
+! ----------------------------------------------------------------------------
+!
       include 'INCL.H'
       include 'INCP.H'
@@ -412,7 +412,7 @@
  
       if(string.eq.'smmp') then
-c
-c Compare with a smmp-structure
-c
+!
+! Compare with a smmp-structure
+!
         do i=iatrs1(irsml1(nml)),iatrs2(irsml2(nml))
          if(nmat(i)(1:1).ne.'h') then
@@ -422,13 +422,13 @@
          end if
         enddo
-c
+!
        else
-c
-c Reference structure is read in from pdb-file
-c
+!
+! Reference structure is read in from pdb-file
+!
          call pdbread(string,ier)
          if(ier.ne.0) stop 
          call atixpdb(nml)
-c
+!
       end if
       print *,'RMSD initialized with ',string
