Index: smmp.pyf
===================================================================
--- smmp.pyf	(revision 8d0e6d6b0d1007b411efbb816ee34bd6081f8aab)
+++ smmp.pyf	(revision ffd2d46888ff96b67701d9b306ce4aac68b5bd99)
@@ -9,6 +9,15 @@
     end interface metropolis_user_interface
 end python module metropolis__user__routines
+
 python module smmp ! in 
     interface  ! in :smmp
+        block data updtchs ! in :smmp:metropolis.f
+            integer optional,dimension(5) :: ncalls=5*0
+            integer optional,dimension(5) :: nacalls=5*0
+            double precision optional :: up2bmax=4.0d0
+            double precision optional :: up2bmin=0.5d0
+            common /updstats/ ncalls,nacalls
+            common /updtparam/ up2bmax,up2bmin
+        end block data updtchs
         subroutine metropolis(eol1,acz,dummy) ! in :smmp:metropolis.f
             use metropolis__user__routines
@@ -370,68 +379,68 @@
         end subroutine metropolis
         function energy() ! in :smmp:energy.f
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -441,33 +450,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -476,94 +485,94 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
-            integer*4 :: npnt
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -571,31 +580,31 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             real*8 :: energy
             common /v_sol/ vdvol,asa,asap,asah
@@ -653,72 +662,70 @@
             common /flex_r/ c_f,a_f,chb_f,ahb_f,e0to_f,sgto_f,rnto_f,plt_f,slp_f,cohb_f
         end function energy
-        subroutine minim(imin,maxit,eps) ! in :smmp:minim.f
-            integer*4 intent(in) :: imin
-            integer*4 intent(in) :: maxit
-            real*8 intent(in) :: eps
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+        function enysol(nmol) ! in :smmp:enysol.f
+            integer optional, intent(in):: nmol=0
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -728,33 +735,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -763,94 +770,94 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
-            integer*4 :: npnt
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -858,31 +865,603 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
+            real*8 :: enysol
+            common /v_sol/ vdvol,asa,asap,asah
+            common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
+            common /cont_i_j/ ijcont,ind_alf
+            common /sche_l/ do_s,ac_s
+            common /rstr_c/ nmrt,nmvrrt
+            common /mol_par/ nvr
+            common /sol/ coef_sl,rad_vdw
+            common /ressurf/ surfres
+            common /h_bond/ ntyhb,ixtyhb,nutyhb,mmhb
+            common /atm_c/ nmat
+            common /fil_i/ lunlib,lunseq,lunchg,lunvar,lunrst
+            common /refstr/ isrfvr
+            common /rstr_r/ pbrt,vuvrrt,dvvrrt
+            common /atm_i/ ityat,iowat,iyowat,nbdat,ibdat,iybdat,ixmsat
+            common /sche_r/ ehm,atpl,efel,emin,rmin,chb_s,ahb_s,e0to_s,sgto_s,rnto_s,eps_s
+            common /tes/ spoint
+            common /flex_l/ do_f,ac_f
+            common /fil_c/ reslib,seqfil,chgfil,varfil,rstfil
+            common /mol_i/ ntlml,irsml1,irsml2,ivrml1,nvrml,imsml1,nmsml,iadml1,nadml,ixrfpt,ixatp,ireg
+            common /help_r/ blath,baath,toath,cgath
+            common /jref/ iref,nci
+            common /epar_l/ flex,tesgrd,sh2,epsd,ientyp
+            common /rgy/ rgyh,rgyp
+            common /con_i/ idloa,idloz,idupa,idupz
+            common /paral/ myrank,no,my_mpi_comm,workperprocessor
+            common /help_c/ nmath,nmvrh
+            common /help_i/ ityath,iowath,iyowath,nbdath,ibdath,iybdath,ityvrh,iclvrh,iatvrh
+            common /res_c/ seq
+            common /solvent/ rvdw,sigma
+            common /deriv/ gradan
+            common /epar_i/ ihbty
+            common /pnt/ npnt
+            common /mol_c/ nmml
+            common /epar_r/ cij,aij,a14,chb,ahb,e0to,sgto,rnto,esnto,conv,plt,slp,cohb
+            common /res_i/ iatrs1,iatrs2,ixatrs,ivrrs1,nvrrs
+            common /rstr_i/ ntlrt,ntlsu,i1vrrt,i2vrrt,iprtsu,i1rtsu,nrtsu,i1vrsu,i2vrsu,ipvrsu
+            common /mol_r/ rfpt,gbpr,xrfax,yrfax,zrfax
+            common /var_l/ fxvr
+            common /eny_r/ eyel,eyvw,eyhb,eyvr,eysm,eysl,eyrg,eyslh,eyslp,eyab,eysmi,eyhbi,eyeli,eyvwi,gdeyvr,gdeyrg,gdeysl,gdeygb,wtey,wtrg
+            common /var_i/ iatvr,ityvr,iclvr,iorvr,imsvr1,imsvr2,latms1,latms2,iadvr1,iadvr2,ladvr,idvr
+            common /counter/ enysolct
+            common /var_c/ nmvr
+            common /bounds/ boxsize
+            common /commonrandom/ seed
+            common /zimme/ zimm
+            common /isolty/ itysol,isolscl
+            common /abgncor/ rsstrg
+            common /rsnm_c/ rsnmcd,onltcd
+            common /updchois/ rndord,upchswitch,bgsprob
+            common /eny_i/ nvwml,ivwml1,n14ml,i14ml1,ivwat1,ivwat2,i14at1,i14at2,lvwat1,lvwat2,l14at,ixatvw,ixat14
+            common /var_r/ olvlvr,vlvr,axvr
+            common /bet/ beta
+            common /flex_r/ c_f,a_f,chb_f,ahb_f,e0to_f,sgto_f,rnto_f,plt_f,slp_f,cohb_f
+        end function enysol
+        subroutine setvar(nml,vlvrx) ! in :smmp:setvar.f
+            integer intent(in) :: nml
+            double precision dimension(800) :: vlvrx
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
+            logical dimension(18) :: do_s
+            logical dimension(18) :: ac_s
+            character dimension(500,4) :: nmrt
+            character dimension(1000,3) :: nmvrrt
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
+            logical dimension(800) :: isrfvr
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
+            logical dimension(18) :: do_f
+            logical dimension(18) :: ac_f
+            character*80 :: reslib
+            character*80 :: seqfil
+            character*80 :: chgfil
+            character*80 :: varfil
+            character*80 :: rstfil
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
+            logical :: flex
+            logical :: tesgrd
+            logical :: sh2
+            logical :: epsd
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
+            integer :: myrank
+            integer :: no
+            integer :: my_mpi_comm
+            integer dimension(11,2049) :: workperprocessor
+            character dimension(100,4) :: nmath
+            character dimension(100,3) :: nmvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
+            character dimension(100,4) :: seq
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
+            integer :: npnt
+            character dimension(10,80) :: nmml
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
+            logical dimension(800) :: fxvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
+            integer :: enysolct
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
+            integer :: seed
+            character*mxrs :: zimm
+            integer :: itysol
+            logical :: isolscl
+            double precision dimension(100) :: rsstrg
+            character dimension(35,4) :: rsnmcd
+            character dimension(35) :: onltcd
+            logical :: rndord
+            integer :: upchswitch
+            double precision :: bgsprob
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
+            common /v_sol/ vdvol,asa,asap,asah
+            common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
+            common /cont_i_j/ ijcont,ind_alf
+            common /sche_l/ do_s,ac_s
+            common /rstr_c/ nmrt,nmvrrt
+            common /mol_par/ nvr
+            common /sol/ coef_sl,rad_vdw
+            common /ressurf/ surfres
+            common /h_bond/ ntyhb,ixtyhb,nutyhb,mmhb
+            common /atm_c/ nmat
+            common /fil_i/ lunlib,lunseq,lunchg,lunvar,lunrst
+            common /refstr/ isrfvr
+            common /rstr_r/ pbrt,vuvrrt,dvvrrt
+            common /atm_i/ ityat,iowat,iyowat,nbdat,ibdat,iybdat,ixmsat
+            common /sche_r/ ehm,atpl,efel,emin,rmin,chb_s,ahb_s,e0to_s,sgto_s,rnto_s,eps_s
+            common /tes/ spoint
+            common /flex_l/ do_f,ac_f
+            common /fil_c/ reslib,seqfil,chgfil,varfil,rstfil
+            common /mol_i/ ntlml,irsml1,irsml2,ivrml1,nvrml,imsml1,nmsml,iadml1,nadml,ixrfpt,ixatp,ireg
+            common /help_r/ blath,baath,toath,cgath
+            common /jref/ iref,nci
+            common /epar_l/ flex,tesgrd,sh2,epsd,ientyp
+            common /rgy/ rgyh,rgyp
+            common /con_i/ idloa,idloz,idupa,idupz
+            common /paral/ myrank,no,my_mpi_comm,workperprocessor
+            common /help_c/ nmath,nmvrh
+            common /help_i/ ityath,iowath,iyowath,nbdath,ibdath,iybdath,ityvrh,iclvrh,iatvrh
+            common /res_c/ seq
+            common /solvent/ rvdw,sigma
+            common /deriv/ gradan
+            common /epar_i/ ihbty
+            common /pnt/ npnt
+            common /mol_c/ nmml
+            common /epar_r/ cij,aij,a14,chb,ahb,e0to,sgto,rnto,esnto,conv,plt,slp,cohb
+            common /res_i/ iatrs1,iatrs2,ixatrs,ivrrs1,nvrrs
+            common /rstr_i/ ntlrt,ntlsu,i1vrrt,i2vrrt,iprtsu,i1rtsu,nrtsu,i1vrsu,i2vrsu,ipvrsu
+            common /mol_r/ rfpt,gbpr,xrfax,yrfax,zrfax
+            common /var_l/ fxvr
+            common /eny_r/ eyel,eyvw,eyhb,eyvr,eysm,eysl,eyrg,eyslh,eyslp,eyab,eysmi,eyhbi,eyeli,eyvwi,gdeyvr,gdeyrg,gdeysl,gdeygb,wtey,wtrg
+            common /var_i/ iatvr,ityvr,iclvr,iorvr,imsvr1,imsvr2,latms1,latms2,iadvr1,iadvr2,ladvr,idvr
+            common /counter/ enysolct
+            common /var_c/ nmvr
+            common /bounds/ boxsize
+            common /commonrandom/ seed
+            common /zimme/ zimm
+            common /isolty/ itysol,isolscl
+            common /abgncor/ rsstrg
+            common /rsnm_c/ rsnmcd,onltcd
+            common /updchois/ rndord,upchswitch,bgsprob
+            common /eny_i/ nvwml,ivwml1,n14ml,i14ml1,ivwat1,ivwat2,i14at1,i14at2,lvwat1,lvwat2,l14at,ixatvw,ixat14
+            common /var_r/ olvlvr,vlvr,axvr
+            common /bet/ beta
+            common /flex_r/ c_f,a_f,chb_f,ahb_f,e0to_f,sgto_f,rnto_f,plt_f,slp_f,cohb_f
+        end subroutine setvar
+        subroutine minim(imin,maxit,eps) ! in :smmp:minim.f
+            integer*4 intent(in) :: imin
+            integer*4 intent(in) :: maxit
+            real*8 :: eps
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
+            logical dimension(18) :: do_s
+            logical dimension(18) :: ac_s
+            character dimension(500,4) :: nmrt
+            character dimension(1000,3) :: nmvrrt
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
+            logical dimension(800) :: isrfvr
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
+            logical dimension(18) :: do_f
+            logical dimension(18) :: ac_f
+            character*80 :: reslib
+            character*80 :: seqfil
+            character*80 :: chgfil
+            character*80 :: varfil
+            character*80 :: rstfil
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
+            logical :: flex
+            logical :: tesgrd
+            logical :: sh2
+            logical :: epsd
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
+            integer :: myrank
+            integer :: no
+            integer :: my_mpi_comm
+            integer dimension(11,2049) :: workperprocessor
+            character dimension(100,4) :: nmath
+            character dimension(100,3) :: nmvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
+            character dimension(100,4) :: seq
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
+            integer :: npnt
+            character dimension(10,80) :: nmml
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
+            logical dimension(800) :: fxvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
+            integer :: enysolct
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
+            integer :: seed
+            character*mxrs :: zimm
+            integer :: itysol
+            logical :: isolscl
+            double precision dimension(100) :: rsstrg
+            character dimension(35,4) :: rsnmcd
+            character dimension(35) :: onltcd
+            logical :: rndord
+            integer :: upchswitch
+            double precision :: bgsprob
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             common /v_sol/ vdvol,asa,asap,asah
             common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
