Author: Dave Case Date: 08/20/03 Programs: sander Description: in thermodyanmic integration calculations with vdwmeth=1, the difference in long-range vdW correction betweent the lambda=0 and the lambda=1 state was not correctly included. This should have only a minor effect unless there is a big difference in the vdW parameters of the two states, as, e.g., in "disappearing" ligands. Fix: apply the following patch in amber7/src/sander ------------------------------------------------------------------------------ *** thermo_int.f 2002/01/31 23:20:30 7.13 --- thermo_int.f 2003/08/18 20:48:44 *************** *** 4,9 **** --- 4,10 ---- implicit none integer i,temp,ix(*) #include "memory.h" + #include "ew_localnb.h" c c ---swap pointers of old/new charges: c *************** *** 22,27 **** --- 23,34 ---- temp = I04 I04 = I84 I84 = temp + c + c ---swap pointers of old/new counts of van der Waals types: + c + temp = invdwcls + invdwcls = invdwcls2 + invdwcls2 = temp c c ---swap the actual parameters for the perturbed internals: c *** ew_direct.f 2002/07/10 03:10:27 7.91 --- ew_direct.f 2003/08/18 20:48:55 *************** *** 175,182 **** c ----- if(issetup .eq. 1) block c if ( issetup .eq. 0 ) then ! call ew_startup(numatoms,iblo,inb,X,IX, ! $ iac,ntypes,ix(ixtran),r_stack) nucgrd1_0=-1 nucgrd2_0=-1 nucgrd3_0=-1 --- 175,181 ---- c ----- if(issetup .eq. 1) block c if ( issetup .eq. 0 ) then ! call ew_startup(numatoms,iblo,inb,X,IX,ix(ixtran),r_stack) nucgrd1_0=-1 nucgrd2_0=-1 nucgrd3_0=-1 *** ew_setup.f 2003/07/31 17:34:24 7.115 --- ew_setup.f 2003/08/18 20:49:03 *************** *** 712,718 **** $ lsavcrd, $ inumatg,iindatg,iatmcell,iindoff,iimagptr,inghbptr, $ inghtran,imygrdlist,imy_grids, ! $ invdwcls,ntypes, $ ibckptr,inlogrid,inhigrid,inumimg, $ inummask,imaskptr,imask,iatmlist,ilist,iscratch, $ iiwa,iiwh,iimgind,inumvdw,inumhbnd, --- 712,718 ---- $ lsavcrd, $ inumatg,iindatg,iatmcell,iindoff,iimagptr,inghbptr, $ inghtran,imygrdlist,imy_grids, ! $ invdwcls,invdwcls2,ntypes, $ ibckptr,inlogrid,inhigrid,inumimg, $ inummask,imaskptr,imask,iatmlist,ilist,iscratch, $ iiwa,iiwh,iimgind,inumvdw,inumhbnd, *************** *** 741,747 **** c arrays and perform other initial chores... c subroutine ew_startup(numatoms,iblo,inb,X,IX, - $ iac,ntypes, $ xtran,stack) implicit none --- 741,746 ---- *************** *** 755,762 **** #include "sizes.h" #include "rstack.h" #include "def_time.h" ! integer numatoms,iblo(*),inb(*),iac(*),ntypes,l_tau _REAL_ X(*),stack(*) integer IX(*) _REAL_ tim1,tim2 --- 754,763 ---- #include "sizes.h" #include "rstack.h" #include "def_time.h" + #include "md.h" + #include "memory.h" ! integer numatoms,iblo(*),inb(*),l_tau _REAL_ X(*),stack(*) integer IX(*) _REAL_ tim1,tim2 *************** *** 781,787 **** call free_stack(l_tau) call chk_switch(cutoffnb,dxdr, $ X(leed_cub),X(leed_lin),eedtbdns,eedmeth,ee_type) ! call VDW_correct_setup(numatoms,iac,ntypes,IX(invdwcls)) call load_adj_mask(iblo,inb,numatoms, $ mxadjmsk,IX(imask1),IX(imask2),numadjst,verbose) call load_list_mask(iblo,inb,numatoms, --- 782,790 ---- call free_stack(l_tau) call chk_switch(cutoffnb,dxdr, $ X(leed_cub),X(leed_lin),eedtbdns,eedmeth,ee_type) ! call VDW_correct_setup(numatoms,ix(I04),ntypes,IX(invdwcls)) ! if( icfe.ne.0 ) ! $ call VDW_correct_setup(numatoms,ix(I84),ntypes,IX(invdwcls2)) call load_adj_mask(iblo,inb,numatoms, $ mxadjmsk,IX(imask1),IX(imask2),numadjst,verbose) call load_list_mask(iblo,inb,numatoms, *************** *** 1201,1207 **** $ lsavcrd, $ inumatg,iindatg,iatmcell,iindoff,iimagptr,inghbptr, $ inghtran,imygrdlist,imy_grids, ! $ invdwcls,ntypes, $ ibckptr,inlogrid,inhigrid,inumimg, $ inummask,imaskptr,imask,iatmlist,ilist,iscratch, $ iiwa,iiwh,iimgind,inumvdw,inumhbnd, --- 1204,1210 ---- $ lsavcrd, $ inumatg,iindatg,iatmcell,iindoff,iimagptr,inghbptr, $ inghtran,imygrdlist,imy_grids, ! $ invdwcls,invdwcls2,ntypes, $ ibckptr,inlogrid,inhigrid,inumimg, $ inummask,imaskptr,imask,iatmlist,ilist,iscratch, $ iiwa,iiwh,iimgind,inumvdw,inumhbnd, *************** *** 1224,1230 **** $ inghtran, $ imygrdlist, $ imy_grids, ! $ invdwcls,ntypes, $ ibckptr,inlogrid,inhigrid,inumimg, $ inummask,imaskptr,imask,iatmlist,ilist,iscratch, $ iiwa,iiwh,iimgind,inumvdw,inumhbnd, --- 1227,1233 ---- $ inghtran, $ imygrdlist, $ imy_grids, ! $ invdwcls,invdwcls2,ntypes, $ ibckptr,inlogrid,inhigrid,inumimg, $ inummask,imaskptr,imask,iatmlist,ilist,iscratch, $ iiwa,iiwh,iimgind,inumvdw,inumhbnd, *************** *** 1296,1301 **** --- 1299,1305 ---- call adj_mem_ptr(mem_ptr,iiwh,numatoms) call adj_mem_ptr(mem_ptr,iimgind,maximage) call adj_mem_ptr(mem_ptr,invdwcls,ntypes) + call adj_mem_ptr(mem_ptr,invdwcls2,ntypes) call adj_mem_ptr(mem_ptr,imy_grids,nucgmax) call adj_mem_ptr(mem_ptr,imygrdlist,numatoms) #ifdef ROWAT *** ew_localnb.h 2001/10/29 09:24:40 7.11 --- ew_localnb.h 2003/08/18 20:49:15 *************** *** 65,71 **** $ limgcrds,lfrction,lsavfrac,ldfrac,lsavcrd cccccccccccccccccccccccccccccccccccccccccccccccccc c INTEGER STORAGE ! #define BC_NBINTEG 32 integer $ inumatg, iindatg, iatmcell, iindoff, iimagptr, $ inghbptr,ibckptr, iucptr, inlogrid, inhigrid, --- 65,71 ---- $ limgcrds,lfrction,lsavfrac,ldfrac,lsavcrd cccccccccccccccccccccccccccccccccccccccccccccccccc c INTEGER STORAGE ! #define BC_NBINTEG 33 integer $ inumatg, iindatg, iatmcell, iindoff, iimagptr, $ inghbptr,ibckptr, iucptr, inlogrid, inhigrid, *************** *** 73,79 **** $ ilist, iscratch,iiwa, iiwh, iimgind, $ inumvdw, inumhbnd,iipack, iitran, iktran, $ ixtran, inghtran,imygrdflag,imygrdlist,imy_grids, ! $ invdwcls,irowat common/nb_integ/ $ inumatg, iindatg, iatmcell, iindoff, iimagptr, --- 73,79 ---- $ ilist, iscratch,iiwa, iiwh, iimgind, $ inumvdw, inumhbnd,iipack, iitran, iktran, $ ixtran, inghtran,imygrdflag,imygrdlist,imy_grids, ! $ invdwcls,irowat, invdwcls2 common/nb_integ/ $ inumatg, iindatg, iatmcell, iindoff, iimagptr, *************** *** 82,88 **** $ ilist, iscratch,iiwa, iiwh, iimgind, $ inumvdw, inumhbnd,iipack, iitran, iktran, $ ixtran, inghtran,imygrdflag,imygrdlist,imy_grids, ! $ invdwcls,irowat c cccccccccccccccccccccccccccccccccccccccccccccccccc #define BC_NB_GINDEX 2 --- 82,88 ---- $ ilist, iscratch,iiwa, iiwh, iimgind, $ inumvdw, inumhbnd,iipack, iitran, iktran, $ ixtran, inghtran,imygrdflag,imygrdlist,imy_grids, ! $ invdwcls,irowat, invdwcls2 c cccccccccccccccccccccccccccccccccccccccccccccccccc #define BC_NB_GINDEX 2 ------------------------------------------------------------------------------ Temporary workarounds: none