Index: regul.f
===================================================================
--- regul.f	(revision 87ddcf7a314d90070d607f0ec7ac0a700b843abc)
+++ regul.f	(revision e40e335d8909b50cd784019735fcdb0c28ee19bb)
@@ -1,38 +1,34 @@
-!**************************************************************
-!
-! This file contains the subroutines: regul
-!
-! 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
-!
-! **************************************************************
+c**************************************************************
+c
+c This file contains the subroutines: regul
+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 **************************************************************
 
-
+      
       subroutine regul(nml, iter, nsteps, acc)
 
-! ----------------------------------------------------------
-! PURPOSE: regularization of PDB-structure into SMMP geometry
-!
-!          @param nml molecule to be regularized
-!          @param iter number of iterations during regularization
-!          @param nsteps maximum number of steps in minimization
-!          @param acc acceptance criterium for minimization
-!
-! CALLS:   minim, cnteny, outvar,rmsdopt
-! ----------------------------------------------------------
+c ----------------------------------------------------------
+c PURPOSE: regularization of PDB-structure into SMMP geometry
+c
+c          @param nml molecule to be regularized
+c          @param iter number of iterations during regularization
+c          @param nsteps maximum number of steps in minimization
+c          @param acc acceptance criterium for minimization
+c
+c CALLS:   minim, cnteny, outvar,rmsdopt
+c ----------------------------------------------------------
 
       include 'INCL.H'
       include 'INCP.H'
-
-!f2py intent(in) nml
-!f2py intent(in) iter
-!f2py intent(in) nsteps
-!f2py intent(in) acc
-
-      double precision acc, rm, av1, av2, rmsd, dn
-
-      integer nsteps, nml, nrs, i, n, iter, it
+      
+cf2py intent(in) nml
+cf2py intent(in) iter
+cf2py intent(in) nsteps
+cf2py intent(in) acc
 
       dimension rm(3,3),av1(3),av2(3)
@@ -44,25 +40,25 @@
       wtey = 0.d0
 
-      write (logString, '(/,a,2(a,f4.2),/)')
-     &  ' ====================== Regularization only',
-     &  '   Wt(energy) = ',wtey,'  Wt(regul.) = ',wtrg
+      write(*,'(/,a,2(a,f4.2),/)')
+     #  ' ====================== Regularization only',
+     #  '   Wt(energy) = ',wtey,'  Wt(regul.) = ',wtrg
 
-      call minim(2, nsteps, acc)
+      call minim(1, nsteps, acc)
 
-      write (logString, *) ' '
-      write (logString, *) ' -------- contacts after 1st regularization'
-      write (logString, *) ' '
+      write(*,*) ' '
+      write(*,*) ' ---------- contacts after 1st regularization'
+      write(*,*) ' '
       call cnteny(nml)
-      write (logString, *) ' '
+      write(*,*) ' '
 
       nrs = irsml2(nml)-irsml1(nml)+1
       call rmsdopt(nml,1,nrs,ixatp,xatp,yatp,zatp,0,rm,av1,av2,rmsd)
 
-      write (logString, *) ' RMSD = ',rmsd
+      write(*,*) ' RMSD = ',rmsd
 
-! --------------------------------------- fix vars. defined in PDB
+c --------------------------------------- fix vars. defined in PDB
 
 
-      do i = ivrml1(nml),nvrml(nml)
+      do i = ivrml1(nml),nvrml(nml) 
         fxvro(i) = fxvr(i)  ! save
         if (isrfvr(i)) fxvr(i) = .true.  ! fix vars. defined in ref.str.
@@ -70,16 +66,16 @@
       ireg = 0
 
-      write (logString, '(/,a,2(a,f4.2),/)')
-     &  ' ====================== Internal Energy for Hydrogens only',
-     &  '   Wt(energy) = ',wtey,'  Wt(regul.) = ',wtrg
+      write(*,'(/,a,2(a,f4.2),/)')
+     #  ' ====================== Internal Energy for Hydrogens only',
+     #  '   Wt(energy) = ',wtey,'  Wt(regul.) = ',wtrg
 
       call minim(1, nsteps, acc)
 
-      write (logString, *) ' '
-      write (logString, *) ' -------- contacs after Emin. for hydrogens'
-      write (logString, *) ' '
+      write(*,*) ' '
+      write(*,*) ' ---------- contacs after Emin. for hydrogens'
+      write(*,*) ' '
       call cnteny(nml)
 
-      do i = ivrml1(nml),nvrml(nml)
+      do i = ivrml1(nml),nvrml(nml) 
         fxvr(i) = fxvro(i)  ! restore
       enddo  ! vars.
@@ -90,5 +86,5 @@
       wtey = 0.d0
 
-      n=iter
+      n=iter            
       dn=1.d0/dble(n)
 
@@ -98,7 +94,7 @@
         wtey = 1.d0 - wtrg
 
-        write (logString, '(/,a,i2,2(a,e11.3),/)')
-     &    ' ================ Minimization #',it,
-     &        '   Wt(energy) = ',wtey,'  Wt(regul.) = ',wtrg
+        write(*,'(/,a,i2,2(a,e11.3),/)')
+     #    ' ================ Minimization #',it,
+     #        '   Wt(energy) = ',wtey,'  Wt(regul.) = ',wtrg
 
         call minim(1, nsteps, acc)
@@ -107,19 +103,18 @@
         call rmsdopt(nml,1,nrs,ixatp,xatp,yatp,zatp,0,rm,av1,av2,rmsd)
 
-        write (logString, *) ' '
-        write (logString, *) ' RMSD = ',rmsd
+        write(*,*) ' '
+        write(*,*) ' RMSD = ',rmsd
 
       enddo
 
-      write (logString, *) ' '
-      write (logString, *) ' ------- contacts after full regularization'
-      write (logString, *) ' '
+      write(*,*) ' '
+      write(*,*) ' ---------- contacts after full regularization'
+      write(*,*) ' '
       call cnteny(nml)
 
-!      call outpdb(nml,12)
+c      call outpdb(nml,12)
 
-! Output of dihedral angles of the regularized structure
-      write (logString, *) 
-     &   'Dihedral angles of the regularized structure;'
+c Output of dihedral angles of the regularized structure
+      write(*,*) 'Dihedral angles of the regularized structure;'
       call outvar(nml, 'regd.var')
 