@@ -943,68 +1522,68 @@
             integer*4 intent(out) :: nham2
             real*8 intent(out) :: dham
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -1014,33 +1593,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -1049,94 +1628,94 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
-            integer*4 :: npnt
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -1144,31 +1723,31 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             common /v_sol/ vdvol,asa,asap,asah
             common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
@@ -1229,68 +1808,68 @@
             integer*4 intent(out) :: mhb
             integer*4 :: ipr
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -1300,33 +1879,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -1335,94 +1914,94 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
-            integer*4 :: npnt
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -1430,31 +2009,31 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             common /v_sol/ vdvol,asa,asap,asah
             common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
@@ -1513,68 +2092,68 @@
         subroutine interhbond(mhb) ! in :smmp:hbond.f
             integer*4 intent(out) :: mhb
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -1584,33 +2163,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -1619,94 +2198,94 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
-            integer*4 :: npnt
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -1714,31 +2293,31 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             common /v_sol/ vdvol,asa,asap,asah
             common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
@@ -1800,68 +2379,68 @@
             integer*4 intent(out) :: nbet
             integer*4 intent(out) :: mbet
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -1871,33 +2450,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -1906,94 +2485,94 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
-            integer*4 :: npnt
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -2001,31 +2580,31 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             common /v_sol/ vdvol,asa,asap,asah
             common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
@@ -2088,69 +2667,69 @@
             double precision intent(in) :: tmax
             double precision intent(in) :: tmin
-            logical optional,intent(in) :: lrand=1
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            logical optional, intent(in) :: lrand=1
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -2160,33 +2739,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -2195,94 +2774,94 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
-            integer*4 :: npnt
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -2290,31 +2869,31 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             common /v_sol/ vdvol,asa,asap,asah
             common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
@@ -2375,68 +2954,68 @@
             real*8 intent(out) :: rgy
             real*8 intent(out) :: ee
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -2446,33 +3025,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -2481,94 +3060,94 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
-            integer*4 :: npnt
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -2576,31 +3155,31 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             common /v_sol/ vdvol,asa,asap,asah
             common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
@@ -2659,68 +3238,68 @@
         subroutine zimmer(nresi) ! in :smmp:zimmer.f
             integer*4 intent(in) :: nresi
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -2730,33 +3309,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -2765,94 +3344,94 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
-            integer*4 :: npnt
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -2860,31 +3439,31 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             common /v_sol/ vdvol,asa,asap,asah
             common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
@@ -2945,70 +3524,70 @@
             integer intent(in) :: nswp
             integer intent(in) :: nmes
-            double precision intent(in) :: temp
-            logical optional,intent(in) :: lrand=1
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            double precision intent(in):: temp
+            logical optional, intent(in) :: lrand=1
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -3018,33 +3597,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -3053,94 +3632,94 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
-            integer*4 :: npnt
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -3148,31 +3727,31 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             common /v_sol/ vdvol,asa,asap,asah
             common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
@@ -3230,70 +3809,70 @@
         end subroutine canon
         subroutine outpdb(nml,filename) ! in :smmp:outpdb.f
-            integer*4 :: nml
-            character*(*) :: filename
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            integer*4 intent(in) :: nml
+            character*(*) intent(in) :: filename
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -3303,33 +3882,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -3338,94 +3917,94 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
-            integer*4 :: npnt
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -3433,31 +4012,31 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             common /v_sol/ vdvol,asa,asap,asah
             common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
@@ -3523,68 +4102,68 @@
             real*8 dimension(10000) :: zrf
             integer*4 :: isl
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -3594,33 +4173,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -3629,13 +4208,13 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
             integer*4 :: nchp
@@ -3646,91 +4225,91 @@
             integer*4 :: natp
             integer*4 dimension(10000) :: noatp
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
             character dimension(100) :: chnp
             character dimension(1000,3) :: rsnmp
             character dimension(1000,5) :: rsidp
             character dimension(10000,4) :: atnmp
-            integer*4 :: npnt
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
             real*8 dimension(10000) :: xatp
             real*8 dimension(10000) :: yatp
             real*8 dimension(10000) :: zatp
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -3738,31 +4317,31 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             real*8 :: rmsdfun
             common /v_sol/ vdvol,asa,asap,asah
@@ -3825,68 +4404,68 @@
         subroutine init_energy(libdir) ! in :smmp:init_energy.f
             character*(*) :: libdir
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -3896,33 +4475,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -3931,94 +4510,94 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
-            integer*4 :: npnt
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -4026,31 +4605,31 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             common /v_sol/ vdvol,asa,asap,asah
             common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
@@ -4108,68 +4687,68 @@
         end subroutine init_energy
         block data  ! in :smmp:init_energy.f
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical optional,dimension(18) :: do_s=.false.
             logical optional,dimension(18) :: ac_s=.false.
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 optional,dimension(9,18) :: coef_sl=54*0.0
-            real*8 optional,dimension(9,18) :: rad_vdw=54*0.
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision optional,dimension(9,18) :: coef_sl=54*0.0
+            double precision optional,dimension(9,18) :: rad_vdw=54*0.
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 optional :: ehm=362.55d0
-            real*8 optional,dimension(18) :: atpl=42.
-            real*8 optional,dimension(18) :: efel=85.
-            real*8 optional,dimension(18) :: emin=37.
-            real*8 optional,dimension(18) :: rmin=292.
-            real*8 optional,dimension(4,6) :: chb_s=2624.
-            real*8 optional,dimension(4,6) :: ahb_s=5890.
-            real*8 optional,dimension(19) :: e0to_s=20.
-            real*8 optional,dimension(19) :: sgto_s=-1.
-            real*8 optional,dimension(19) :: rnto_s=2.
-            real*8 optional :: eps_s=2.d0
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision optional :: ehm=362.55d0
+            double precision optional,dimension(18) :: atpl=42.
+            double precision optional,dimension(18) :: efel=85.
+            double precision optional,dimension(18) :: emin=37.
+            double precision optional,dimension(18) :: rmin=292.
+            double precision optional,dimension(4,6) :: chb_s=2624.
+            double precision optional,dimension(4,6) :: ahb_s=5890.
+            double precision optional,dimension(19) :: e0to_s=20.
+            double precision optional,dimension(19) :: sgto_s=-1.
+            double precision optional,dimension(19) :: rnto_s=2.
+            double precision optional :: eps_s=2.d0
+            double precision dimension(2000,3) :: spoint
             logical optional,dimension(18) :: do_f=.false.
             logical optional,dimension(18) :: ac_f=.false.
