LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] A question about AIREBO potential
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] A question about AIREBO potential


From: Huang <nongyanhuang@...223...>
Date: Tue, 8 Aug 2017 23:17:44 +0800 (CST)

Hi all,
I'm reading the code of pair_airebo.cpp recently and I can not understand the following codes:
"// compute LJ forces and energy
      sigwid = 0.84;
      sigcut = 3.0;
      sigmin = sigcut - sigwid;

      rljmin = sigma[itype][jtype];
      rljmax = sigcut * rljmin;
      rljmin = sigmin * rljmin;

      if (rij > rljmax) {
        slw = 0.0;
        dslw = 0.0;
      } else if (rij > rljmin) {
        drij = rij - rljmin;
        swidth = rljmax - rljmin;
        tee = drij / swidth;
        tee2 = tee*tee;
        slw = 1.0 - tee2 * (3.0 - 2.0 * tee);
        dslw = -6.0 * tee * (1.0 - tee) / swidth;
      } else {
        slw = 1.0;
        dslw = 0.0;
      }
"
I know slw is the switching function to turn off the LJ potential in AIREBO potential. What I don't understand is that this switching function is used again in the following part:
"// VLJ now becomes vdw * slw, derivaties, etc.
        VLJ = vdw * slw;
        dVLJ = dvdw * slw + vdw * dslw;

        Str = Sp2(rij,rcLJmin[itype][jtype],rcLJmax[itype][jtype],dStr);
        VA = Str*cij*VLJ;
        if (Str > 0.0) {
          scale = rcmin[itype][jtype] / rij;
          delscale[0] = scale * delij[0];
          delscale[1] = scale * delij[1];
          delscale[2] = scale * delij[2];
          Stb = bondorderLJ(i,j,delscale,rcmin[itype][jtype],VA,
                          delij,rij,f,vflag_atom);
        } else Stb = 0.0;

        fpair = -(dStr * (Stb*cij*VLJ - cij*VLJ) +
                dVLJ * (Str*Stb*cij + cij - Str*cij)) / rij;"

In the above codes, Sp2 is the same function as slw. It seems that the codes use this switching function twice, what's the reason?
The only difference between two functions is the range. slw is from (3-0.84)*sigma~3*sigam, while the range for Sp2 is from rcLJmin to rcLJmax. Where do the values 0.84 and 3 come from? I didn't find any information from the paper of Stuart.
Does anyone know the reason? Thank you very much!

Best,
Huang