Unverified Commit 33293fd9 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

Merge branch 'master' into progguide

parents 2735fc09 2775b937
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -75,9 +75,9 @@ of 3 terms

where :math:`F^C` is a conservative force, :math:`F^D` is a dissipative
force, and :math:`F^R` is a random force.  :math:`r_{ij}` is a unit
vector in the direction :math:`r_i - r_j`, :math:`V_{ij} is the vector
vector in the direction :math:`r_i - r_j`, :math:`v_{ij}` is the vector
difference in velocities of the two atoms :math:`= \vec{v}_i -
\vec{v}_j, :math:`\alpha` is a Gaussian random number with zero mean and
\vec{v}_j`, :math:`\alpha` is a Gaussian random number with zero mean and
unit variance, dt is the timestep size, and w(r) is a weighting factor
that varies between 0 and 1.  :math:`r_c` is the cutoff.  :math:`\sigma`
is set equal to :math:`\sqrt{2 k_B T \gamma}`, where :math:`k_B` is the
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ PairBuckCoulLongCS::PairBuckCoulLongCS(LAMMPS *lmp) : PairBuckCoulLong(lmp)
{
  ewaldflag = pppmflag = 1;
  writedata = 1;
  single_enable = 0;
  ftable = NULL;
}

+14 −21
Original line number Diff line number Diff line
@@ -232,9 +232,7 @@ void PairLJLongDipoleLong::init_style()
  if (!atom->q_flag && (ewald_order&(1<<1)))
    error->all(FLERR,
        "Invoking coulombic in pair style lj/long/dipole/long requires atom attribute q");
  if (!atom->mu && (ewald_order&(1<<3)))
    error->all(FLERR,"Pair lj/long/dipole/long requires atom attributes mu, torque");
  if (!atom->torque && (ewald_order&(1<<3)))
  if (!atom->mu_flag || !atom->torque_flag)
    error->all(FLERR,"Pair lj/long/dipole/long requires atom attributes mu, torque");

  neighbor->request(this,instance_me);
@@ -527,22 +525,19 @@ void PairLJLongDipoleLong::compute(int eflag, int vflag)
            force_lj =
              (rn*=rn)*lj1i[typej]-g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq;
            if (eflag) evdwl = rn*lj3i[typej]-g6*((a2+1.0)*a2+0.5)*x2;
          }
          else {                                        // special case
          } else {                                        // special case
            double f = special_lj[ni], t = rn*(1.0-f);
            force_lj = f*(rn *= rn)*lj1i[typej]-
              g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq+t*lj2i[typej];
            if (eflag) evdwl =
                         f*rn*lj3i[typej]-g6*((a2+1.0)*a2+0.5)*x2+t*lj4i[typej];
          }
        }
        else {                                          // cut lj
        } else {                                          // cut lj
          double rn = r2inv*r2inv*r2inv;
          if (ni < 0) {
            force_lj = rn*(rn*lj1i[typej]-lj2i[typej]);
            if (eflag) evdwl = rn*(rn*lj3i[typej]-lj4i[typej])-offseti[typej];
          }
          else {                                        // special case
          } else {                                        // special case
            double f = special_lj[ni];
            force_lj = f*rn*(rn*lj1i[typej]-lj2i[typej]);
            if (eflag) evdwl = f*(
@@ -550,8 +545,7 @@ void PairLJLongDipoleLong::compute(int eflag, int vflag)
          }
        }
        force_lj *= r2inv;
      }
      else force_lj = evdwl = 0.0;
      } else force_lj = evdwl = 0.0;

      fpair = force_coul+force_lj;                      // force
      if (newton_pair || j < nlocal) {
@@ -566,8 +560,7 @@ void PairLJLongDipoleLong::compute(int eflag, int vflag)
        tqj[0] += muj[1]*tj[2]-muj[2]*tj[1];
        tqj[1] += muj[2]*tj[0]-muj[0]*tj[2];
        tqj[2] += muj[0]*tj[1]-muj[1]*tj[0];
      }
      else {
      } else {
        fi[0] += fx = d[0]*fpair+force_d[0];            // force
        fi[1] += fy = d[1]*fpair+force_d[1];
        fi[2] += fz = d[2]*fpair+force_d[2];
+3 −5
Original line number Diff line number Diff line
@@ -995,8 +995,7 @@ double PairBuckLongCoulLong::single(int i, int j, int itype, int jtype,
      f = s*(1.0-factor_coul)/r; s *= g_ewald*exp(-x*x);
      force_coul = (t *= ((((t*A5+A4)*t+A3)*t+A2)*t+A1)*s/x)+EWALD_F*s-f;
      eng += t-f;
    }
    else {                                                // table real space
    } else {                                                // table real space
      union_int_float_t t;
      t.f = rsq;
      const int k = (t.i & ncoulmask) >> ncoulshiftbits;
@@ -1014,11 +1013,10 @@ double PairBuckLongCoulLong::single(int i, int j, int itype, int jtype,
      double x2 = g2*rsq, a2 = 1.0/x2, t = r6inv*(1.0-factor_buck);
      x2 = a2*exp(-x2)*buck_c[itype][jtype];
      force_buck = buck1[itype][jtype]*r*expr-
               g8*(((6.0*a2+6.0)*a2+3.0)*a2+a2)*x2*rsq+t*buck2[itype][jtype];
               g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq+t*buck2[itype][jtype];
      eng += buck_a[itype][jtype]*expr-
        g6*((a2+1.0)*a2+0.5)*x2+t*buck_c[itype][jtype];
    }
    else {                                                // cut
    } else {                                                // cut
      force_buck =
        buck1[itype][jtype]*r*expr-factor_buck*buck_c[itype][jtype]*r6inv;
      eng += buck_a[itype][jtype]*expr-
+0 −1
Original line number Diff line number Diff line
@@ -322,7 +322,6 @@ void PPPMTIP4P::fieldforce_ad()
        }
      }
    }

    ekx *= hx_inv;
    eky *= hy_inv;
    ekz *= hz_inv;
Loading