@@ -4179,33 +4758,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -4214,94 +4793,94 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
-            integer*4 :: npnt
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 optional :: conv=332.d0
-            real*8 optional :: plt=78.d0
-            real*8 optional :: slp=0.3d0
-            real*8 :: cohb
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision optional :: conv=332.d0
+            double precision optional :: plt=78.d0
+            double precision optional :: slp=0.3d0
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -4309,68 +4888,70 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 optional,dimension(18,18) :: c_f=40.
-            real*8 optional,dimension(18,18) :: a_f=7.74
-            real*8 optional,dimension(4,6) :: chb_f=180.
-            real*8 optional,dimension(4,6) :: ahb_f=6600.
-            real*8 optional,dimension(19) :: e0to_f=20.
-            real*8 optional,dimension(19) :: sgto_f=-1.
-            real*8 optional,dimension(19) :: rnto_f=2.
-            real*8 optional :: plt_f=78.d0
-            real*8 optional :: slp_f=0.16d0
-            real*8 optional :: cohb_f=6.d0
-            real*8 parameter,optional :: cdr=0.0174532925199
-            integer*4 parameter,optional :: mxvw=10400
-            integer*4 parameter,optional :: mxtyat=18
-            real*8 parameter,optional :: crd=57.2957795131
-            real*8 parameter,optional :: zero=0.0
-            integer*4 parameter,optional :: mxtyto=19
-            character*255 parameter,optional :: version='$id: incl.h 338 2007-08-09 15:00:18z meinke $'
-            integer*4 parameter,optional :: mxbd=3
-            integer*4 parameter,optional :: mxrs=100
-            integer*4 parameter,optional :: mxrt=500
-            integer*4 parameter,optional :: mx14=10400
-            integer*4 parameter,optional :: mxtybl=0
-            integer*4 parameter,optional :: mxtyba=0
-            real*8 parameter,optional :: pi=3.14159265359
-            integer*4 parameter,optional :: nrsty=35
-            integer*4 parameter,optional :: ione=1
-            integer*4 parameter,optional :: mxinbox=80000
-            integer*4 parameter,optional :: mxhbac=6
-            integer*4 parameter,optional :: mxvrh=100
-            integer*4 parameter,optional :: mxrtsu=4800
-            integer*4 parameter,optional :: mxat=2600
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision optional,dimension(18,18) :: c_f=40.
+            double precision optional,dimension(18,18) :: a_f=7.74
+            double precision optional,dimension(4,6) :: chb_f=180.
+            double precision optional,dimension(4,6) :: ahb_f=6600.
+            double precision optional,dimension(19) :: e0to_f=20.
+            double precision optional,dimension(19) :: sgto_f=-1.
+            double precision optional,dimension(19) :: rnto_f=2.
+            double precision optional :: plt_f=78.d0
+            double precision optional :: slp_f=0.16d0
+            double precision optional :: cohb_f=6.d0
+            double precision parameter,optional :: cdr=0.0174532925199
+            integer parameter,optional :: mxvw=10400
+            integer parameter,optional :: mxtyat=18
+            integer parameter,optional :: mxat=2600
+            double precision parameter,optional :: crd=57.2957795131
+            double precision parameter,optional :: zero=0.0
+            integer parameter,optional :: mxtyto=19
+            character*255 parameter,optional :: version='$id: incl.h 335 2007-08-09 09:32:21z meinke $'
+            integer parameter,optional :: mxbd=3
+            integer parameter,optional :: mxrs=100
+            integer parameter,optional :: mxrt=500
+            integer parameter,optional :: mx14=10400
+            integer parameter,optional :: mxtybl=0
+            integer parameter,optional :: mxtyba=0
+            double precision parameter,optional :: pi=3.14159265359
+            integer parameter,optional :: nrsty=35
+            integer parameter,optional :: ione=1
+            integer :: logfileunit
+            integer parameter,optional :: mxinbox=80000
+            integer parameter,optional :: mxhbac=6
+            integer parameter,optional :: mxvrh=100
+            integer parameter,optional :: mxrtsu=4800
             integer parameter,optional :: max_replica=2048
-            real*8 parameter,optional :: rwater=1.4
-            integer*4 parameter,optional :: mxms=2400
-            integer*4 parameter,optional :: mxml=10
-            integer*4 parameter,optional :: mxbox=80000
-            real*8 parameter,optional :: one=1.0
-            integer*4 parameter,optional :: mxtysol=9
-            real*8 parameter,optional :: pi2=6.28318530718
-            integer*4 parameter,optional :: mxhbdo=4
-            integer*4 parameter,optional :: izero=0
-            integer*4 parameter,optional :: mxpoint=2000
-            integer*4 parameter,optional :: mxtyhb=100
-            integer*4 parameter,optional :: mxath=100
-            integer*4 parameter,optional :: mxvrrt=1000
-            integer*4 parameter,optional :: mxvr=800
-            real*8 parameter,optional :: pi4=12.5663706144
+            double precision parameter,optional :: rwater=1.4
+            integer parameter,optional :: mxms=2400
+            integer parameter,optional :: mxml=10
+            integer parameter,optional :: mxbox=80000
+            double precision parameter,optional :: one=1.0
+            integer parameter,optional :: mxtysol=9
+            double precision parameter,optional :: pi2=6.28318530718
+            integer parameter,optional :: mxhbdo=4
+            integer parameter,optional :: izero=0
+            integer parameter,optional :: mxpoint=2000
+            integer parameter,optional :: mxtyhb=100
+            integer parameter,optional :: mxath=100
+            integer parameter,optional :: mxvrrt=1000
+            integer :: maxloglevel
+            integer parameter,optional :: mxvr=800
+            double precision parameter,optional :: pi4=12.5663706144
             integer parameter,optional :: max_proc=2048
             common /v_sol/ vdvol,asa,asap,asah
@@ -4432,70 +5013,70 @@
             character*4 :: grpn
             character*4 :: grpc
-            character*80 optional,intent(in) :: seqfile=' '
-            character*80 optional,intent(in) :: varfile=' '
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            character*80 optional, intent(in) :: seqfile=' '
+            character*80 optional, intent(in) :: varfile=' '
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -4505,33 +5086,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -4540,13 +5121,13 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
             integer*4 :: nchp
@@ -4557,91 +5138,91 @@
             integer*4 :: natp
             integer*4 dimension(10000) :: noatp
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
             character dimension(100) :: chnp
             character dimension(1000,3) :: rsnmp
             character dimension(1000,5) :: rsidp
             character dimension(10000,4) :: atnmp
-            integer*4 :: npnt
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
             real*8 dimension(10000) :: xatp
             real*8 dimension(10000) :: yatp
             real*8 dimension(10000) :: zatp
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -4649,31 +5230,31 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             common /v_sol/ vdvol,asa,asap,asah
             common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
@@ -4738,68 +5319,68 @@
             integer*4 intent(in) :: nsteps
             real*8 intent(in) :: acc
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -4809,33 +5390,33 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -4844,13 +5425,13 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
             integer*4 :: nchp
@@ -4861,91 +5442,91 @@
             integer*4 :: natp
             integer*4 dimension(10000) :: noatp
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
             character dimension(100) :: chnp
             character dimension(1000,3) :: rsnmp
             character dimension(1000,5) :: rsidp
             character dimension(10000,4) :: atnmp
-            integer*4 :: npnt
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
             real*8 dimension(10000) :: xatp
             real*8 dimension(10000) :: yatp
             real*8 dimension(10000) :: zatp
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -4953,31 +5534,31 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             common /v_sol/ vdvol,asa,asap,asah
             common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
@@ -5051,70 +5632,70 @@
         end block data twbloks
         subroutine init_lund ! in :smmp:bgs.f
-            real*8 :: vdvol
-            real*8 :: asa
-            real*8 :: asap
-            real*8 :: asah
+            double precision :: vdvol
+            double precision :: asa
+            double precision :: asap
+            double precision :: asah
             integer :: bgsnvar
             integer dimension(8) :: iph
-            real*8 dimension(2600) :: cgat
-            real*8 dimension(2600) :: xbaat
-            real*8 dimension(2600) :: ybaat
-            real*8 dimension(2600) :: zbaat
-            real*8 dimension(2600) :: baat
-            real*8 dimension(2600) :: snbaat
-            real*8 dimension(2600) :: csbaat
-            real*8 dimension(2600) :: xtoat
-            real*8 dimension(2600) :: ytoat
-            real*8 dimension(2600) :: ztoat
-            real*8 dimension(2600) :: toat
-            real*8 dimension(2600) :: sntoat
-            real*8 dimension(2600) :: cstoat
-            real*8 dimension(2600) :: blat
-            real*8 dimension(2602) :: xat
-            real*8 dimension(2602) :: yat
-            real*8 dimension(2602) :: zat
-            integer*4 dimension(100,100) :: ijcont
-            integer*4 dimension(100) :: ind_alf
+            integer dimension(2600) :: cgat
+            double precision dimension(2600) :: xbaat
+            double precision dimension(2600) :: ybaat
+            double precision dimension(2600) :: zbaat
+            double precision dimension(2600) :: baat
+            double precision dimension(2600) :: snbaat
+            double precision dimension(2600) :: csbaat
+            double precision dimension(2600) :: xtoat
+            double precision dimension(2600) :: ytoat
+            double precision dimension(2600) :: ztoat
+            double precision dimension(2600) :: toat
+            double precision dimension(2600) :: sntoat
+            double precision dimension(2600) :: cstoat
+            double precision dimension(2600) :: blat
+            double precision dimension(2602) :: xat
+            double precision dimension(2602) :: yat
+            double precision dimension(2602) :: zat
+            integer dimension(100,100) :: ijcont
+            integer dimension(100) :: ind_alf
             logical dimension(18) :: do_s
             logical dimension(18) :: ac_s
             character dimension(500,4) :: nmrt
             character dimension(1000,3) :: nmvrrt
-            integer*4 :: nvr
-            real*8 dimension(9,18) :: coef_sl
-            real*8 dimension(9,18) :: rad_vdw
-            real*8 dimension(100) :: surfres
-            integer*4 :: ntyhb
-            integer*4 dimension(100) :: ixtyhb
-            integer*4 dimension(100) :: nutyhb
-            integer*4 dimension(10,10) :: mmhb
-            character dimension(4,2600) :: nmat
-            integer*4 :: lunlib
-            integer*4 :: lunseq
-            integer*4 :: lunchg
-            integer*4 :: lunvar
-            integer*4 :: lunrst
+            integer :: nvr
+            double precision dimension(9,18) :: coef_sl
+            double precision dimension(9,18) :: rad_vdw
+            double precision dimension(100) :: surfres
+            integer :: ntyhb
+            integer dimension(100) :: ixtyhb
+            integer dimension(100) :: nutyhb
+            integer dimension(10,10) :: mmhb
+            character dimension(2600,4) :: nmat
+            integer :: lunlib
+            integer :: lunseq
+            integer :: lunchg
+            integer :: lunvar
+            integer :: lunrst
             logical dimension(800) :: isrfvr
