Commit a77878d0 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2134 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 799bf321
Loading
Loading
Loading
Loading
+79 −77
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ c Complete the calculation of density
      do i = 1,nlocal

        elti = fmap(type(i))
        if (elti.gt.0) then
          rho1(i) = 0.d0
          rho2(i) = -1.d0/3.d0*Arho2b(i)*Arho2b(i)
          rho3(i) = 0.d0
@@ -81,7 +82,8 @@ c Complete the calculation of density
            Gamma(i) = Gamma(i)/(rho0(i)*rho0(i))
          end if
          
        call G_gam(Gamma(i),ibar_meam(elti),gsmooth_factor,G,errorflag)
          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
@@ -133,7 +135,7 @@ c Complete the calculation of density
          else
            fp(i) = B
          endif
        
        endif
      enddo
      
      return
+83 −74
Original line number Diff line number Diff line
@@ -94,6 +94,8 @@ cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
      drinv = 1.d0/delr_meam
      elti = fmap(type(i))

      if (elti.gt.0) then

        xitmp = x(1,i)
        yitmp = x(2,i)
        zitmp = x(3,i)
@@ -101,6 +103,9 @@ cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
        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)
@@ -127,12 +132,12 @@ 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))
              if (eltk.eq.0) goto 10
              xktmp = x(1,k)
              yktmp = x(2,k)
              zktmp = x(3,k)
@@ -174,8 +179,12 @@ c Note that we never have 0<cikj<Cmin here, else sij=0 (rejected above)
            scrfcn(jn) = sij
            fcpair(jn) = fcij

          endif
          
        enddo
      
      endif

      return
      end
      
+352 −345
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ c
      dimension t_ave(3,nmax), f(3,nmax), vatom(6,nmax)

      integer i,j,jn,k,kn,kk,m,n,p,q
      integer nv2,nv3,elti,eltj,ind
      integer nv2,nv3,elti,eltj,eltk,ind
      real*8 xitmp,yitmp,zitmp,delij(3),delref(3),rij2,rij,rij3
      real*8 delik(3),deljk(3),v(6),fi(3),fj(3)
      real*8 Eu,astar,astarp,third,sixth
@@ -92,6 +92,8 @@ c
c     Compute forces atom i

      elti = fmap(type(i))
      
      if (elti.gt.0) then
        xitmp = x(1,i)
        yitmp = x(2,i)
        zitmp = x(3,i)
@@ -99,8 +101,10 @@ c Compute forces atom i
c     Treat each pair
        do jn = 1,numneigh
          
        if (scrfcn(jn).ne.0.d0) then
          j = firstneigh(jn)
          eltj = fmap(type(j))

          if (scrfcn(jn).ne.0.d0.and.eltj.gt.0) then
            
            sij = scrfcn(jn)*fcpair(jn)
            delij(1) = x(1,j) - xitmp
@@ -111,7 +115,6 @@ c Treat each pair
            if (rij2.lt.cutforcesq) then
              rij = sqrt(rij2)
              r = rij
            eltj = fmap(type(j))
              
c     Compute phi and phip
              ind = eltind(elti,eltj)
@@ -421,7 +424,8 @@ c Now compute forces on other atoms k due to change in sij
              if (sij.eq.0.d0.or.sij.eq.1.d0) goto 100
              do kn = 1,numneigh_full
                k = firstneigh_full(kn)
              if (k.ne.j) then
                eltk = fmap(type(k))
                if (k.ne.j.and.eltk.gt.0) then
                  call dsij(i,j,k,jn,nmax,numneigh,rij2,dsij1,dsij2,
     $                 ntype,type,fmap,x,scrfcn,fcpair)
                  if (dsij1.ne.0.d0.or.dsij2.ne.0.d0) then
@@ -487,5 +491,8 @@ c end of k loop
c     end of j loop
        enddo

c     else if elti=0, this is not a meam atom
      endif
      
      return
      end