diff -Naur lammps-2Oct08/doc/fix_wall_lj126.html lammps-3Oct08/doc/fix_wall_lj126.html --- lammps-2Oct08/doc/fix_wall_lj126.html 2008-01-02 12:25:15.000000000 -0700 +++ lammps-3Oct08/doc/fix_wall_lj126.html 2008-10-01 10:07:42.000000000 -0600 @@ -29,9 +29,9 @@

Description:

-

Bound the simulation domain with a Lennard-Jones wall that encloses -the atoms. The energy E of a wall-particle interactions is given by -the 12-6 potential +

Bound the simulation domain on one of its faces with a Lennard-Jones +wall that interacts with the atoms in the group. The energy E of +wall-particle interactions is given by the 12-6 potential

diff -Naur lammps-2Oct08/doc/fix_wall_lj93.html lammps-3Oct08/doc/fix_wall_lj93.html --- lammps-2Oct08/doc/fix_wall_lj93.html 2008-01-02 12:25:15.000000000 -0700 +++ lammps-3Oct08/doc/fix_wall_lj93.html 2008-10-01 10:07:42.000000000 -0600 @@ -29,9 +29,9 @@

Description:

-

Bound the simulation domain with a Lennard-Jones wall that encloses -the atoms. The energy E of a wall-particle interactions is given by -the 9-3 potential +

Bound the simulation domain on one of its faces with a Lennard-Jones +wall that interacts with the atoms in the group. The energy E of +wall-particle interactions is given by the 9-3 potential