-            real*8 dimension(500) :: pbrt
-            real*8 dimension(1000) :: vuvrrt
-            real*8 dimension(1000) :: dvvrrt
-            integer*4 dimension(2600) :: ityat
-            integer*4 dimension(2600) :: iowat
-            integer*4 dimension(2600) :: iyowat
-            integer*4 dimension(2600) :: nbdat
-            integer*4 dimension(3,2600) :: ibdat
-            integer*4 dimension(3,2600) :: iybdat
-            integer*4 dimension(2600) :: ixmsat
-            real*8 :: ehm
-            real*8 dimension(18) :: atpl
-            real*8 dimension(18) :: efel
-            real*8 dimension(18) :: emin
-            real*8 dimension(18) :: rmin
-            real*8 dimension(4,6) :: chb_s
-            real*8 dimension(4,6) :: ahb_s
-            real*8 dimension(19) :: e0to_s
-            real*8 dimension(19) :: sgto_s
-            real*8 dimension(19) :: rnto_s
-            real*8 :: eps_s
-            real*8 dimension(2000,3) :: spoint
+            double precision dimension(500) :: pbrt
+            double precision dimension(1000) :: vuvrrt
+            double precision dimension(1000) :: dvvrrt
+            integer dimension(2600) :: ityat
+            integer dimension(2600) :: iowat
+            integer dimension(2600) :: iyowat
+            integer dimension(2600) :: nbdat
+            integer dimension(3,2600) :: ibdat
+            integer dimension(3,2600) :: iybdat
+            integer dimension(2600) :: ixmsat
+            double precision :: ehm
+            double precision dimension(18) :: atpl
+            double precision dimension(18) :: efel
+            double precision dimension(18) :: emin
+            double precision dimension(18) :: rmin
+            double precision dimension(4,6) :: chb_s
+            double precision dimension(4,6) :: ahb_s
+            double precision dimension(19) :: e0to_s
+            double precision dimension(19) :: sgto_s
+            double precision dimension(19) :: rnto_s
+            double precision :: eps_s
+            double precision dimension(2000,3) :: spoint
             logical dimension(18) :: do_f
             logical dimension(18) :: ac_f
@@ -5124,37 +5705,37 @@
             character*80 :: varfil
             character*80 :: rstfil
-            integer*4 :: ntlml
-            integer*4 dimension(10) :: irsml1
-            integer*4 dimension(10) :: irsml2
-            integer*4 dimension(10) :: ivrml1
-            integer*4 dimension(10) :: nvrml
-            integer*4 dimension(10) :: imsml1
-            integer*4 dimension(10) :: nmsml
-            integer*4 dimension(10) :: iadml1
-            integer*4 dimension(10) :: nadml
-            integer*4 dimension(3,10) :: ixrfpt
-            integer*4 dimension(2600) :: ixatp
-            integer*4 :: ireg
-            real*8 dimension(100) :: blath
-            real*8 dimension(100) :: baath
-            real*8 dimension(100) :: toath
-            real*8 dimension(100) :: cgath
-            integer*4 dimension(100,100) :: iref
-            integer*4 :: nci
+            integer :: ntlml
+            integer dimension(10) :: irsml1
+            integer dimension(10) :: irsml2
+            integer dimension(10) :: ivrml1
+            integer dimension(10) :: nvrml
+            integer dimension(10) :: imsml1
+            integer dimension(10) :: nmsml
+            integer dimension(10) :: iadml1
+            integer dimension(10) :: nadml
+            integer dimension(3,10) :: ixrfpt
+            integer dimension(2600) :: ixatp
+            integer :: ireg
+            double precision dimension(100) :: blath
+            double precision dimension(100) :: baath
+            double precision dimension(100) :: toath
+            double precision dimension(100) :: cgath
+            integer dimension(100,100) :: iref
+            integer :: nci
             logical :: flex
             logical :: tesgrd
             logical :: sh2
             logical :: epsd
-            integer*4 :: ientyp
-            real*8 :: rgyh
-            real*8 :: rgyp
+            integer :: ientyp
+            double precision :: rgyh
+            double precision :: rgyp
             double precision :: abgs
             double precision :: bbgs
             double precision dimension(8) :: dph
             integer dimension(100) :: bgsvar
-            integer*4 :: idloa
-            integer*4 :: idloz
-            integer*4 :: idupa
-            integer*4 :: idupz
+            integer :: idloa
+            integer :: idloz
+            integer :: idupa
+            integer :: idupz
             integer :: myrank
             integer :: no
@@ -5163,18 +5744,18 @@
             character dimension(100,4) :: nmath
             character dimension(100,3) :: nmvrh
-            integer*4 dimension(100) :: ityath
-            integer*4 dimension(100) :: iowath
-            integer*4 dimension(100) :: iyowath
-            integer*4 dimension(100) :: nbdath
-            integer*4 dimension(3,100) :: ibdath
-            integer*4 dimension(3,100) :: iybdath
-            integer*4 dimension(100) :: ityvrh
-            integer*4 dimension(100) :: iclvrh
-            integer*4 dimension(100) :: iatvrh
+            integer dimension(100) :: ityath
+            integer dimension(100) :: iowath
+            integer dimension(100) :: iyowath
+            integer dimension(100) :: nbdath
+            integer dimension(3,100) :: ibdath
+            integer dimension(3,100) :: iybdath
+            integer dimension(100) :: ityvrh
+            integer dimension(100) :: iclvrh
+            integer dimension(100) :: iatvrh
             character dimension(100,4) :: seq
-            real*8 dimension(2600) :: rvdw
-            real*8 dimension(2600) :: sigma
-            real*8 dimension(2600,3) :: gradan
-            integer*4 dimension(18,18) :: ihbty
+            double precision dimension(2600) :: rvdw
+            double precision dimension(2600) :: sigma
+            double precision dimension(2600,3) :: gradan
+            integer dimension(18,18) :: ihbty
             double precision :: kbias
             double precision :: epshb1
@@ -5193,9 +5774,9 @@
             integer*4 dimension(100,6) :: ihpat
             integer*4 dimension(100) :: nhpat
-            double precision dimension(3 * 3) :: hpstrg
+            double precision dimension(3 * nhptyp) :: hpstrg
             double precision :: exvk
             double precision :: exvcut
             double precision :: exvcut2
-            integer*4 dimension(40 + 41,2600) :: matcon
+            integer*4 dimension(mxconr + 41,2600) :: matcon
             double precision dimension(18) :: sigsa
             double precision dimension(18,18) :: sig2lcp
@@ -5212,39 +5793,39 @@
             double precision dimension(18,18) :: asaexv
             double precision dimension(18,18) :: bsaexv
-            integer*4 :: npnt
+            integer :: npnt
             character dimension(10,80) :: nmml
-            real*8 dimension(18,18) :: cij
-            real*8 dimension(18,18) :: aij
-            real*8 dimension(18,18) :: a14
-            real*8 dimension(18,18) :: chb
-            real*8 dimension(18,18) :: ahb
-            real*8 dimension(19) :: e0to
-            real*8 dimension(19) :: sgto
-            real*8 dimension(19) :: rnto
-            real*8 dimension(19) :: esnto
-            real*8 :: conv
-            real*8 :: plt
-            real*8 :: slp
-            real*8 :: cohb
-            integer*4 dimension(100) :: iatrs1
-            integer*4 dimension(100) :: iatrs2
-            integer*4 dimension(100) :: ixatrs
-            integer*4 dimension(100) :: ivrrs1
-            integer*4 dimension(100) :: nvrrs
-            integer*4 :: ntlrt
-            integer*4 :: ntlsu
-            integer*4 dimension(500) :: i1vrrt
-            integer*4 dimension(500) :: i2vrrt
-            integer*4 dimension(4800) :: iprtsu
-            integer*4 dimension(800) :: i1rtsu
-            integer*4 dimension(800) :: nrtsu
-            integer*4 dimension(800) :: i1vrsu
-            integer*4 dimension(800) :: i2vrsu
-            integer*4 dimension(800) :: ipvrsu
-            real*8 dimension(3,10) :: rfpt
-            real*8 dimension(6,10) :: gbpr
-            real*8 dimension(3,10) :: xrfax
-            real*8 dimension(3,10) :: yrfax
-            real*8 dimension(3,10) :: zrfax
+            double precision dimension(18,18) :: cij
+            double precision dimension(18,18) :: aij
+            double precision dimension(18,18) :: a14
+            double precision dimension(18,18) :: chb
+            double precision dimension(18,18) :: ahb
+            double precision dimension(19) :: e0to
+            double precision dimension(19) :: sgto
+            double precision dimension(19) :: rnto
+            double precision dimension(19) :: esnto
+            double precision :: conv
+            double precision :: plt
+            double precision :: slp
+            double precision :: cohb
+            integer dimension(100) :: iatrs1
+            integer dimension(100) :: iatrs2
+            integer dimension(100) :: ixatrs
+            integer dimension(100) :: ivrrs1
+            integer dimension(100) :: nvrrs
+            integer :: ntlrt
+            integer :: ntlsu
+            integer dimension(500) :: i1vrrt
+            integer dimension(500) :: i2vrrt
+            integer dimension(4800) :: iprtsu
+            integer dimension(800) :: i1rtsu
+            integer dimension(800) :: nrtsu
+            integer dimension(800) :: i1vrsu
+            integer dimension(800) :: i2vrsu
+            integer dimension(800) :: ipvrsu
+            double precision dimension(3,10) :: rfpt
+            double precision dimension(6,10) :: gbpr
+            double precision dimension(3,10) :: xrfax
+            double precision dimension(3,10) :: yrfax
+            double precision dimension(3,10) :: zrfax
             integer*4 dimension(100) :: in
             integer*4 dimension(100) :: ica
@@ -5254,44 +5835,44 @@
             integer*4 dimension(100) :: ipsi
             logical dimension(800) :: fxvr
