- Timestamp:
- 09/05/08 11:49:42 (16 years ago)
- Branches:
- master
- Children:
- fafe4d6
- Parents:
- 2ebb8b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mklist.f
r2ebb8b6 rbd2278d 1 c**************************************************************2 c 3 cThis file contains the subroutines: mklist,quench4 c 5 cCopyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann,6 cShura Hayryan, Chin-Ku7 cCopyright 2007 Frank Eisenmenger, U.H.E. Hansmann,8 cJan H. Meinke, Sandipan Mohanty9 c 10 c**************************************************************1 ! ************************************************************** 2 ! 3 ! This file contains the subroutines: mklist,quench 4 ! 5 ! Copyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann, 6 ! Shura Hayryan, Chin-Ku 7 ! Copyright 2007 Frank Eisenmenger, U.H.E. Hansmann, 8 ! Jan H. Meinke, Sandipan Mohanty 9 ! 10 ! ************************************************************** 11 11 12 12 subroutine mklist(nml) 13 13 14 c......................................................................15 cPURPOSE: Compile interaction lists ('1-4' according to Scheraga)16 c 17 cCALLS: quench18 c......................................................................19 cTODO: Calculate van-der-Waals regions over all molecules.14 ! ...................................................................... 15 ! PURPOSE: Compile interaction lists ('1-4' according to Scheraga) 16 ! 17 ! CALLS: quench 18 ! ...................................................................... 19 ! TODO: Calculate van-der-Waals regions over all molecules. 20 20 include 'INCL.H' 21 21 22 22 parameter (mxh=50, ! max. # of atom regions 23 #mx2=50)23 & mx2=50) 24 24 25 25 logical ovlp,quench 26 26 27 27 dimension l1st1(mxh),l1st2(mxh),l2nd1(mxh),l2nd2(mxh) 28 #,l1i(mxbd),l2i(mx2)29 30 c_______________________ indices of 1st vdw-region/14-partner for 'nml'28 & ,l1i(mxbd),l2i(mx2) 29 30 ! _______________________ indices of 1st vdw-region/14-partner for 'nml' 31 31 if (nml.eq.1) then 32 32 ivwml1(1)=1 … … 40 40 if (ntlms.eq.0) then 41 41 write (*,'(a,i4)') 42 #' mklist> No mov. sets defined in molecule #',nml42 & ' mklist> No mov. sets defined in molecule #',nml 43 43 nvwml(nml)=0 44 44 n14ml(nml)=0 … … 48 48 nvw=ivwml1(nml)-1 ! # of vdw-regions we have so far 49 49 n14=i14ml1(nml)-1 ! # of 14-partners -"- 50 cFirst atom in molecule50 ! First atom in molecule 51 51 ifiat=iatrs1(irsml1(nml)) 52 cLast atom in molecule52 ! Last atom in molecule 53 53 ilaat=iatrs2(irsml2(nml)) 54 cFirst variable in molecule54 ! First variable in molecule 55 55 ifivr=ivrml1(nml) 56 cLast variable in molecule56 ! Last variable in molecule 57 57 ilavr=ifivr+nvrml(nml)-1 58 c____________________________ initialize: 1st vdw-region & 14-partner per atom58 ! ____________________________ initialize: 1st vdw-region & 14-partner per atom 59 59 do i=ifiat,ilaat 60 60 ivwat1(i)=0 !!! for some atoms ... … … 74 74 if ((i2s-i1s+1).gt.0) then 75 75 76 c____________ exclude mov.sets of var. 'iv' from 1ST list of interact.partn.76 ! ____________ exclude mov.sets of var. 'iv' from 1ST list of interact.partn. 77 77 do is=i1s,i2s 78 78 ovlp=quench(latms1(is),latms2(is),n1st,mxh,l1st1,l1st2) 79 79 enddo 80 c_______________________________ intitialize 2ND list with current 1ST list80 ! _______________________________ intitialize 2ND list with current 1ST list 81 81 do i=1,n1st 82 82 l2nd1(i)=l1st1(i) … … 84 84 enddo 85 85 n2nd=n1st 86 c_________________________________ exclude 'ib' of var. 'iv' from 2ND list86 ! _________________________________ exclude 'ib' of var. 'iv' from 2ND list 87 87 ib=iowat(iatvr(iv)) 88 88 ovlp=quench(ib,ib,n2nd,mxh,l2nd1,l2nd2) … … 94 94 ovlp=quench(iob,iob,n2nd,mxh,l2nd1,l2nd2) ! & in 2ND list 95 95 96 c_____ atoms branching from 'iob': into GENERAL list of 1-4 partners96 ! _____ atoms branching from 'iob': into GENERAL list of 1-4 partners 97 97 do i=1,nbdat(iob) 98 98 ibd=ibdat(i,iob) 99 99 if (ibd.ne.ib.and.iowat(ibd).eq.iob.and. 100 #quench(ibd,ibd,n2nd,mxh,l2nd1,l2nd2) ) then100 & quench(ibd,ibd,n2nd,mxh,l2nd1,l2nd2) ) then 101 101 n2i=n2i+1 102 102 if (n2i.gt.mx2) then 103 103 write (*,'(a,i3,2a)') ' mklist> Molecule # ',nml, 104 #': too many atoms bound to ',nmat(iob)104 & ': too many atoms bound to ',nmat(iob) 105 105 stop 106 106 endif … … 108 108 endif 109 109 enddo ! ... branches of 'iob' 110 c____________________________ check for further '1-4' partners111 cconnected to branches 'l2i'110 ! ____________________________ check for further '1-4' partners 111 ! connected to branches 'l2i' 112 112 do i=1,n2i 113 113 ia=l2i(i) … … 116 116 do j=latms1(im),latms2(im) 117 117 if (ia.ne.j.and. 118 #quench(j,j,n2nd,mxh,l2nd1,l2nd2) ) then118 & quench(j,j,n2nd,mxh,l2nd1,l2nd2) ) then 119 119 n2i=n2i+1 120 120 if (n2i.gt.mx2) then 121 121 write (*,'(a,i3,a)') ' mklist> Molecule # ' 122 #,nml,': too many atoms in list L2I'122 & ,nml,': too many atoms in list L2I' 123 123 stop 124 124 endif … … 129 129 enddo 130 130 131 c____ If 'iow(iob)' exists and in 2ND list: into GENERAL list of 1-4 partners131 ! ____ If 'iow(iob)' exists and in 2ND list: into GENERAL list of 1-4 partners 132 132 ioiob=iowat(iob) ! existence of iow( iow(base) ) 133 133 if (ioiob.gt.0) then … … 136 136 if (n2i.gt.mx2) then 137 137 write (*,'(a,i3,2a)') ' mklist> Molecule # ' 138 #,nml,': too many atoms bound to ',nmat(iob)138 & ,nml,': too many atoms bound to ',nmat(iob) 139 139 stop 140 140 endif … … 150 150 endif 151 151 152 c______ Atoms bound to 'ib' & in 2ND list(=are NOT in m.s of 'iv'):153 cexclude from 2ND list & put in list 'l1i'152 ! ______ Atoms bound to 'ib' & in 2ND list(=are NOT in m.s of 'iv'): 153 ! exclude from 2ND list & put in list 'l1i' 154 154 n1i=0 155 155 do i=1,nbdat(ib) 156 156 ibd=ibdat(i,ib) 157 157 if (iowat(ibd).eq.ib.and. 158 #quench(ibd,ibd,n2nd,mxh,l2nd1,l2nd2) ) then158 & quench(ibd,ibd,n2nd,mxh,l2nd1,l2nd2) ) then 159 159 n1i=n1i+1 160 160 if (n1i.gt.mxbd) then 161 161 write (*,'(a,i3,2a)') ' mklist> Molecule # ',nml, 162 #': too many atoms bound to ',nmat(ib)162 & ': too many atoms bound to ',nmat(ib) 163 163 stop 164 164 endif 165 165 l1i(n1i)=ibd 166 c_______ add atoms branching from 'l1i'-atoms to GENERAL list 1-4 partners166 ! _______ add atoms branching from 'l1i'-atoms to GENERAL list 1-4 partners 167 167 do j=1,nbdat(ibd) 168 168 jbd=ibdat(j,ibd) 169 169 if (iowat(jbd).eq.ibd.and. 170 #quench(jbd,jbd,n2nd,mxh,l2nd1,l2nd2) ) then170 & quench(jbd,jbd,n2nd,mxh,l2nd1,l2nd2) ) then 171 171 n2i=n2i+1 172 172 if (n2i.gt.mx2) then 173 173 write (*,'(a,i3,2a)') ' mklist> Molecule # ',nml, 174 #': too many atoms bound to branches of ',nmat(ib)174 & ': too many atoms bound to branches of ',nmat(ib) 175 175 stop 176 176 endif … … 180 180 endif 181 181 enddo 182 c_____________________________ check for further '1-4' partners183 cbelonging to moving set of base 'ib'182 ! _____________________________ check for further '1-4' partners 183 ! belonging to moving set of base 'ib' 184 184 im=ixmsat(ib) 185 185 if (im.gt.0) then … … 189 189 if (n2i.gt.mx2) then 190 190 write (*,'(a,i3,a)') ' mklist> Molecule # ',nml, 191 #': too many atoms n list L2I '191 & ': too many atoms n list L2I ' 192 192 stop 193 193 endif … … 199 199 do is=i1s,i2s 200 200 do i=latms1(is),latms2(is) ! ============= atoms in m.s of 'iv' 201 c________________________________________ Current 2ND list -> VdW-interact.201 ! ________________________________________ Current 2ND list -> VdW-interact. 202 202 if ((nvw+n2nd).gt.mxvw) then 203 203 write (*,'(a,i4,a,i5)') ' mklist> Molecule # ',nml, 204 #': Number of vdw-domains > ',mxvw204 & ': Number of vdw-domains > ',mxvw 205 205 stop 206 206 endif … … 213 213 lvwat2(nvw)=l2nd2(j) 214 214 enddo ! ... vdW-domains 215 c_________________________________________ General list of 1-4 partners215 ! _________________________________________ General list of 1-4 partners 216 216 if ((n14+n2i).gt.mx14) goto 1 217 217 i14at1(i)=n14+1 … … 221 221 l14at(n14)=l2i(j) 222 222 enddo 223 c__________________________________ Special cases of 1-4 interactions224 c(list l1i, atoms iob,ib)223 ! __________________________________ Special cases of 1-4 interactions 224 ! (list l1i, atoms iob,ib) 225 225 iow=iowat(i) 226 226 if (iow.ne.ib) then … … 253 253 nvwml(nml)=nvw-ivwml1(nml)+1 254 254 n14ml(nml)=n14-i14ml1(nml)+1 255 c_________________________________ some cleaning up255 ! _________________________________ some cleaning up 256 256 do i=ifiat,ilaat 257 257 if (ivwat1(i).le.0) then … … 265 265 enddo 266 266 267 c____________________________________________ Summary268 cdo i=ifiat,ilaat269 cwrite (*,'(3a,i5,a)') ' ######## atom ',nmat(i),'(',i,')'270 civ1=ivwat1(i)271 civ2=ivwat2(i)272 cif (iv1.le.iv2) then273 cwrite(*,'(a)') ' ---> vdW :'274 cdo j=iv1,iv2275 cwrite (*,'(i5,a,i5)') lvwat1(j),'-',lvwat2(j)276 cenddo277 cendif278 ci41=i14at1(i)279 ci42=i14at2(i)280 cif (i41.le.i42) then281 cwrite(*,'(a)') ' ---> 1-4 :'282 cwrite(*,'(10i5)') (l14at(j),j=i41,i42)283 cendif284 cenddo267 ! ____________________________________________ Summary 268 ! do i=ifiat,ilaat 269 ! write (*,'(3a,i5,a)') ' ######## atom ',nmat(i),'(',i,')' 270 ! iv1=ivwat1(i) 271 ! iv2=ivwat2(i) 272 ! if (iv1.le.iv2) then 273 ! write(*,'(a)') ' ---> vdW :' 274 ! do j=iv1,iv2 275 ! write (*,'(i5,a,i5)') lvwat1(j),'-',lvwat2(j) 276 ! enddo 277 ! endif 278 ! i41=i14at1(i) 279 ! i42=i14at2(i) 280 ! if (i41.le.i42) then 281 ! write(*,'(a)') ' ---> 1-4 :' 282 ! write(*,'(10i5)') (l14at(j),j=i41,i42) 283 ! endif 284 ! enddo 285 285 286 286 return 287 287 288 288 1 write (*,'(a,i4,a,i5)') ' mklist> Molecule # ',nml, 289 #': Number of 1-4 interactions > ',mx14289 & ': Number of 1-4 interactions > ',mx14 290 290 stop 291 291 end 292 c*********************************************292 ! ********************************************* 293 293 logical function quench(i1,i2,n,mx,l1,l2) 294 294 295 c....................................................296 cPURPOSE: Correct size/number (n) of index ranges297 cgiven by lists 'l1' & 'l2' in order to298 cEXCLUDE overlaps with range 'i1-i2'299 c 300 cquench = true, if any overlap was obtained301 c 302 cCALLS: none303 c 304 c....................................................295 ! .................................................... 296 ! PURPOSE: Correct size/number (n) of index ranges 297 ! given by lists 'l1' & 'l2' in order to 298 ! EXCLUDE overlaps with range 'i1-i2' 299 ! 300 ! quench = true, if any overlap was obtained 301 ! 302 ! CALLS: none 303 ! 304 ! .................................................... 305 305 306 306 implicit integer*4 (i-n)
Note:
See TracChangeset
for help on using the changeset viewer.