diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt
index 5677d09a85..25319570a4 100644
--- a/doc/src/Manual.txt
+++ b/doc/src/Manual.txt
@@ -1,7 +1,7 @@
LAMMPS Users Manual
-
+
@@ -21,7 +21,7 @@
LAMMPS Documentation :c,h3
-20 Jan 2017 version :c,h4
+26 Jan 2017 version :c,h4
Version info: :h4
diff --git a/potentials/WL.meam b/potentials/WL.meam
new file mode 100644
index 0000000000..43eecb4223
--- /dev/null
+++ b/potentials/WL.meam
@@ -0,0 +1,13 @@
+# DATE: 2017-01-25 CONTRIBUTOR: Aidan Thompson, athomps@sandia.gov, CITATION: Lee, Baskes, Kim, Cho. Phys. Rev. B, 64, 184102 (2001)
+rc = 3.8
+delr = 0.1
+augt1 = 0
+erose_form = 2
+zbl(1,1) = 0
+nn2(1,1) = 1
+Ec(1,1) = 8.66
+re(1,1) = 2.74
+attrac(1,1) = 0
+repuls(1,1) = 0
+Cmin(1,1,1) = 0.49
+Cmax(1,1,1) = 2.8
diff --git a/src/KOKKOS/domain_kokkos.cpp b/src/KOKKOS/domain_kokkos.cpp
index 5c1f1a60b9..9742dc36b0 100644
--- a/src/KOKKOS/domain_kokkos.cpp
+++ b/src/KOKKOS/domain_kokkos.cpp
@@ -402,7 +402,6 @@ void DomainKokkos::pbc()
void DomainKokkos::remap_all()
{
atomKK->sync(Device,X_MASK | IMAGE_MASK);
- atomKK->modified(Device,X_MASK | IMAGE_MASK);
x = atomKK->k_x.view();
image = atomKK->k_image.view();
@@ -428,6 +427,8 @@ void DomainKokkos::remap_all()
LMPDeviceType::fence();
copymode = 0;
+ atomKK->modified(Device,X_MASK | IMAGE_MASK);
+
if (triclinic) lamda2x(nlocal);
}
@@ -521,7 +522,6 @@ void DomainKokkos::image_flip(int m_in, int n_in, int p_in)
p_flip = p_in;
atomKK->sync(Device,IMAGE_MASK);
- atomKK->modified(Device,IMAGE_MASK);
image = atomKK->k_image.view();
int nlocal = atomKK->nlocal;
@@ -530,6 +530,8 @@ void DomainKokkos::image_flip(int m_in, int n_in, int p_in)
Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this);
LMPDeviceType::fence();
copymode = 0;
+
+ atomKK->modified(Device,IMAGE_MASK);
}
KOKKOS_INLINE_FUNCTION
@@ -554,7 +556,6 @@ void DomainKokkos::operator()(TagDomain_image_flip, const int &i) const {
void DomainKokkos::lamda2x(int n)
{
atomKK->sync(Device,X_MASK);
- atomKK->modified(Device,X_MASK);
x = atomKK->k_x.view();
@@ -562,6 +563,8 @@ void DomainKokkos::lamda2x(int n)
Kokkos::parallel_for(Kokkos::RangePolicy(0,n),*this);
LMPDeviceType::fence();
copymode = 0;
+
+ atomKK->modified(Device,X_MASK);
}
KOKKOS_INLINE_FUNCTION
@@ -579,7 +582,6 @@ void DomainKokkos::operator()(TagDomain_lamda2x, const int &i) const {
void DomainKokkos::x2lamda(int n)
{
atomKK->sync(Device,X_MASK);
- atomKK->modified(Device,X_MASK);
x = atomKK->k_x.view();
@@ -587,6 +589,8 @@ void DomainKokkos::x2lamda(int n)
Kokkos::parallel_for(Kokkos::RangePolicy(0,n),*this);
LMPDeviceType::fence();
copymode = 0;
+
+ atomKK->modified(Device,X_MASK);
}
KOKKOS_INLINE_FUNCTION
diff --git a/src/KOKKOS/fix_langevin_kokkos.cpp b/src/KOKKOS/fix_langevin_kokkos.cpp
index b51c934c3e..0572dcedbe 100644
--- a/src/KOKKOS/fix_langevin_kokkos.cpp
+++ b/src/KOKKOS/fix_langevin_kokkos.cpp
@@ -177,11 +177,12 @@ void FixLangevinKokkos::post_force(int vflag)
// account for bias velocity
if(tbiasflag == BIAS){
+ atomKK->sync(temperature->execution_space,temperature->datamask_read);
temperature->compute_scalar();
temperature->remove_bias_all(); // modifies velocities
// if temeprature compute is kokkosized host-devcie comm won't be needed
- atomKK->modified(Host,V_MASK);
- atomKK->sync(execution_space,V_MASK);
+ atomKK->modified(temperature->execution_space,temperature->datamask_modify);
+ atomKK->sync(execution_space,temperature->datamask_modify);
}
// compute langevin force in parallel on the device
@@ -508,8 +509,10 @@ void FixLangevinKokkos::post_force(int vflag)
DeviceType::fence();
if(tbiasflag == BIAS){
+ atomKK->sync(temperature->execution_space,temperature->datamask_read);
temperature->restore_bias_all(); // modifies velocities
- atomKK->modified(Host,V_MASK);
+ atomKK->modified(temperature->execution_space,temperature->datamask_modify);
+ atomKK->sync(execution_space,temperature->datamask_modify);
}
// set modify flags for the views modified in post_force functor
diff --git a/src/KOKKOS/math_special_kokkos.h b/src/KOKKOS/math_special_kokkos.h
index c177e88574..88008312bf 100644
--- a/src/KOKKOS/math_special_kokkos.h
+++ b/src/KOKKOS/math_special_kokkos.h
@@ -42,12 +42,11 @@ namespace MathSpecialKokkos {
{
x *= x;
x *= 1.4426950408889634074; // log_2(e)
-#if defined(__BYTE_ORDER__)
-#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
return (x < 1023.0) ? exp2_x86(-x) : 0.0;
-#endif
-#endif
+#else
return (x < 1023.0) ? exp2(-x) : 0.0;
+#endif
}
// x**2, use instead of pow(x,2.0)
diff --git a/src/KOKKOS/neighbor_kokkos.cpp b/src/KOKKOS/neighbor_kokkos.cpp
index 8f334415af..1bf3f2ef39 100644
--- a/src/KOKKOS/neighbor_kokkos.cpp
+++ b/src/KOKKOS/neighbor_kokkos.cpp
@@ -147,9 +147,9 @@ void NeighborKokkos::init_ex_mol_bit_kokkos()
int NeighborKokkos::check_distance()
{
if (device_flag)
- check_distance_kokkos();
+ return check_distance_kokkos();
else
- check_distance_kokkos();
+ return check_distance_kokkos();
}
template
@@ -157,7 +157,7 @@ int NeighborKokkos::check_distance_kokkos()
{
typedef DeviceType device_type;
- double delx,dely,delz,rsq;
+ double delx,dely,delz;
double delta,delta1,delta2;
if (boxcheck) {
diff --git a/src/KOKKOS/pair_buck_coul_cut_kokkos.h b/src/KOKKOS/pair_buck_coul_cut_kokkos.h
index 8bccabf8de..0b6aba5e92 100644
--- a/src/KOKKOS/pair_buck_coul_cut_kokkos.h
+++ b/src/KOKKOS/pair_buck_coul_cut_kokkos.h
@@ -44,7 +44,9 @@ class PairBuckCoulCutKokkos : public PairBuckCoulCut {
double init_one(int, int);
struct params_buck_coul{
+ KOKKOS_INLINE_FUNCTION
params_buck_coul(){cut_ljsq=0;cut_coulsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;};
+ KOKKOS_INLINE_FUNCTION
params_buck_coul(int i){cut_ljsq=0;cut_coulsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;};
F_FLOAT cut_ljsq,cut_coulsq,a,c,rhoinv,buck1,buck2,offset;
};
diff --git a/src/KOKKOS/pair_buck_coul_long_kokkos.h b/src/KOKKOS/pair_buck_coul_long_kokkos.h
index c4af7e19f3..fe63a2c124 100644
--- a/src/KOKKOS/pair_buck_coul_long_kokkos.h
+++ b/src/KOKKOS/pair_buck_coul_long_kokkos.h
@@ -45,7 +45,9 @@ class PairBuckCoulLongKokkos : public PairBuckCoulLong {
double init_one(int, int);
struct params_buck_coul{
+ KOKKOS_INLINE_FUNCTION
params_buck_coul(){cut_ljsq=0;cut_coulsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;};
+ KOKKOS_INLINE_FUNCTION
params_buck_coul(int i){cut_ljsq=0;cut_coulsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;};
F_FLOAT cut_ljsq,cut_coulsq,a,c,rhoinv,buck1,buck2,offset;
};
diff --git a/src/KOKKOS/pair_buck_kokkos.h b/src/KOKKOS/pair_buck_kokkos.h
index 6b6e6f793e..0b0bbf94cf 100644
--- a/src/KOKKOS/pair_buck_kokkos.h
+++ b/src/KOKKOS/pair_buck_kokkos.h
@@ -43,7 +43,9 @@ class PairBuckKokkos : public PairBuck {
double init_one(int, int);
struct params_buck{
+ KOKKOS_INLINE_FUNCTION
params_buck(){cutsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;};
+ KOKKOS_INLINE_FUNCTION
params_buck(int i){cutsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;};
F_FLOAT cutsq,a,c,rhoinv,buck1,buck2,offset;
};
diff --git a/src/KOKKOS/pair_coul_debye_kokkos.h b/src/KOKKOS/pair_coul_debye_kokkos.h
index 1f6d222e04..4aadcbe4e1 100644
--- a/src/KOKKOS/pair_coul_debye_kokkos.h
+++ b/src/KOKKOS/pair_coul_debye_kokkos.h
@@ -44,7 +44,9 @@ class PairCoulDebyeKokkos : public PairCoulDebye {
double init_one(int, int);
struct params_coul{
+ KOKKOS_INLINE_FUNCTION
params_coul(){cutsq=0,scale=0;};
+ KOKKOS_INLINE_FUNCTION
params_coul(int i){cutsq=0,scale=0;};
F_FLOAT cutsq, scale;
};
diff --git a/src/KOKKOS/pair_lj_class2_kokkos.h b/src/KOKKOS/pair_lj_class2_kokkos.h
index 73865928f5..ccff6821f3 100644
--- a/src/KOKKOS/pair_lj_class2_kokkos.h
+++ b/src/KOKKOS/pair_lj_class2_kokkos.h
@@ -44,7 +44,9 @@ class PairLJClass2Kokkos : public PairLJClass2 {
double init_one(int, int);
struct params_lj{
+ KOKKOS_INLINE_FUNCTION
params_lj(){cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;};
+ KOKKOS_INLINE_FUNCTION
params_lj(int i){cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;};
F_FLOAT cutsq,lj1,lj2,lj3,lj4,offset;
};
diff --git a/src/KOKKOS/pair_lj_expand_kokkos.h b/src/KOKKOS/pair_lj_expand_kokkos.h
index 125c638527..ee110bab80 100644
--- a/src/KOKKOS/pair_lj_expand_kokkos.h
+++ b/src/KOKKOS/pair_lj_expand_kokkos.h
@@ -44,7 +44,9 @@ class PairLJExpandKokkos : public PairLJExpand {
double init_one(int, int);
struct params_lj{
+ KOKKOS_INLINE_FUNCTION
params_lj(){cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;shift=0;};
+ KOKKOS_INLINE_FUNCTION
params_lj(int i){cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;shift=0;};
F_FLOAT cutsq,lj1,lj2,lj3,lj4,offset,shift;
};
diff --git a/src/KOKKOS/pair_lj_gromacs_kokkos.h b/src/KOKKOS/pair_lj_gromacs_kokkos.h
index 4c03bf6e9b..1f16409dc5 100644
--- a/src/KOKKOS/pair_lj_gromacs_kokkos.h
+++ b/src/KOKKOS/pair_lj_gromacs_kokkos.h
@@ -44,7 +44,9 @@ class PairLJGromacsKokkos : public PairLJGromacs {
double init_one(int, int);
struct params_lj{
+ KOKKOS_INLINE_FUNCTION
params_lj(){cut_inner_sq=0;cut_inner=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;ljsw1=0;ljsw2=0;ljsw3=0;ljsw4=0;ljsw5=0;};
+ KOKKOS_INLINE_FUNCTION
params_lj(int i){cut_inner_sq=0;cut_inner=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;ljsw1=0;ljsw2=0;ljsw3=0;ljsw4=0;ljsw5=0;};
F_FLOAT cut_inner_sq,cut_inner,lj1,lj2,lj3,lj4,offset,ljsw1,ljsw2,ljsw3,ljsw4,ljsw5;
};
diff --git a/src/USER-DPD/pair_exp6_rx.cpp b/src/USER-DPD/pair_exp6_rx.cpp
index bf038dd3d7..1a07fb9d38 100644
--- a/src/USER-DPD/pair_exp6_rx.cpp
+++ b/src/USER-DPD/pair_exp6_rx.cpp
@@ -297,6 +297,13 @@ void PairExp6rx::compute(int eflag, int vflag)
rm21_ij = 0.5*(rm2_i + rm1_j);
epsilon21_ij = sqrt(epsilon2_i*epsilon1_j);
+ evdwlOldEXP6_12 = 0.0;
+ evdwlOldEXP6_21 = 0.0;
+ evdwlEXP6_12 = 0.0;
+ evdwlEXP6_21 = 0.0;
+ fpairOldEXP6_12 = 0.0;
+ fpairOldEXP6_21 = 0.0;
+
if(rmOld12_ij!=0.0 && rmOld21_ij!=0.0){
if(alphaOld21_ij == 6.0 || alphaOld12_ij == 6.0)
error->all(FLERR,"alpha_ij is 6.0 in pair exp6");
@@ -459,33 +466,33 @@ void PairExp6rx::compute(int eflag, int vflag)
} else {
evdwlEXP6_21 = buck1*(6.0*rexp - alpha21_ij*rm6ij*r6inv) - urc - durc*(r-rCut);
}
-
- //
- // Apply Mixing Rule to get the overall force for the CG pair
- //
- if (isite1 == isite2) fpair = sqrt(mixWtSite1old_i*mixWtSite2old_j)*fpairOldEXP6_12;
- else fpair = sqrt(mixWtSite1old_i*mixWtSite2old_j)*fpairOldEXP6_12 + sqrt(mixWtSite2old_i*mixWtSite1old_j)*fpairOldEXP6_21;
-
- f[i][0] += delx*fpair;
- f[i][1] += dely*fpair;
- f[i][2] += delz*fpair;
- if (newton_pair || j < nlocal) {
- f[j][0] -= delx*fpair;
- f[j][1] -= dely*fpair;
- f[j][2] -= delz*fpair;
- }
-
- if (isite1 == isite2) evdwl = sqrt(mixWtSite1_i*mixWtSite2_j)*evdwlEXP6_12;
- else evdwl = sqrt(mixWtSite1_i*mixWtSite2_j)*evdwlEXP6_12 + sqrt(mixWtSite2_i*mixWtSite1_j)*evdwlEXP6_21;
- evdwl *= factor_lj;
-
- uCGnew[i] += 0.5*evdwl;
- if (newton_pair || j < nlocal)
- uCGnew[j] += 0.5*evdwl;
- evdwl = evdwlOld;
- if (evflag) ev_tally(i,j,nlocal,newton_pair,
- evdwl,0.0,fpair,delx,dely,delz);
}
+
+ //
+ // Apply Mixing Rule to get the overall force for the CG pair
+ //
+ if (isite1 == isite2) fpair = sqrt(mixWtSite1old_i*mixWtSite2old_j)*fpairOldEXP6_12;
+ else fpair = sqrt(mixWtSite1old_i*mixWtSite2old_j)*fpairOldEXP6_12 + sqrt(mixWtSite2old_i*mixWtSite1old_j)*fpairOldEXP6_21;
+
+ f[i][0] += delx*fpair;
+ f[i][1] += dely*fpair;
+ f[i][2] += delz*fpair;
+ if (newton_pair || j < nlocal) {
+ f[j][0] -= delx*fpair;
+ f[j][1] -= dely*fpair;
+ f[j][2] -= delz*fpair;
+ }
+
+ if (isite1 == isite2) evdwl = sqrt(mixWtSite1_i*mixWtSite2_j)*evdwlEXP6_12;
+ else evdwl = sqrt(mixWtSite1_i*mixWtSite2_j)*evdwlEXP6_12 + sqrt(mixWtSite2_i*mixWtSite1_j)*evdwlEXP6_21;
+ evdwl *= factor_lj;
+
+ uCGnew[i] += 0.5*evdwl;
+ if (newton_pair || j < nlocal)
+ uCGnew[j] += 0.5*evdwl;
+ evdwl = evdwlOld;
+ if (evflag) ev_tally(i,j,nlocal,newton_pair,
+ evdwl,0.0,fpair,delx,dely,delz);
}
}
}
diff --git a/src/USER-OMP/npair_skip_omp.h b/src/USER-OMP/npair_skip_omp.h
index b909dd7e12..d3bc9b75ca 100644
--- a/src/USER-OMP/npair_skip_omp.h
+++ b/src/USER-OMP/npair_skip_omp.h
@@ -18,7 +18,8 @@
NPairStyle(skip/omp,
NPairSkip,
- NP_SKIP | NP_HALF | NP_FULL | NP_NSQ | NP_BIN | NP_MULTI |
+ NP_SKIP | NP_HALF | NP_FULL | NP_HALFFULL |
+ NP_NSQ | NP_BIN | NP_MULTI |
NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | NP_OMP)
NPairStyle(skip/half/respa/omp,
@@ -44,6 +45,12 @@ NPairStyle(skip/size/off2on/oneside/omp,
NP_NSQ | NP_BIN | NP_MULTI | NP_NEWTON | NP_NEWTOFF |
NP_ORTHO | NP_TRI | NP_OMP)
+NPairStyle(skip/ghost/omp,
+ NPairSkip,
+ NP_SKIP | NP_HALF | NP_FULL | NP_HALFFULL |
+ NP_NSQ | NP_BIN | NP_MULTI |
+ NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | NP_OMP | NP_GHOST)
+
#endif
/* ERROR/WARNING messages:
diff --git a/src/USER-OMP/thr_omp.cpp b/src/USER-OMP/thr_omp.cpp
index 1744a77387..4eaf09fb9a 100644
--- a/src/USER-OMP/thr_omp.cpp
+++ b/src/USER-OMP/thr_omp.cpp
@@ -170,9 +170,8 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag,
switch (thr_style) {
case THR_PAIR: {
- Pair * const pair = lmp->force->pair;
- if (pair->vflag_fdotr) {
+ if (lmp->force->pair->vflag_fdotr) {
// this is a non-hybrid pair style. compute per thread fdotr
if (fix->last_pair_hybrid == NULL) {
@@ -192,6 +191,8 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag,
}
if (evflag) {
+ Pair * const pair = (Pair *)style;
+
#if defined(_OPENMP)
#pragma omp critical
#endif
diff --git a/src/angle_hybrid.cpp b/src/angle_hybrid.cpp
index a477d7f8f6..9b3af1856e 100644
--- a/src/angle_hybrid.cpp
+++ b/src/angle_hybrid.cpp
@@ -104,7 +104,7 @@ void AngleHybrid::compute(int eflag, int vflag)
// accumulate sub-style global/peratom energy/virial in hybrid
if (eflag || vflag) ev_setup(eflag,vflag);
- else evflag = 0;
+ else evflag = eflag_global = vflag_global = eflag_atom = vflag_atom = 0;
for (m = 0; m < nstyles; m++) {
neighbor->nanglelist = nanglelist[m];
diff --git a/src/bond_hybrid.cpp b/src/bond_hybrid.cpp
index 1244c2822b..9a16d0e1fd 100644
--- a/src/bond_hybrid.cpp
+++ b/src/bond_hybrid.cpp
@@ -103,7 +103,7 @@ void BondHybrid::compute(int eflag, int vflag)
// accumulate sub-style global/peratom energy/virial in hybrid
if (eflag || vflag) ev_setup(eflag,vflag);
- else evflag = 0;
+ else evflag = eflag_global = vflag_global = eflag_atom = vflag_atom = 0;
for (m = 0; m < nstyles; m++) {
neighbor->nbondlist = nbondlist[m];
diff --git a/src/compute_coord_atom.cpp b/src/compute_coord_atom.cpp
index 1df5ad64ca..8c69aa7874 100644
--- a/src/compute_coord_atom.cpp
+++ b/src/compute_coord_atom.cpp
@@ -191,7 +191,6 @@ void ComputeCoordAtom::compute_peratom()
c_orientorder->invoked_flag |= INVOKED_PERATOM;
}
nqlist = c_orientorder->nqlist;
- int ltmp = l;
normv = c_orientorder->array_atom;
comm->forward_comm_compute(this);
}
diff --git a/src/dihedral_hybrid.cpp b/src/dihedral_hybrid.cpp
index 0ae396b887..372a858d02 100644
--- a/src/dihedral_hybrid.cpp
+++ b/src/dihedral_hybrid.cpp
@@ -105,7 +105,7 @@ void DihedralHybrid::compute(int eflag, int vflag)
// accumulate sub-style global/peratom energy/virial in hybrid
if (eflag || vflag) ev_setup(eflag,vflag);
- else evflag = 0;
+ else evflag = eflag_global = vflag_global = eflag_atom = vflag_atom = 0;
for (m = 0; m < nstyles; m++) {
neighbor->ndihedrallist = ndihedrallist[m];
diff --git a/src/domain.cpp b/src/domain.cpp
index 52ac9d3d1b..1dede69729 100644
--- a/src/domain.cpp
+++ b/src/domain.cpp
@@ -1600,10 +1600,10 @@ int Domain::ownatom(int id, double *x, imageint *image, int shrinkexceed)
if (coord[0] < blo[0] && boundary[0][0] > 1) newcoord[0] = blo[0];
else if (coord[0] >= bhi[0] && boundary[0][1] > 1) newcoord[0] = bhi[0];
else newcoord[0] = coord[0];
- if (coord[1] < blo[1] && boundary[1][1] > 1) newcoord[1] = blo[1];
+ if (coord[1] < blo[1] && boundary[1][0] > 1) newcoord[1] = blo[1];
else if (coord[1] >= bhi[1] && boundary[1][1] > 1) newcoord[1] = bhi[1];
else newcoord[1] = coord[1];
- if (coord[2] < blo[2] && boundary[2][2] > 1) newcoord[2] = blo[2];
+ if (coord[2] < blo[2] && boundary[2][0] > 1) newcoord[2] = blo[2];
else if (coord[2] >= bhi[2] && boundary[2][1] > 1) newcoord[2] = bhi[2];
else newcoord[2] = coord[2];
diff --git a/src/improper_hybrid.cpp b/src/improper_hybrid.cpp
index 78ee69569e..abaaae02da 100644
--- a/src/improper_hybrid.cpp
+++ b/src/improper_hybrid.cpp
@@ -105,7 +105,7 @@ void ImproperHybrid::compute(int eflag, int vflag)
// accumulate sub-style global/peratom energy/virial in hybrid
if (eflag || vflag) ev_setup(eflag,vflag);
- else evflag = 0;
+ else evflag = eflag_global = vflag_global = eflag_atom = vflag_atom = 0;
for (m = 0; m < nstyles; m++) {
neighbor->nimproperlist = nimproperlist[m];
diff --git a/src/library.cpp b/src/library.cpp
index eac8e059ee..992b8ba100 100644
--- a/src/library.cpp
+++ b/src/library.cpp
@@ -317,8 +317,6 @@ void lammps_free(void *ptr)
int lammps_extract_setting(void *ptr, char *name)
{
- LAMMPS *lmp = (LAMMPS *) ptr;
-
if (strcmp(name,"bigint") == 0) return sizeof(bigint);
if (strcmp(name,"tagint") == 0) return sizeof(tagint);
if (strcmp(name,"imageint") == 0) return sizeof(imageint);
diff --git a/src/math_special.h b/src/math_special.h
index 059ef5d3c7..e4b4998d54 100644
--- a/src/math_special.h
+++ b/src/math_special.h
@@ -41,12 +41,11 @@ namespace MathSpecial {
{
x *= x;
x *= 1.4426950408889634074; // log_2(e)
-#if defined(__BYTE_ORDER__)
-#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
return (x < 1023.0) ? exp2_x86(-x) : 0.0;
-#endif
-#endif
+#else
return (x < 1023.0) ? exp2(-x) : 0.0;
+#endif
}
// x**2, use instead of pow(x,2.0)
diff --git a/src/neigh_request.cpp b/src/neigh_request.cpp
index 6354af4d36..4007daadce 100644
--- a/src/neigh_request.cpp
+++ b/src/neigh_request.cpp
@@ -46,7 +46,7 @@ NeighRequest::NeighRequest(LAMMPS *lmp) : Pointers(lmp)
command_style = NULL;
// combination of settings, mutiple can be set to 1
- // default is every reneighboring
+ // default is every reneighboring, not occasional
// default is use newton_pair setting in force
// default is no size history (when gran = 1)
// default is no one-sided sphere/surface interactions (when gran = 1)
@@ -55,6 +55,7 @@ NeighRequest::NeighRequest(LAMMPS *lmp) : Pointers(lmp)
// default is no multi-threaded neighbor list build
// default is no Kokkos neighbor list build
// default is no Shardlow Splitting Algorithm (SSA) neighbor list build
+ // default is neighbors of atoms, not bonds
occasional = 0;
newton = 0;
@@ -65,6 +66,7 @@ NeighRequest::NeighRequest(LAMMPS *lmp) : Pointers(lmp)
intel = 0;
kokkos_host = kokkos_device = 0;
ssa = 0;
+ bond = 0;
// copy/skip/derive info, default is no copy or skip
// none or only one option is set
@@ -142,6 +144,7 @@ int NeighRequest::identical(NeighRequest *other)
if (kokkos_host != other->kokkos_host) same = 0;
if (kokkos_device != other->kokkos_device) same = 0;
if (ssa != other->ssa) same = 0;
+ if (bond != other->bond) same = 0;
if (copy != other->copy_original) same = 0;
if (same_skip(other) == 0) same = 0;
@@ -182,6 +185,7 @@ int NeighRequest::same_kind(NeighRequest *other)
if (kokkos_host != other->kokkos_host) same = 0;
if (kokkos_device != other->kokkos_device) same = 0;
if (ssa != other->ssa) same = 0;
+ if (bond != other->bond) same = 0;
// copy/skip/derive info does not need to be the same
@@ -237,4 +241,5 @@ void NeighRequest::copy_request(NeighRequest *other)
kokkos_host = other->kokkos_host;
kokkos_device = other->kokkos_device;
ssa = other->ssa;
+ bond = other->bond;
}
diff --git a/src/neigh_request.h b/src/neigh_request.h
index 0b561710e7..2738f4c036 100644
--- a/src/neigh_request.h
+++ b/src/neigh_request.h
@@ -95,6 +95,10 @@ class NeighRequest : protected Pointers {
int ssa;
+ // 1 if bond neighbors, not atom neighbors
+
+ int bond;
+
// -----------------
// end of optional settings
// -----------------
diff --git a/src/neighbor.cpp b/src/neighbor.cpp
index cbcd5d640d..79958a29f4 100644
--- a/src/neighbor.cpp
+++ b/src/neighbor.cpp
@@ -1411,11 +1411,11 @@ int Neighbor::choose_pair(NeighRequest *rq)
int copyflag,skipflag,halfflag,fullflag,halffullflag,sizeflag,respaflag,
ghostflag,off2onflag,onesideflag,ssaflag,ompflag,intelflag,
- kokkos_device_flag,kokkos_host_flag;
+ kokkos_device_flag,kokkos_host_flag,bondflag;
copyflag = skipflag = halfflag = fullflag = halffullflag = sizeflag =
ghostflag = respaflag = off2onflag = onesideflag = ssaflag =
- ompflag = intelflag = kokkos_device_flag = kokkos_host_flag = 0;
+ ompflag = intelflag = kokkos_device_flag = kokkos_host_flag = bondflag = 0;
if (rq->copy) copyflag = NP_COPY;
if (rq->skip) skipflag = NP_SKIP;
@@ -1447,6 +1447,7 @@ int Neighbor::choose_pair(NeighRequest *rq)
if (rq->intel) intelflag = NP_INTEL;
if (rq->kokkos_device) kokkos_device_flag = NP_KOKKOS_DEVICE;
if (rq->kokkos_host) kokkos_host_flag = NP_KOKKOS_HOST;
+ if (rq->bond) bondflag = NP_BOND;
int newtflag;
if (rq->newton == 0 && newton_pair) newtflag = 1;
@@ -1459,10 +1460,10 @@ int Neighbor::choose_pair(NeighRequest *rq)
int mask;
- //printf("FLAGS: %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n",
+ //printf("FLAGS: %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n",
// copyflag,skipflag,halfflag,fullflag,halffullflag,
// sizeflag,respaflag,ghostflag,off2onflag,onesideflag,ssaflag,
- // ompflag,intelflag,newtflag);
+ // ompflag,intelflag,newtflag,bondflag);
for (int i = 0; i < npclass; i++) {
mask = pairmasks[i];
@@ -1496,6 +1497,7 @@ int Neighbor::choose_pair(NeighRequest *rq)
if (off2onflag != (mask & NP_OFF2ON)) continue;
if (onesideflag != (mask & NP_ONESIDE)) continue;
if (ssaflag != (mask & NP_SSA)) continue;
+ if (bondflag != (mask & NP_BOND)) continue;
if (ompflag != (mask & NP_OMP)) continue;
if (intelflag != (mask & NP_INTEL)) continue;
diff --git a/src/neighbor.h b/src/neighbor.h
index eb603ad84f..d087af9ed5 100644
--- a/src/neighbor.h
+++ b/src/neighbor.h
@@ -267,6 +267,7 @@ namespace NeighConst {
static const int NP_TRI = 1<<19;
static const int NP_KOKKOS_DEVICE = 1<<20;
static const int NP_KOKKOS_HOST = 1<<21;
+ static const int NP_BOND = 1<<22;
}
}
diff --git a/src/npair_skip.h b/src/npair_skip.h
index f4cbdbcc6e..5dfa3b2bf0 100644
--- a/src/npair_skip.h
+++ b/src/npair_skip.h
@@ -16,9 +16,15 @@
NPairStyle(skip,
NPairSkip,
NP_SKIP | NP_HALF | NP_FULL | NP_HALFFULL |
- NP_NSQ | NP_BIN | NP_MULTI |
+ NP_NSQ | NP_BIN | NP_MULTI |
NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI)
+NPairStyle(skip/ghost,
+ NPairSkip,
+ NP_SKIP | NP_HALF | NP_FULL | NP_HALFFULL |
+ NP_NSQ | NP_BIN | NP_MULTI |
+ NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI | NP_GHOST)
+
#else
#ifndef LMP_NPAIR_SKIP_H
diff --git a/src/version.h b/src/version.h
index 1b3ba22b49..6847e5ff82 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1 +1 @@
-#define LAMMPS_VERSION "20 Jan 2017"
+#define LAMMPS_VERSION "26 Jan 2017"