-            real*8 :: eyel
-            real*8 :: eyvw
-            real*8 :: eyhb
-            real*8 :: eyvr
-            real*8 :: eysm
-            real*8 :: eysl
-            real*8 :: eyrg
-            real*8 :: eyslh
-            real*8 :: eyslp
-            real*8 :: eyab
-            real*8 :: eysmi
-            real*8 :: eyhbi
-            real*8 :: eyeli
-            real*8 :: eyvwi
-            real*8 dimension(800) :: gdeyvr
-            real*8 dimension(800) :: gdeyrg
-            real*8 dimension(800) :: gdeysl
-            real*8 dimension(60) :: gdeygb
-            real*8 :: wtey
-            real*8 :: wtrg
-            integer*4 dimension(800) :: iatvr
-            integer*4 dimension(800) :: ityvr
-            integer*4 dimension(800) :: iclvr
-            integer*4 dimension(800) :: iorvr
-            integer*4 dimension(800) :: imsvr1
-            integer*4 dimension(800) :: imsvr2
-            integer*4 dimension(2400) :: latms1
-            integer*4 dimension(2400) :: latms2
-            integer*4 dimension(800) :: iadvr1
-            integer*4 dimension(800) :: iadvr2
-            integer*4 dimension(800) :: ladvr
-            integer*4 dimension(800) :: idvr
+            double precision :: eyel
+            double precision :: eyvw
+            double precision :: eyhb
+            double precision :: eyvr
+            double precision :: eysm
+            double precision :: eysl
+            double precision :: eyrg
+            double precision :: eyslh
+            double precision :: eyslp
+            double precision :: eyab
+            double precision :: eysmi
+            double precision :: eyhbi
+            double precision :: eyeli
+            double precision :: eyvwi
+            double precision dimension(800) :: gdeyvr
+            double precision dimension(800) :: gdeyrg
+            double precision dimension(800) :: gdeysl
+            double precision dimension(60) :: gdeygb
+            double precision :: wtey
+            double precision :: wtrg
+            integer dimension(800) :: iatvr
+            integer dimension(800) :: ityvr
+            integer dimension(800) :: iclvr
+            integer dimension(800) :: iorvr
+            integer dimension(800) :: imsvr1
+            integer dimension(800) :: imsvr2
+            integer dimension(2400) :: latms1
+            integer dimension(2400) :: latms2
+            integer dimension(800) :: iadvr1
+            integer dimension(800) :: iadvr2
+            integer dimension(800) :: ladvr
+            integer dimension(800) :: idvr
             integer :: enysolct
-            character dimension(3,800) :: nmvr
-            real*8 :: boxsize
+            character dimension(800,3) :: nmvr
+            double precision :: boxsize
             integer :: seed
-            character*100 :: zimm
-            integer*4 :: itysol
+            character*mxrs :: zimm
+            integer :: itysol
             logical :: isolscl
-            real*8 dimension(100) :: rsstrg
+            double precision dimension(100) :: rsstrg
             character dimension(35,4) :: rsnmcd
             character dimension(35) :: onltcd
@@ -5299,31 +5880,31 @@
             integer :: upchswitch
             double precision :: bgsprob
-            integer*4 dimension(10) :: nvwml
-            integer*4 dimension(10) :: ivwml1
-            integer*4 dimension(10) :: n14ml
-            integer*4 dimension(10) :: i14ml1
-            integer*4 dimension(2600) :: ivwat1
-            integer*4 dimension(2600) :: ivwat2
-            integer*4 dimension(2600) :: i14at1
-            integer*4 dimension(2600) :: i14at2
-            integer*4 dimension(10400) :: lvwat1
-            integer*4 dimension(10400) :: lvwat2
-            integer*4 dimension(10400) :: l14at
-            integer*4 dimension(10400) :: ixatvw
-            integer*4 dimension(10400) :: ixat14
-            real*8 dimension(800) :: olvlvr
-            real*8 dimension(800) :: vlvr
-            real*8 dimension(800) :: axvr
-            real*8 :: beta
-            real*8 dimension(18,18) :: c_f
-            real*8 dimension(18,18) :: a_f
-            real*8 dimension(4,6) :: chb_f
-            real*8 dimension(4,6) :: ahb_f
-            real*8 dimension(19) :: e0to_f
-            real*8 dimension(19) :: sgto_f
-            real*8 dimension(19) :: rnto_f
-            real*8 :: plt_f
-            real*8 :: slp_f
-            real*8 :: cohb_f
+            integer dimension(10) :: nvwml
+            integer dimension(10) :: ivwml1
+            integer dimension(10) :: n14ml
+            integer dimension(10) :: i14ml1
+            integer dimension(2600) :: ivwat1
+            integer dimension(2600) :: ivwat2
+            integer dimension(2600) :: i14at1
+            integer dimension(2600) :: i14at2
+            integer dimension(10400) :: lvwat1
+            integer dimension(10400) :: lvwat2
+            integer dimension(10400) :: l14at
+            integer dimension(10400) :: ixatvw
+            integer dimension(10400) :: ixat14
+            double precision dimension(800) :: olvlvr
+            double precision dimension(800) :: vlvr
+            double precision dimension(800) :: axvr
+            double precision :: beta
+            double precision dimension(18,18) :: c_f
+            double precision dimension(18,18) :: a_f
+            double precision dimension(4,6) :: chb_f
+            double precision dimension(4,6) :: ahb_f
+            double precision dimension(19) :: e0to_f
+            double precision dimension(19) :: sgto_f
+            double precision dimension(19) :: rnto_f
+            double precision :: plt_f
+            double precision :: slp_f
+            double precision :: cohb_f
             common /v_sol/ vdvol,asa,asap,asah
             common /bgs_i/ bgsnvar,iph
@@ -5399,68 +5980,68 @@
                 real*8 intent(in) :: binwidth
                 logical intent(in) :: l_iter
-                real*8 :: vdvol
-                real*8 :: asa
-                real*8 :: asap
-                real*8 :: asah
-                real*8 dimension(2600) :: cgat
-                real*8 dimension(2600) :: xbaat
-                real*8 dimension(2600) :: ybaat
-                real*8 dimension(2600) :: zbaat
-                real*8 dimension(2600) :: baat
-                real*8 dimension(2600) :: snbaat
-                real*8 dimension(2600) :: csbaat
-                real*8 dimension(2600) :: xtoat
-                real*8 dimension(2600) :: ytoat
-                real*8 dimension(2600) :: ztoat
-                real*8 dimension(2600) :: toat
-                real*8 dimension(2600) :: sntoat
-                real*8 dimension(2600) :: cstoat
-                real*8 dimension(2600) :: blat
-                real*8 dimension(2602) :: xat
-                real*8 dimension(2602) :: yat
-                real*8 dimension(2602) :: zat
-                integer*4 dimension(100,100) :: ijcont
-                integer*4 dimension(100) :: ind_alf
+                double precision :: vdvol
+                double precision :: asa
+                double precision :: asap
+                double precision :: asah
+                integer dimension(2600) :: cgat
+                double precision dimension(2600) :: xbaat
+                double precision dimension(2600) :: ybaat
+                double precision dimension(2600) :: zbaat
+                double precision dimension(2600) :: baat
+                double precision dimension(2600) :: snbaat
+                double precision dimension(2600) :: csbaat
+                double precision dimension(2600) :: xtoat
+                double precision dimension(2600) :: ytoat
+                double precision dimension(2600) :: ztoat
+                double precision dimension(2600) :: toat
+                double precision dimension(2600) :: sntoat
+                double precision dimension(2600) :: cstoat
+                double precision dimension(2600) :: blat
+                double precision dimension(2602) :: xat
+                double precision dimension(2602) :: yat
+                double precision dimension(2602) :: zat
+                integer dimension(100,100) :: ijcont
+                integer dimension(100) :: ind_alf
                 logical dimension(18) :: do_s
                 logical dimension(18) :: ac_s
                 character dimension(500,4) :: nmrt
                 character dimension(1000,3) :: nmvrrt
-                integer*4 :: nvr
-                real*8 dimension(9,18) :: coef_sl
-                real*8 dimension(9,18) :: rad_vdw
-                real*8 dimension(100) :: surfres
-                integer*4 :: ntyhb
-                integer*4 dimension(100) :: ixtyhb
-                integer*4 dimension(100) :: nutyhb
-                integer*4 dimension(10,10) :: mmhb
-                character dimension(4,2600) :: nmat
-                integer*4 :: lunlib
-                integer*4 :: lunseq
-                integer*4 :: lunchg
-                integer*4 :: lunvar
-                integer*4 :: lunrst
+                integer :: nvr
+                double precision dimension(9,18) :: coef_sl
+                double precision dimension(9,18) :: rad_vdw
+                double precision dimension(100) :: surfres
+                integer :: ntyhb
+                integer dimension(100) :: ixtyhb
+                integer dimension(100) :: nutyhb
+                integer dimension(10,10) :: mmhb
+                character dimension(2600,4) :: nmat
+                integer :: lunlib
+                integer :: lunseq
+                integer :: lunchg
+                integer :: lunvar
+                integer :: lunrst
                 logical dimension(800) :: isrfvr
-                real*8 dimension(500) :: pbrt
-                real*8 dimension(1000) :: vuvrrt
-                real*8 dimension(1000) :: dvvrrt
-                integer*4 dimension(2600) :: ityat
-                integer*4 dimension(2600) :: iowat
-                integer*4 dimension(2600) :: iyowat
-                integer*4 dimension(2600) :: nbdat
-                integer*4 dimension(3,2600) :: ibdat
-                integer*4 dimension(3,2600) :: iybdat
-                integer*4 dimension(2600) :: ixmsat
-                real*8 :: ehm
-                real*8 dimension(18) :: atpl
-                real*8 dimension(18) :: efel
-                real*8 dimension(18) :: emin
-                real*8 dimension(18) :: rmin
-                real*8 dimension(4,6) :: chb_s
-                real*8 dimension(4,6) :: ahb_s
-                real*8 dimension(19) :: e0to_s
-                real*8 dimension(19) :: sgto_s
-                real*8 dimension(19) :: rnto_s
-                real*8 :: eps_s
-                real*8 dimension(2000,3) :: spoint
+                double precision dimension(500) :: pbrt
+                double precision dimension(1000) :: vuvrrt
+                double precision dimension(1000) :: dvvrrt
+                integer dimension(2600) :: ityat
+                integer dimension(2600) :: iowat
+                integer dimension(2600) :: iyowat
+                integer dimension(2600) :: nbdat
+                integer dimension(3,2600) :: ibdat
+                integer dimension(3,2600) :: iybdat
+                integer dimension(2600) :: ixmsat
+                double precision :: ehm
+                double precision dimension(18) :: atpl
+                double precision dimension(18) :: efel
+                double precision dimension(18) :: emin
+                double precision dimension(18) :: rmin
+                double precision dimension(4,6) :: chb_s
+                double precision dimension(4,6) :: ahb_s
+                double precision dimension(19) :: e0to_s
+                double precision dimension(19) :: sgto_s
+                double precision dimension(19) :: rnto_s
+                double precision :: eps_s
+                double precision dimension(2000,3) :: spoint
                 logical dimension(18) :: do_f
                 logical dimension(18) :: ac_f
