--- mdread.f 2006-04-03 16:35:55.000000000 -0700 +++ mdread.f 2006-06-25 16:42:14.000000000 -0700 @@ -2009,24 +2025,24 @@ x(l60),x(lcrdr),konst,dotgtmd,belly,idecomp,5,.true.) end if - if( ibelly > 0 .and. igb > 0 ) then - - ! ---here, the only allowable belly has just the first - ! NATBEL atoms in the moving part. Check to see that this - ! requirement is satisfied: - - do i=natbel+1,natom - if( ix(ibellygp+i-1) /= 0 ) then - write(6,*) 'When igb>0, the moving part must be at the' - write(6,*) ' start of the molecule. This does not seem' - write(6,*) ' to be the case here.' - write(6,*) 'natbel,i,igroup(i) = ' & - ,natbel,i,ix(ibellygp+i-1) - call mexit(6,1) - end if - end do - end if - +! if( ibelly > 0 .and. igb > 0 ) then +! +! ! ---here, the only allowable belly has just the first +! ! NATBEL atoms in the moving part. Check to see that this +! ! requirement is satisfied: +! +! do i=natbel+1,natom +! if( ix(ibellygp+i-1) /= 0 ) then +! write(6,*) 'When igb>0, the moving part must be at the' +! write(6,*) ' start of the molecule. This does not seem' +! write(6,*) ' to be the case here.' +! write(6,*) 'natbel,i,igroup(i) = ' & +! ,natbel,i,ix(ibellygp+i-1) +! call mexit(6,1) +! end if +! end do +! end if + write (6,'(''| WARNING: This version of AMBER has been customized by Ross Walker and Mike Crowley. It is unsupported and you use it at your own risk'')') ! ----- CALCULATE THE SQUARE OF THE BOND PARAMETERS FOR SHAKE ! THE PARAMETERS ARE PUT SEQUENTIALLY IN THE ARRAY CONP ----- --- egb.f 2006-04-03 16:35:54.000000000 -0700 +++ egb.f 2006-06-25 15:26:19.000000000 -0700 @@ -104,7 +104,7 @@ !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ !+ handles generalized Born functionality, plus reg. nonbon, plus surface area subroutine egb(x,f,rborn,fs,reff,onereff,charge,iac,ico,numex, & - natex,dcharge,cut,ntypes,natom,natbel, & + natex,dcharge,cut,ntypes,natom,natbel,gbbellymask, & epol,eelt,evdw,esurf,dvdl,vdwrad,ineighbor,p1,p2,p3,p4, & rbmax,rbmin,rbave,rbfluct,ncopy ) @@ -238,6 +238,7 @@ integer iac,ico,numex,natex,ntypes,natom,natbel,ncopy integer i,j,k,kk1,maxi,num_j_vals,jjj,count2_fin,num_k_vals, & iexcl,iaci,jexcl,jexcl_last,jjv,ic,kk + integer gbbellymask(natom) integer j3 integer loop_count #ifdef MPI @@ -425,7 +426,7 @@ #endif maxi = natom - if(natbel > 0) maxi = natbel +! if(natbel > 0) maxi = natbel !-------------------------------------------------------------------------- ! @@ -452,9 +453,6 @@ nnbips = 0 call timer_start(TIME_GBFRC) - - ! Note: this code assumes that the belly atoms are the first natbel - ! atoms...this is checked in mdread. #ifdef MPI do i=mpistart,maxi,numtasks @@ -462,7 +460,19 @@ do i=1,maxi #endif - + !If belly skip + if (natbel > 0) then + if (gbbellymask(i) == 0) then +#ifdef MPI + do k=i,(min(i+numtasks-1,natom)) + iexcl = iexcl + numex(k) + end do +#else + iexcl = iexcl + numex(i) +#endif + cycle + end if + end if #ifdef PIMD lestmp = nlesty*(lestyp(i)-1) #endif @@ -925,7 +935,6 @@ !we can use the cached values. rinv = vectmp5(k) !1/rij r2inv = rinv*rinv - if( doeel ) then #ifdef LES eel = intdieli*qiqj*rinv*lesscalefac(k) @@ -1143,6 +1152,10 @@ #else do i=1,maxi #endif + !If belly skip + if (natbel > 0) then + if (gbbellymask(i) == 0) cycle + end if f_xi = zero f_yi = zero @@ -1731,6 +1744,10 @@ #else do j=1,maxi !1 to natom #endif + !If belly skip + if (natbel > 0) then + if (gbbellymask(i) == 0) cycle + end if !Do all atoms that are not excluded and !are within the cutoff for this i. Skip other !MM interactions that are less than i to avoid double --- force.f 2006-04-03 16:35:55.000000000 -0700 +++ force.f 2006-06-24 14:21:20.000000000 -0700 @@ -754,7 +754,7 @@ call timer_start(TIME_EGB) call egb( x,f,rborn,fs,reff,onereff,xx(l15),ix(i04),ix(i06), & ix(i08),ix(i10),xx(l190), & - cut,ntypes,natom,natbel,epol,eelt,evdw, & + cut,ntypes,natom,natbel,ix(ibellygp),epol,eelt,evdw, & esurf,dvdl,xx(l165),ix(i82),xx(l170),xx(l175),xx(l180), & xx(l185), xx(l186),xx(l187),xx(l188),xx(l189),ncopy )