diff -Naur lammps-2Oct08/lib/meam/meam_dens_final.F lammps-3Oct08/lib/meam/meam_dens_final.F --- lammps-2Oct08/lib/meam/meam_dens_final.F 2008-01-17 10:04:27.000000000 -0700 +++ lammps-3Oct08/lib/meam/meam_dens_final.F 2008-10-01 10:13:22.000000000 -0600 @@ -54,86 +54,88 @@ do i = 1,nlocal elti = fmap(type(i)) - rho1(i) = 0.d0 - rho2(i) = -1.d0/3.d0*Arho2b(i)*Arho2b(i) - rho3(i) = 0.d0 - do m = 1,3 - rho1(i) = rho1(i) + Arho1(m,i)*Arho1(m,i) - rho3(i) = rho3(i) - 3.d0/5.d0*Arho3b(m,i)*Arho3b(m,i) - enddo - do m = 1,6 - rho2(i) = rho2(i) + v2D(m)*Arho2(m,i)*Arho2(m,i) - enddo - do m = 1,10 - rho3(i) = rho3(i) + v3D(m)*Arho3(m,i)*Arho3(m,i) - enddo - - if( rho0(i) .gt. 0.0 ) then - t_ave(1,i) = t_ave(1,i)/rho0(i) - t_ave(2,i) = t_ave(2,i)/rho0(i) - t_ave(3,i) = t_ave(3,i)/rho0(i) - endif - - Gamma(i) = t_ave(1,i)*rho1(i) - $ + t_ave(2,i)*rho2(i) + t_ave(3,i)*rho3(i) - - if( rho0(i) .gt. 0.0 ) then - Gamma(i) = Gamma(i)/(rho0(i)*rho0(i)) - end if - - call G_gam(Gamma(i),ibar_meam(elti),gsmooth_factor,G,errorflag) - if (errorflag.ne.0) return - if (ibar_meam(elti).le.0) then - Gbar = 1.d0 - else - call get_shpfcn(shp,lattce_meam(elti,elti)) - gam = (t_ave(1,i)*shp(1)+t_ave(2,i)*shp(2) - $ +t_ave(3,i)*shp(3))/(Z_meam(elti)**2) - call G_gam(gam,ibar_meam(elti),gsmooth_factor, - $ Gbar,errorflag) - endif - rho(i) = rho0(i) * G - rhob = rho(i)/(rho0_meam(elti)*Z_meam(elti)*Gbar) - - Z = Z_meam(elti) - call dG_gam(Gamma(i),ibar_meam(elti),gsmooth_factor,G,dG) - if (ibar_meam(elti).le.0) then - Gbar = 1.d0 - dGbar = 0.d0 - else - call get_shpfcn(shpi,lattce_meam(elti,elti)) - gam = (t_ave(1,i)*shpi(1)+t_ave(2,i)*shpi(2) - $ +t_ave(3,i)*shpi(3))/(Z*Z) - call dG_gam(gam,ibar_meam(elti),gsmooth_factor, - $ Gbar,dGbar) - endif - denom = 1.d0/(rho0_meam(elti)*Z*Gbar) - dGamma1(i) = (G - 2*dG*Gamma(i))*denom - - if( rho0(i) .ne. 0.d0 ) then - dGamma2(i) = (dG/rho0(i))*denom - else - dGamma2(i) = 0.d0 - end if - - dGamma3(i) = rho0(i)*G*dGbar/(Gbar*Z*Z)*denom - - B = A_meam(elti)*Ec_meam(elti,elti) - - if( rhob .ne. 0.d0 ) then - fp(i) = B*(log(rhob)+1.d0) - if (eflag_either.ne.0) then - if (eflag_global.ne.0) then - eng_vdwl = eng_vdwl + B*rhob*log(rhob) - endif - if (eflag_atom.ne.0) then - eatom(i) = eatom(i) + B*rhob*log(rhob) + if (elti.gt.0) then + rho1(i) = 0.d0 + rho2(i) = -1.d0/3.d0*Arho2b(i)*Arho2b(i) + rho3(i) = 0.d0 + do m = 1,3 + rho1(i) = rho1(i) + Arho1(m,i)*Arho1(m,i) + rho3(i) = rho3(i) - 3.d0/5.d0*Arho3b(m,i)*Arho3b(m,i) + enddo + do m = 1,6 + rho2(i) = rho2(i) + v2D(m)*Arho2(m,i)*Arho2(m,i) + enddo + do m = 1,10 + rho3(i) = rho3(i) + v3D(m)*Arho3(m,i)*Arho3(m,i) + enddo + + if( rho0(i) .gt. 0.0 ) then + t_ave(1,i) = t_ave(1,i)/rho0(i) + t_ave(2,i) = t_ave(2,i)/rho0(i) + t_ave(3,i) = t_ave(3,i)/rho0(i) + endif + + Gamma(i) = t_ave(1,i)*rho1(i) + $ + t_ave(2,i)*rho2(i) + t_ave(3,i)*rho3(i) + + if( rho0(i) .gt. 0.0 ) then + Gamma(i) = Gamma(i)/(rho0(i)*rho0(i)) + end if + + call G_gam(Gamma(i),ibar_meam(elti), + $ gsmooth_factor,G,errorflag) + if (errorflag.ne.0) return + if (ibar_meam(elti).le.0) then + Gbar = 1.d0 + else + call get_shpfcn(shp,lattce_meam(elti,elti)) + gam = (t_ave(1,i)*shp(1)+t_ave(2,i)*shp(2) + $ +t_ave(3,i)*shp(3))/(Z_meam(elti)**2) + call G_gam(gam,ibar_meam(elti),gsmooth_factor, + $ Gbar,errorflag) + endif + rho(i) = rho0(i) * G + rhob = rho(i)/(rho0_meam(elti)*Z_meam(elti)*Gbar) + + Z = Z_meam(elti) + call dG_gam(Gamma(i),ibar_meam(elti),gsmooth_factor,G,dG) + if (ibar_meam(elti).le.0) then + Gbar = 1.d0 + dGbar = 0.d0 + else + call get_shpfcn(shpi,lattce_meam(elti,elti)) + gam = (t_ave(1,i)*shpi(1)+t_ave(2,i)*shpi(2) + $ +t_ave(3,i)*shpi(3))/(Z*Z) + call dG_gam(gam,ibar_meam(elti),gsmooth_factor, + $ Gbar,dGbar) + endif + denom = 1.d0/(rho0_meam(elti)*Z*Gbar) + dGamma1(i) = (G - 2*dG*Gamma(i))*denom + + if( rho0(i) .ne. 0.d0 ) then + dGamma2(i) = (dG/rho0(i))*denom + else + dGamma2(i) = 0.d0 + end if + + dGamma3(i) = rho0(i)*G*dGbar/(Gbar*Z*Z)*denom + + B = A_meam(elti)*Ec_meam(elti,elti) + + if( rhob .ne. 0.d0 ) then + fp(i) = B*(log(rhob)+1.d0) + if (eflag_either.ne.0) then + if (eflag_global.ne.0) then + eng_vdwl = eng_vdwl + B*rhob*log(rhob) + endif + if (eflag_atom.ne.0) then + eatom(i) = eatom(i) + B*rhob*log(rhob) + endif endif + else + fp(i) = B endif - else - fp(i) = B endif - enddo return diff -Naur lammps-2Oct08/lib/meam/meam_dens_init.F lammps-3Oct08/lib/meam/meam_dens_init.F --- lammps-2Oct08/lib/meam/meam_dens_init.F 2008-01-17 10:04:27.000000000 -0700 +++ lammps-3Oct08/lib/meam/meam_dens_init.F 2008-10-01 10:13:22.000000000 -0600 @@ -94,88 +94,97 @@ drinv = 1.d0/delr_meam elti = fmap(type(i)) - xitmp = x(1,i) - yitmp = x(2,i) - zitmp = x(3,i) + if (elti.gt.0) then - do jn = 1,numneigh - j = firstneigh(jn) + xitmp = x(1,i) + yitmp = x(2,i) + zitmp = x(3,i) + + do jn = 1,numneigh + j = firstneigh(jn) + eltj = fmap(type(j)) + if (eltj.gt.0) then + c First compute screening function itself, sij - xjtmp = x(1,j) - yjtmp = x(2,j) - zjtmp = x(3,j) - delxij = xjtmp - xitmp - delyij = yjtmp - yitmp - delzij = zjtmp - zitmp - rij2 = delxij*delxij + delyij*delyij + delzij*delzij - rij = sqrt(rij2) - if (rij.gt.rc_meam) then - fcij = 0.0 - dfcij = 0.d0 - sij = 0.d0 - else - rnorm = (rc_meam-rij)*drinv - call screen(i, j, nmax, x, rij2, sij, - $ numneigh_full, firstneigh_full, ntype, type, fmap) - call dfcut(rnorm,fc,dfc) - fcij = fc - dfcij = dfc*drinv - endif - + xjtmp = x(1,j) + yjtmp = x(2,j) + zjtmp = x(3,j) + delxij = xjtmp - xitmp + delyij = yjtmp - yitmp + delzij = zjtmp - zitmp + rij2 = delxij*delxij + delyij*delyij + delzij*delzij + rij = sqrt(rij2) + if (rij.gt.rc_meam) then + fcij = 0.0 + dfcij = 0.d0 + sij = 0.d0 + else + rnorm = (rc_meam-rij)*drinv + call screen(i, j, nmax, x, rij2, sij, + $ numneigh_full, firstneigh_full, ntype, type, fmap) + call dfcut(rnorm,fc,dfc) + fcij = fc + dfcij = dfc*drinv + endif + c Now compute derivatives - dscrfcn(jn) = 0.d0 - sfcij = sij*fcij - if (sfcij.eq.0.d0.or.sfcij.eq.1.d0) goto 100 - eltj = fmap(type(j)) - rbound = ebound_meam(elti,eltj) * rij2 - do kn = 1,numneigh_full - k = firstneigh_full(kn) - if (k.eq.j) goto 10 - eltk = fmap(type(k)) - xktmp = x(1,k) - yktmp = x(2,k) - zktmp = x(3,k) - delxjk = xktmp - xjtmp - delyjk = yktmp - yjtmp - delzjk = zktmp - zjtmp - rjk2 = delxjk*delxjk + delyjk*delyjk + delzjk*delzjk - if (rjk2.gt.rbound) goto 10 - delxik = xktmp - xitmp - delyik = yktmp - yitmp - delzik = zktmp - zitmp - rik2 = delxik*delxik + delyik*delyik + delzik*delzik - if (rik2.gt.rbound) goto 10 - xik = rik2/rij2 - xjk = rjk2/rij2 - a = 1 - (xik-xjk)*(xik-xjk) - if (a.eq.0.d0) goto 10 - cikj = (2.d0*(xik+xjk) + a - 2.d0)/a - Cmax = Cmax_meam(elti,eltj,eltk) - Cmin = Cmin_meam(elti,eltj,eltk) - if (cikj.ge.Cmax.or.cikj.lt.0.d0) then - goto 10 + dscrfcn(jn) = 0.d0 + sfcij = sij*fcij + if (sfcij.eq.0.d0.or.sfcij.eq.1.d0) goto 100 + rbound = ebound_meam(elti,eltj) * rij2 + do kn = 1,numneigh_full + k = firstneigh_full(kn) + if (k.eq.j) goto 10 + eltk = fmap(type(k)) + if (eltk.eq.0) goto 10 + xktmp = x(1,k) + yktmp = x(2,k) + zktmp = x(3,k) + delxjk = xktmp - xjtmp + delyjk = yktmp - yjtmp + delzjk = zktmp - zjtmp + rjk2 = delxjk*delxjk + delyjk*delyjk + delzjk*delzjk + if (rjk2.gt.rbound) goto 10 + delxik = xktmp - xitmp + delyik = yktmp - yitmp + delzik = zktmp - zitmp + rik2 = delxik*delxik + delyik*delyik + delzik*delzik + if (rik2.gt.rbound) goto 10 + xik = rik2/rij2 + xjk = rjk2/rij2 + a = 1 - (xik-xjk)*(xik-xjk) + if (a.eq.0.d0) goto 10 + cikj = (2.d0*(xik+xjk) + a - 2.d0)/a + Cmax = Cmax_meam(elti,eltj,eltk) + Cmin = Cmin_meam(elti,eltj,eltk) + if (cikj.ge.Cmax.or.cikj.lt.0.d0) then + goto 10 c Note that we never have 0