@@ -5470,33 +6051,33 @@
                 character*80 :: varfil
                 character*80 :: rstfil
-                integer*4 :: ntlml
-                integer*4 dimension(10) :: irsml1
-                integer*4 dimension(10) :: irsml2
-                integer*4 dimension(10) :: ivrml1
-                integer*4 dimension(10) :: nvrml
-                integer*4 dimension(10) :: imsml1
-                integer*4 dimension(10) :: nmsml
-                integer*4 dimension(10) :: iadml1
-                integer*4 dimension(10) :: nadml
-                integer*4 dimension(3,10) :: ixrfpt
-                integer*4 dimension(2600) :: ixatp
-                integer*4 :: ireg
-                real*8 dimension(100) :: blath
-                real*8 dimension(100) :: baath
-                real*8 dimension(100) :: toath
-                real*8 dimension(100) :: cgath
-                integer*4 dimension(100,100) :: iref
-                integer*4 :: nci
+                integer :: ntlml
+                integer dimension(10) :: irsml1
+                integer dimension(10) :: irsml2
+                integer dimension(10) :: ivrml1
+                integer dimension(10) :: nvrml
+                integer dimension(10) :: imsml1
+                integer dimension(10) :: nmsml
+                integer dimension(10) :: iadml1
+                integer dimension(10) :: nadml
+                integer dimension(3,10) :: ixrfpt
+                integer dimension(2600) :: ixatp
+                integer :: ireg
+                double precision dimension(100) :: blath
+                double precision dimension(100) :: baath
+                double precision dimension(100) :: toath
+                double precision dimension(100) :: cgath
+                integer dimension(100,100) :: iref
+                integer :: nci
                 logical :: flex
                 logical :: tesgrd
                 logical :: sh2
                 logical :: epsd
-                integer*4 :: ientyp
-                real*8 :: rgyh
-                real*8 :: rgyp
-                integer*4 :: idloa
-                integer*4 :: idloz
-                integer*4 :: idupa
-                integer*4 :: idupz
+                integer :: ientyp
+                double precision :: rgyh
+                double precision :: rgyp
+                integer :: idloa
+                integer :: idloz
+                integer :: idupa
+                integer :: idupz
                 integer :: myrank
                 integer :: no
@@ -5505,94 +6086,94 @@
                 character dimension(100,4) :: nmath
                 character dimension(100,3) :: nmvrh
-                integer*4 dimension(100) :: ityath
-                integer*4 dimension(100) :: iowath
-                integer*4 dimension(100) :: iyowath
-                integer*4 dimension(100) :: nbdath
-                integer*4 dimension(3,100) :: ibdath
-                integer*4 dimension(3,100) :: iybdath
-                integer*4 dimension(100) :: ityvrh
-                integer*4 dimension(100) :: iclvrh
-                integer*4 dimension(100) :: iatvrh
+                integer dimension(100) :: ityath
+                integer dimension(100) :: iowath
+                integer dimension(100) :: iyowath
+                integer dimension(100) :: nbdath
+                integer dimension(3,100) :: ibdath
+                integer dimension(3,100) :: iybdath
+                integer dimension(100) :: ityvrh
+                integer dimension(100) :: iclvrh
+                integer dimension(100) :: iatvrh
                 character dimension(100,4) :: seq
-                real*8 dimension(2600) :: rvdw
-                real*8 dimension(2600) :: sigma
-                real*8 dimension(2600,3) :: gradan
-                integer*4 dimension(18,18) :: ihbty
-                integer*4 :: npnt
+                double precision dimension(2600) :: rvdw
+                double precision dimension(2600) :: sigma
+                double precision dimension(2600,3) :: gradan
+                integer dimension(18,18) :: ihbty
+                integer :: npnt
                 character dimension(10,80) :: nmml
-                real*8 dimension(18,18) :: cij
-                real*8 dimension(18,18) :: aij
-                real*8 dimension(18,18) :: a14
-                real*8 dimension(18,18) :: chb
-                real*8 dimension(18,18) :: ahb
-                real*8 dimension(19) :: e0to
-                real*8 dimension(19) :: sgto
-                real*8 dimension(19) :: rnto
-                real*8 dimension(19) :: esnto
-                real*8 :: conv
-                real*8 :: plt
-                real*8 :: slp
-                real*8 :: cohb
-                integer*4 dimension(100) :: iatrs1
-                integer*4 dimension(100) :: iatrs2
-                integer*4 dimension(100) :: ixatrs
-                integer*4 dimension(100) :: ivrrs1
-                integer*4 dimension(100) :: nvrrs
-                integer*4 :: ntlrt
-                integer*4 :: ntlsu
-                integer*4 dimension(500) :: i1vrrt
-                integer*4 dimension(500) :: i2vrrt
-                integer*4 dimension(4800) :: iprtsu
-                integer*4 dimension(800) :: i1rtsu
-                integer*4 dimension(800) :: nrtsu
-                integer*4 dimension(800) :: i1vrsu
-                integer*4 dimension(800) :: i2vrsu
-                integer*4 dimension(800) :: ipvrsu
-                real*8 dimension(3,10) :: rfpt
-                real*8 dimension(6,10) :: gbpr
-                real*8 dimension(3,10) :: xrfax
-                real*8 dimension(3,10) :: yrfax
-                real*8 dimension(3,10) :: zrfax
+                double precision dimension(18,18) :: cij
+                double precision dimension(18,18) :: aij
+                double precision dimension(18,18) :: a14
+                double precision dimension(18,18) :: chb
+                double precision dimension(18,18) :: ahb
+                double precision dimension(19) :: e0to
+                double precision dimension(19) :: sgto
+                double precision dimension(19) :: rnto
+                double precision dimension(19) :: esnto
+                double precision :: conv
+                double precision :: plt
+                double precision :: slp
+                double precision :: cohb
+                integer dimension(100) :: iatrs1
+                integer dimension(100) :: iatrs2
+                integer dimension(100) :: ixatrs
+                integer dimension(100) :: ivrrs1
+                integer dimension(100) :: nvrrs
+                integer :: ntlrt
+                integer :: ntlsu
+                integer dimension(500) :: i1vrrt
+                integer dimension(500) :: i2vrrt
+                integer dimension(4800) :: iprtsu
+                integer dimension(800) :: i1rtsu
+                integer dimension(800) :: nrtsu
+                integer dimension(800) :: i1vrsu
+                integer dimension(800) :: i2vrsu
+                integer dimension(800) :: ipvrsu
+                double precision dimension(3,10) :: rfpt
+                double precision dimension(6,10) :: gbpr
+                double precision dimension(3,10) :: xrfax
+                double precision dimension(3,10) :: yrfax
+                double precision dimension(3,10) :: zrfax
                 logical dimension(800) :: fxvr
-                real*8 :: eyel
-                real*8 :: eyvw
-                real*8 :: eyhb
-                real*8 :: eyvr
-                real*8 :: eysm
-                real*8 :: eysl
-                real*8 :: eyrg
-                real*8 :: eyslh
-                real*8 :: eyslp
-                real*8 :: eyab
-                real*8 :: eysmi
-                real*8 :: eyhbi
-                real*8 :: eyeli
-                real*8 :: eyvwi
-                real*8 dimension(800) :: gdeyvr
-                real*8 dimension(800) :: gdeyrg
-                real*8 dimension(800) :: gdeysl
-                real*8 dimension(60) :: gdeygb
-                real*8 :: wtey
-                real*8 :: wtrg
-                integer*4 dimension(800) :: iatvr
-                integer*4 dimension(800) :: ityvr
-                integer*4 dimension(800) :: iclvr
-                integer*4 dimension(800) :: iorvr
-                integer*4 dimension(800) :: imsvr1
-                integer*4 dimension(800) :: imsvr2
-                integer*4 dimension(2400) :: latms1
-                integer*4 dimension(2400) :: latms2
-                integer*4 dimension(800) :: iadvr1
-                integer*4 dimension(800) :: iadvr2
-                integer*4 dimension(800) :: ladvr
-                integer*4 dimension(800) :: idvr
+                double precision :: eyel
+                double precision :: eyvw
+                double precision :: eyhb
+                double precision :: eyvr
+                double precision :: eysm
+                double precision :: eysl
+                double precision :: eyrg
+                double precision :: eyslh
+                double precision :: eyslp
+                double precision :: eyab
+                double precision :: eysmi
+                double precision :: eyhbi
+                double precision :: eyeli
+                double precision :: eyvwi
+                double precision dimension(800) :: gdeyvr
+                double precision dimension(800) :: gdeyrg
+                double precision dimension(800) :: gdeysl
+                double precision dimension(60) :: gdeygb
+                double precision :: wtey
+                double precision :: wtrg
+                integer dimension(800) :: iatvr
+                integer dimension(800) :: ityvr
+                integer dimension(800) :: iclvr
+                integer dimension(800) :: iorvr
+                integer dimension(800) :: imsvr1
+                integer dimension(800) :: imsvr2
+                integer dimension(2400) :: latms1
+                integer dimension(2400) :: latms2
+                integer dimension(800) :: iadvr1
+                integer dimension(800) :: iadvr2
+                integer dimension(800) :: ladvr
+                integer dimension(800) :: idvr
                 integer :: enysolct
-                character dimension(3,800) :: nmvr
-                real*8 :: boxsize
+                character dimension(800,3) :: nmvr
+                double precision :: boxsize
                 integer :: seed
-                character*100 :: zimm
-                integer*4 :: itysol
+                character*mxrs :: zimm
+                integer :: itysol
                 logical :: isolscl
-                real*8 dimension(100) :: rsstrg
+                double precision dimension(100) :: rsstrg
                 character dimension(35,4) :: rsnmcd
                 character dimension(35) :: onltcd
@@ -5600,31 +6181,31 @@
                 integer :: upchswitch
                 double precision :: bgsprob
