Index: mklist.f
===================================================================
--- mklist.f	(revision 6650a56b8f862383b669bf41c64d328acf404e72)
+++ mklist.f	(revision 38d77eb4e27a6b22e4388b28629620f02aec9598)
@@ -45,5 +45,5 @@
       ntlms=nmsml(nml)
       if (ntlms.eq.0) then
-        write (*,'(a,i4)')
+        write (logString, '(a,i4)')
      &           ' mklist> No mov. sets defined in molecule #',nml
         nvwml(nml)=0
@@ -107,5 +107,6 @@
                 n2i=n2i+1
                 if (n2i.gt.mx2) then
-                  write (*,'(a,i3,2a)')  ' mklist> Molecule # ',nml,
+                  write(logString, '(a,i3,2a)')  ' mklist> Molecule # ',
+     &                nml,
      &                ': too many atoms bound to ',nmat(iob)
                   stop
@@ -125,5 +126,6 @@
                     n2i=n2i+1
                     if (n2i.gt.mx2) then
-                      write (*,'(a,i3,a)')  ' mklist> Molecule # '
+                      write (logString, '(a,i3,a)')  
+     &                         ' mklist> Molecule # '
      &                         ,nml,': too many atoms in list L2I'
                       stop
@@ -141,5 +143,5 @@
                 n2i=n2i+1
                 if (n2i.gt.mx2) then
-                  write (*,'(a,i3,2a)')  ' mklist> Molecule # '
+                  write (logString, '(a,i3,2a)')  ' mklist> Molecule # '
      &             ,nml,': too many atoms bound to ',nmat(iob)
                   stop
@@ -165,5 +167,6 @@
               n1i=n1i+1
               if (n1i.gt.mxbd) then
-                write (*,'(a,i3,2a)')  ' mklist> Molecule # ',nml,
+                write (logString, '(a,i3,2a)')  ' mklist> Molecule # ',
+     &              nml,
      &             ': too many atoms bound to ',nmat(ib)
                 stop
@@ -177,6 +180,7 @@
                   n2i=n2i+1
                   if (n2i.gt.mx2) then
-                    write (*,'(a,i3,2a)')  ' mklist> Molecule # ',nml,
-     &              ': too many atoms bound to branches of ',nmat(ib)
+                    write (logString, '(a,i3,2a)')  
+     &                 ' mklist> Molecule # ',nml,
+     &                 ': too many atoms bound to branches of ',nmat(ib)
                     stop
                   endif
@@ -194,6 +198,7 @@
                 n2i=n2i+1
                 if (n2i.gt.mx2) then
-                  write (*,'(a,i3,a)')  ' mklist> Molecule # ',nml,
-     &            ': too many atoms n list L2I '
+                  write (logString, '(a,i3,a)')  ' mklist> Molecule # ',
+     &               nml,
+     &               ': too many atoms n list L2I '
                   stop
                 endif
@@ -207,5 +212,6 @@
 ! ________________________________________ Current 2ND list -> VdW-interact.
               if ((nvw+n2nd).gt.mxvw) then
-                write (*,'(a,i4,a,i5)') ' mklist> Molecule # ',nml,
+                write (logString, '(a,i4,a,i5)') ' mklist> Molecule # ',
+     &            nml,
      &            ': Number of vdw-domains > ',mxvw
                 stop
@@ -273,11 +279,11 @@
 ! ____________________________________________ Summary
 !      do i=ifiat,ilaat
-!        write (*,'(3a,i5,a)') ' ######## atom ',nmat(i),'(',i,')'
+!        write (logString, '(3a,i5,a)') ' ######## atom ',nmat(i),'(',i,')'
 !        iv1=ivwat1(i)
 !        iv2=ivwat2(i)
 !        if (iv1.le.iv2) then
-!          write(*,'(a)') ' ---> vdW :'
+!          write (logString, '(a)') ' ---> vdW :'
 !          do j=iv1,iv2
-!            write (*,'(i5,a,i5)') lvwat1(j),'-',lvwat2(j)
+!            write (logString, '(i5,a,i5)') lvwat1(j),'-',lvwat2(j)
 !          enddo
 !        endif
@@ -285,6 +291,6 @@
 !        i42=i14at2(i)
 !        if (i41.le.i42) then
-!          write(*,'(a)') ' ---> 1-4 :'
-!          write(*,'(10i5)') (l14at(j),j=i41,i42)
+!          write (logString, '(a)') ' ---> 1-4 :'
+!          write (logString, '(10i5)') (l14at(j),j=i41,i42)
 !        endif
 !      enddo
@@ -292,5 +298,5 @@
       return
 
-    1 write (*,'(a,i4,a,i5)') ' mklist> Molecule # ',nml,
+    1 write (logString, '(a,i4,a,i5)') ' mklist> Molecule # ',nml,
      &                     ': Number of 1-4 interactions > ',mx14
       stop
@@ -312,5 +318,5 @@
       implicit none
       integer mx, j, n, j1, l1, j2, l2, i1, i2, ja, k
-
+      character(255) logString
       dimension l1(mx),l2(mx)
 
@@ -334,5 +340,5 @@
               n=n+1
               if (n.gt.mx) then
-                write (*,'(a)') ' quench> too many sets'
+                write (logString, '(a)') ' quench> too many sets'
                 stop
               endif
