********> bugfix.13 Author: Jim Caldwell Date: 5/8/95 Programs: gibbs Severity: moderate Problem: For polarization runs, there is no 1-4 polar energy ('epol') in the perturbed group. (This would only be clearly apparent when all interactions are 1-4's.) Fix: make the following change to giba.f: ------------------------------------------------------------------------------ *** OLD giba.f --- NEW giba.f *************** *** 183,194 C For polarization runs, read in additional information and set the C IM array. Not done/needed for standard runs. C ! IF (IPOL.GT.0) THEN ! WRITE(6,'(T2,''READING POLARIZABILITIES'')') ! READ(NF,9128)(X(L17+I-1), I=1,NATOM) ! WRITE(6,'(T2,''POLS:'',3F10.5)') ! . X(L17),X(L17+1),X(L17+2) ! READ(NF,9128)(X(L17+NATOM+I-1),I=1,NATOM) C C Set IM C --- 183,192 ----- C For polarization runs, read in additional information and set the C IM array. Not done/needed for standard runs. C ! if (ipol.gt.0) then ! write(6,'(t2,''reading polarizabilities'')') ! read(nf,9128)(x(l17+i-1), i=1,natom) ! read(nf,9128)(x(l17+natom+i-1) ,i=1,natom) C ip14 = 0 do i = 1,nphih *************** *** 190,225 . X(L17),X(L17+1),X(L17+2) READ(NF,9128)(X(L17+NATOM+I-1),I=1,NATOM) C ! C Set IM ! C ! IP14 = 0 ! DO 511 I = 1,NPHIH ! I1 = IX(I+i40-1)/3+1 ! I3 = IX(I+I44-1)/3+1 ! I4 = IX(I+i46-1)/3+1 ! IF (I4.GT.0 .AND. I3.GT.0) THEN ! IM(I1+M02-1) = IM(I1+M02-1) + 1 ! CALL ISTUFF(IM(I1+M02-1),I1,IM(M04),I4) ! IP14 = IP14+1 ! endif ! 511 CONTINUE ! DO 512 I = 1,NPHIA ! I1 = IX(I+I50-1)/3+1 ! I3 = IX(I+I54-1)/3+1 ! I4 = IX(I+I56-1)/3+1 ! IF (I4.GT.0 .AND. I3.GT.0) THEN ! IM(I1+M02-1) = IM(I1+M02-1) + 1 ! IF (IM(I1+M02-1).GT.22) THEN ! PRINT *,'TOO MANY DIHEDRALS ' ! CALL MEXIT(6,1) ! END IF ! CALL ISTUFF(IM(I1+M02-1),I1,IM(M04),I4) ! IP14 = IP14+1 ! END IF ! 512 CONTINUE ! WRITE(6,3377) IP14 ! 3377 FORMAT(T2,'%MINMD/POL-I-14Pairs, ',I4,' pairs for pol 1-4.'/) ! END IF C C End of polarization stuff. C --- 188,218 ----- read(nf,9128)(x(l17+i-1), i=1,natom) read(nf,9128)(x(l17+natom+i-1) ,i=1,natom) C ! ip14 = 0 ! do i = 1,nphih ! if(pn(ix(i+i48-1)).gt. 0) then ! i1 = ix(i+i40-1)/3+1 ! i4 = ix(i+i46-1)/3+1 ! im(i1+m02-1) = im(i1+m02-1) + 1 ! call istuff(im(i1+m02-1),i1,im(m04),i4) ! ip14 = ip14+1 ! endif ! enddo ! do i = 1,nphia+ndper ! if(pn(ix(i+i58-1)).gt. 0) then ! i1 = ix(i+i50-1)/3+1 ! i3 = ix(i+i54-1)/3+1 ! i4 = ix(i+i56-1)/3+1 ! if(i4.gt.0.and.i3.gt.0) then ! im(i1+m02-1) = im(i1+m02-1) + 1 ! call istuff(im(i1+m02-1),i1,im(m04),i4) ! ip14 = ip14+1 ! endif ! endif ! enddo ! write(6,3377)ip14 ! 3377 format(t2,'%MINMD/POL-I-14Pairs, ',i4,' pairs for pol 1-4.'/) ! endif C C End of polarization stuff. C ------------------------------------------------------------------------ Workaround: none --