-                integer*4 dimension(10) :: nvwml
-                integer*4 dimension(10) :: ivwml1
-                integer*4 dimension(10) :: n14ml
-                integer*4 dimension(10) :: i14ml1
-                integer*4 dimension(2600) :: ivwat1
-                integer*4 dimension(2600) :: ivwat2
-                integer*4 dimension(2600) :: i14at1
-                integer*4 dimension(2600) :: i14at2
-                integer*4 dimension(10400) :: lvwat1
-                integer*4 dimension(10400) :: lvwat2
-                integer*4 dimension(10400) :: l14at
-                integer*4 dimension(10400) :: ixatvw
-                integer*4 dimension(10400) :: ixat14
-                real*8 dimension(800) :: olvlvr
-                real*8 dimension(800) :: vlvr
-                real*8 dimension(800) :: axvr
-                real*8 :: beta
-                real*8 dimension(18,18) :: c_f
-                real*8 dimension(18,18) :: a_f
-                real*8 dimension(4,6) :: chb_f
-                real*8 dimension(4,6) :: ahb_f
-                real*8 dimension(19) :: e0to_f
-                real*8 dimension(19) :: sgto_f
-                real*8 dimension(19) :: rnto_f
-                real*8 :: plt_f
-                real*8 :: slp_f
-                real*8 :: cohb_f
+                integer dimension(10) :: nvwml
+                integer dimension(10) :: ivwml1
+                integer dimension(10) :: n14ml
+                integer dimension(10) :: i14ml1
+                integer dimension(2600) :: ivwat1
+                integer dimension(2600) :: ivwat2
+                integer dimension(2600) :: i14at1
+                integer dimension(2600) :: i14at2
+                integer dimension(10400) :: lvwat1
+                integer dimension(10400) :: lvwat2
+                integer dimension(10400) :: l14at
+                integer dimension(10400) :: ixatvw
+                integer dimension(10400) :: ixat14
+                double precision dimension(800) :: olvlvr
+                double precision dimension(800) :: vlvr
+                double precision dimension(800) :: axvr
+                double precision :: beta
+                double precision dimension(18,18) :: c_f
+                double precision dimension(18,18) :: a_f
+                double precision dimension(4,6) :: chb_f
+                double precision dimension(4,6) :: ahb_f
+                double precision dimension(19) :: e0to_f
+                double precision dimension(19) :: sgto_f
+                double precision dimension(19) :: rnto_f
+                double precision :: plt_f
+                double precision :: slp_f
+                double precision :: cohb_f
                 common /v_sol/ vdvol,asa,asap,asah
                 common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
@@ -5690,68 +6271,68 @@
                 real*8 intent(in) :: binwidth
                 logical intent(in) :: restart
-                real*8 :: vdvol
-                real*8 :: asa
-                real*8 :: asap
-                real*8 :: asah
-                real*8 dimension(2600) :: cgat
-                real*8 dimension(2600) :: xbaat
-                real*8 dimension(2600) :: ybaat
-                real*8 dimension(2600) :: zbaat
-                real*8 dimension(2600) :: baat
-                real*8 dimension(2600) :: snbaat
-                real*8 dimension(2600) :: csbaat
-                real*8 dimension(2600) :: xtoat
-                real*8 dimension(2600) :: ytoat
-                real*8 dimension(2600) :: ztoat
-                real*8 dimension(2600) :: toat
-                real*8 dimension(2600) :: sntoat
-                real*8 dimension(2600) :: cstoat
-                real*8 dimension(2600) :: blat
-                real*8 dimension(2602) :: xat
-                real*8 dimension(2602) :: yat
-                real*8 dimension(2602) :: zat
-                integer*4 dimension(100,100) :: ijcont
-                integer*4 dimension(100) :: ind_alf
+                double precision :: vdvol
+                double precision :: asa
+                double precision :: asap
+                double precision :: asah
+                integer dimension(2600) :: cgat
+                double precision dimension(2600) :: xbaat
+                double precision dimension(2600) :: ybaat
+                double precision dimension(2600) :: zbaat
+                double precision dimension(2600) :: baat
+                double precision dimension(2600) :: snbaat
+                double precision dimension(2600) :: csbaat
+                double precision dimension(2600) :: xtoat
+                double precision dimension(2600) :: ytoat
+                double precision dimension(2600) :: ztoat
+                double precision dimension(2600) :: toat
+                double precision dimension(2600) :: sntoat
+                double precision dimension(2600) :: cstoat
+                double precision dimension(2600) :: blat
+                double precision dimension(2602) :: xat
+                double precision dimension(2602) :: yat
+                double precision dimension(2602) :: zat
+                integer dimension(100,100) :: ijcont
+                integer dimension(100) :: ind_alf
                 logical dimension(18) :: do_s
                 logical dimension(18) :: ac_s
                 character dimension(500,4) :: nmrt
                 character dimension(1000,3) :: nmvrrt
-                integer*4 :: nvr
-                real*8 dimension(9,18) :: coef_sl
-                real*8 dimension(9,18) :: rad_vdw
-                real*8 dimension(100) :: surfres
-                integer*4 :: ntyhb
-                integer*4 dimension(100) :: ixtyhb
-                integer*4 dimension(100) :: nutyhb
-                integer*4 dimension(10,10) :: mmhb
-                character dimension(4,2600) :: nmat
-                integer*4 :: lunlib
-                integer*4 :: lunseq
-                integer*4 :: lunchg
-                integer*4 :: lunvar
-                integer*4 :: lunrst
+                integer :: nvr
+                double precision dimension(9,18) :: coef_sl
+                double precision dimension(9,18) :: rad_vdw
+                double precision dimension(100) :: surfres
+                integer :: ntyhb
+                integer dimension(100) :: ixtyhb
+                integer dimension(100) :: nutyhb
+                integer dimension(10,10) :: mmhb
+                character dimension(2600,4) :: nmat
+                integer :: lunlib
+                integer :: lunseq
+                integer :: lunchg
+                integer :: lunvar
+                integer :: lunrst
                 logical dimension(800) :: isrfvr
-                real*8 dimension(500) :: pbrt
-                real*8 dimension(1000) :: vuvrrt
-                real*8 dimension(1000) :: dvvrrt
-                integer*4 dimension(2600) :: ityat
-                integer*4 dimension(2600) :: iowat
-                integer*4 dimension(2600) :: iyowat
-                integer*4 dimension(2600) :: nbdat
-                integer*4 dimension(3,2600) :: ibdat
-                integer*4 dimension(3,2600) :: iybdat
-                integer*4 dimension(2600) :: ixmsat
-                real*8 :: ehm
-                real*8 dimension(18) :: atpl
-                real*8 dimension(18) :: efel
-                real*8 dimension(18) :: emin
-                real*8 dimension(18) :: rmin
-                real*8 dimension(4,6) :: chb_s
-                real*8 dimension(4,6) :: ahb_s
-                real*8 dimension(19) :: e0to_s
-                real*8 dimension(19) :: sgto_s
-                real*8 dimension(19) :: rnto_s
-                real*8 :: eps_s
-                real*8 dimension(2000,3) :: spoint
+                double precision dimension(500) :: pbrt
+                double precision dimension(1000) :: vuvrrt
+                double precision dimension(1000) :: dvvrrt
+                integer dimension(2600) :: ityat
+                integer dimension(2600) :: iowat
+                integer dimension(2600) :: iyowat
+                integer dimension(2600) :: nbdat
+                integer dimension(3,2600) :: ibdat
+                integer dimension(3,2600) :: iybdat
+                integer dimension(2600) :: ixmsat
+                double precision :: ehm
+                double precision dimension(18) :: atpl
+                double precision dimension(18) :: efel
+                double precision dimension(18) :: emin
+                double precision dimension(18) :: rmin
+                double precision dimension(4,6) :: chb_s
+                double precision dimension(4,6) :: ahb_s
+                double precision dimension(19) :: e0to_s
+                double precision dimension(19) :: sgto_s
+                double precision dimension(19) :: rnto_s
+                double precision :: eps_s
+                double precision dimension(2000,3) :: spoint
                 logical dimension(18) :: do_f
                 logical dimension(18) :: ac_f
@@ -5761,33 +6342,33 @@
                 character*80 :: varfil
                 character*80 :: rstfil
-                integer*4 :: ntlml
-                integer*4 dimension(10) :: irsml1
-                integer*4 dimension(10) :: irsml2
-                integer*4 dimension(10) :: ivrml1
-                integer*4 dimension(10) :: nvrml
-                integer*4 dimension(10) :: imsml1
-                integer*4 dimension(10) :: nmsml
-                integer*4 dimension(10) :: iadml1
-                integer*4 dimension(10) :: nadml
-                integer*4 dimension(3,10) :: ixrfpt
-                integer*4 dimension(2600) :: ixatp
-                integer*4 :: ireg
-                real*8 dimension(100) :: blath
-                real*8 dimension(100) :: baath
-                real*8 dimension(100) :: toath
-                real*8 dimension(100) :: cgath
-                integer*4 dimension(100,100) :: iref
-                integer*4 :: nci
+                integer :: ntlml
+                integer dimension(10) :: irsml1
+                integer dimension(10) :: irsml2
+                integer dimension(10) :: ivrml1
+                integer dimension(10) :: nvrml
+                integer dimension(10) :: imsml1
+                integer dimension(10) :: nmsml
+                integer dimension(10) :: iadml1
+                integer dimension(10) :: nadml
+                integer dimension(3,10) :: ixrfpt
+                integer dimension(2600) :: ixatp
+                integer :: ireg
+                double precision dimension(100) :: blath
+                double precision dimension(100) :: baath
+                double precision dimension(100) :: toath
+                double precision dimension(100) :: cgath
+                integer dimension(100,100) :: iref
+                integer :: nci
                 logical :: flex
                 logical :: tesgrd
                 logical :: sh2
                 logical :: epsd
-                integer*4 :: ientyp
-                real*8 :: rgyh
-                real*8 :: rgyp
-                integer*4 :: idloa
-                integer*4 :: idloz
-                integer*4 :: idupa
-                integer*4 :: idupz
+                integer :: ientyp
+                double precision :: rgyh
+                double precision :: rgyp
+                integer :: idloa
+                integer :: idloz
+                integer :: idupa
+                integer :: idupz
                 integer :: myrank
                 integer :: no
@@ -5796,94 +6377,94 @@
                 character dimension(100,4) :: nmath
                 character dimension(100,3) :: nmvrh
-                integer*4 dimension(100) :: ityath
-                integer*4 dimension(100) :: iowath
-                integer*4 dimension(100) :: iyowath
-                integer*4 dimension(100) :: nbdath
-                integer*4 dimension(3,100) :: ibdath
-                integer*4 dimension(3,100) :: iybdath
-                integer*4 dimension(100) :: ityvrh
-                integer*4 dimension(100) :: iclvrh
-                integer*4 dimension(100) :: iatvrh
+                integer dimension(100) :: ityath
+                integer dimension(100) :: iowath
+                integer dimension(100) :: iyowath
+                integer dimension(100) :: nbdath
+                integer dimension(3,100) :: ibdath
+                integer dimension(3,100) :: iybdath
+                integer dimension(100) :: ityvrh
+                integer dimension(100) :: iclvrh
+                integer dimension(100) :: iatvrh
                 character dimension(100,4) :: seq
-                real*8 dimension(2600) :: rvdw
-                real*8 dimension(2600) :: sigma
-                real*8 dimension(2600,3) :: gradan
-                integer*4 dimension(18,18) :: ihbty
-                integer*4 :: npnt
+                double precision dimension(2600) :: rvdw
+                double precision dimension(2600) :: sigma
+                double precision dimension(2600,3) :: gradan
+                integer dimension(18,18) :: ihbty
+                integer :: npnt
                 character dimension(10,80) :: nmml
-                real*8 dimension(18,18) :: cij
-                real*8 dimension(18,18) :: aij
-                real*8 dimension(18,18) :: a14
-                real*8 dimension(18,18) :: chb
-                real*8 dimension(18,18) :: ahb
-                real*8 dimension(19) :: e0to
-                real*8 dimension(19) :: sgto
-                real*8 dimension(19) :: rnto
-                real*8 dimension(19) :: esnto
-                real*8 :: conv
-                real*8 :: plt
-                real*8 :: slp
-                real*8 :: cohb
-                integer*4 dimension(100) :: iatrs1
-                integer*4 dimension(100) :: iatrs2
-                integer*4 dimension(100) :: ixatrs
-                integer*4 dimension(100) :: ivrrs1
-                integer*4 dimension(100) :: nvrrs
-                integer*4 :: ntlrt
-                integer*4 :: ntlsu
-                integer*4 dimension(500) :: i1vrrt
-                integer*4 dimension(500) :: i2vrrt
-                integer*4 dimension(4800) :: iprtsu
-                integer*4 dimension(800) :: i1rtsu
-                integer*4 dimension(800) :: nrtsu
-                integer*4 dimension(800) :: i1vrsu
-                integer*4 dimension(800) :: i2vrsu
-                integer*4 dimension(800) :: ipvrsu
-                real*8 dimension(3,10) :: rfpt
-                real*8 dimension(6,10) :: gbpr
-                real*8 dimension(3,10) :: xrfax
-                real*8 dimension(3,10) :: yrfax
-                real*8 dimension(3,10) :: zrfax
+                double precision dimension(18,18) :: cij
+                double precision dimension(18,18) :: aij
+                double precision dimension(18,18) :: a14
+                double precision dimension(18,18) :: chb
+                double precision dimension(18,18) :: ahb
+                double precision dimension(19) :: e0to
+                double precision dimension(19) :: sgto
+                double precision dimension(19) :: rnto
+                double precision dimension(19) :: esnto
+                double precision :: conv
+                double precision :: plt
+                double precision :: slp
+                double precision :: cohb
+                integer dimension(100) :: iatrs1
+                integer dimension(100) :: iatrs2
+                integer dimension(100) :: ixatrs
+                integer dimension(100) :: ivrrs1
+                integer dimension(100) :: nvrrs
+                integer :: ntlrt
+                integer :: ntlsu
+                integer dimension(500) :: i1vrrt
+                integer dimension(500) :: i2vrrt
+                integer dimension(4800) :: iprtsu
+                integer dimension(800) :: i1rtsu
+                integer dimension(800) :: nrtsu
+                integer dimension(800) :: i1vrsu
+                integer dimension(800) :: i2vrsu
+                integer dimension(800) :: ipvrsu
+                double precision dimension(3,10) :: rfpt
+                double precision dimension(6,10) :: gbpr
+                double precision dimension(3,10) :: xrfax
+                double precision dimension(3,10) :: yrfax
+                double precision dimension(3,10) :: zrfax
                 logical dimension(800) :: fxvr
-                real*8 :: eyel
-                real*8 :: eyvw
-                real*8 :: eyhb
-                real*8 :: eyvr
-                real*8 :: eysm
-                real*8 :: eysl
-                real*8 :: eyrg
-                real*8 :: eyslh
-                real*8 :: eyslp
-                real*8 :: eyab
-                real*8 :: eysmi
-                real*8 :: eyhbi
-                real*8 :: eyeli
-                real*8 :: eyvwi
-                real*8 dimension(800) :: gdeyvr
-                real*8 dimension(800) :: gdeyrg
-                real*8 dimension(800) :: gdeysl
-                real*8 dimension(60) :: gdeygb
-                real*8 :: wtey
-                real*8 :: wtrg
-                integer*4 dimension(800) :: iatvr
-                integer*4 dimension(800) :: ityvr
-                integer*4 dimension(800) :: iclvr
-                integer*4 dimension(800) :: iorvr
-                integer*4 dimension(800) :: imsvr1
-                integer*4 dimension(800) :: imsvr2
-                integer*4 dimension(2400) :: latms1
-                integer*4 dimension(2400) :: latms2
-                integer*4 dimension(800) :: iadvr1
-                integer*4 dimension(800) :: iadvr2
-                integer*4 dimension(800) :: ladvr
-                integer*4 dimension(800) :: idvr
+                double precision :: eyel
+                double precision :: eyvw
+                double precision :: eyhb
+                double precision :: eyvr
+                double precision :: eysm
+                double precision :: eysl
+                double precision :: eyrg
+                double precision :: eyslh
+                double precision :: eyslp
+                double precision :: eyab
+                double precision :: eysmi
+                double precision :: eyhbi
+                double precision :: eyeli
+                double precision :: eyvwi
+                double precision dimension(800) :: gdeyvr
+                double precision dimension(800) :: gdeyrg
+                double precision dimension(800) :: gdeysl
+                double precision dimension(60) :: gdeygb
+                double precision :: wtey
+                double precision :: wtrg
+                integer dimension(800) :: iatvr
+                integer dimension(800) :: ityvr
+                integer dimension(800) :: iclvr
+                integer dimension(800) :: iorvr
+                integer dimension(800) :: imsvr1
+                integer dimension(800) :: imsvr2
+                integer dimension(2400) :: latms1
+                integer dimension(2400) :: latms2
+                integer dimension(800) :: iadvr1
+                integer dimension(800) :: iadvr2
+                integer dimension(800) :: ladvr
+                integer dimension(800) :: idvr
                 integer :: enysolct
-                character dimension(3,800) :: nmvr
-                real*8 :: boxsize
+                character dimension(800,3) :: nmvr
+                double precision :: boxsize
                 integer :: seed
-                character*100 :: zimm
-                integer*4 :: itysol
+                character*mxrs :: zimm
+                integer :: itysol
                 logical :: isolscl
-                real*8 dimension(100) :: rsstrg
+                double precision dimension(100) :: rsstrg
                 character dimension(35,4) :: rsnmcd
                 character dimension(35) :: onltcd
@@ -5891,31 +6472,31 @@
                 integer :: upchswitch
                 double precision :: bgsprob
-                integer*4 dimension(10) :: nvwml
-                integer*4 dimension(10) :: ivwml1
-                integer*4 dimension(10) :: n14ml
-                integer*4 dimension(10) :: i14ml1
-                integer*4 dimension(2600) :: ivwat1
-                integer*4 dimension(2600) :: ivwat2
-                integer*4 dimension(2600) :: i14at1
-                integer*4 dimension(2600) :: i14at2
-                integer*4 dimension(10400) :: lvwat1
-                integer*4 dimension(10400) :: lvwat2
-                integer*4 dimension(10400) :: l14at
-                integer*4 dimension(10400) :: ixatvw
-                integer*4 dimension(10400) :: ixat14
-                real*8 dimension(800) :: olvlvr
-                real*8 dimension(800) :: vlvr
-                real*8 dimension(800) :: axvr
-                real*8 :: beta
-                real*8 dimension(18,18) :: c_f
-                real*8 dimension(18,18) :: a_f
-                real*8 dimension(4,6) :: chb_f
-                real*8 dimension(4,6) :: ahb_f
-                real*8 dimension(19) :: e0to_f
-                real*8 dimension(19) :: sgto_f
-                real*8 dimension(19) :: rnto_f
-                real*8 :: plt_f
-                real*8 :: slp_f
-                real*8 :: cohb_f
+                integer dimension(10) :: nvwml
+                integer dimension(10) :: ivwml1
+                integer dimension(10) :: n14ml
+                integer dimension(10) :: i14ml1
+                integer dimension(2600) :: ivwat1
+                integer dimension(2600) :: ivwat2
+                integer dimension(2600) :: i14at1
+                integer dimension(2600) :: i14at2
+                integer dimension(10400) :: lvwat1
+                integer dimension(10400) :: lvwat2
+                integer dimension(10400) :: l14at
+                integer dimension(10400) :: ixatvw
+                integer dimension(10400) :: ixat14
+                double precision dimension(800) :: olvlvr
+                double precision dimension(800) :: vlvr
+                double precision dimension(800) :: axvr
+                double precision :: beta
+                double precision dimension(18,18) :: c_f
+                double precision dimension(18,18) :: a_f
+                double precision dimension(4,6) :: chb_f
+                double precision dimension(4,6) :: ahb_f
+                double precision dimension(19) :: e0to_f
+                double precision dimension(19) :: sgto_f
+                double precision dimension(19) :: rnto_f
+                double precision :: plt_f
+                double precision :: slp_f
+                double precision :: cohb_f
                 common /v_sol/ vdvol,asa,asap,asah
                 common /atm_r/ cgat,xbaat,ybaat,zbaat,baat,snbaat,csbaat,xtoat,ytoat,ztoat,toat,sntoat,cstoat,blat,xat,yat,zat
@@ -5976,4 +6557,4 @@
 end python module smmp
 
-! This file was auto-generated with f2py (version:2_3816).
+! This file was auto-generated with f2py (version:2_5585).
 ! See http://cens.ioc.ee/projects/f2py2e/
