forked from lijiext/lammps
Merge branch 'master' into user-cgdna
This commit is contained in:
commit
ed0a347fbf
|
@ -1,7 +1,7 @@
|
|||
<!-- HTML_ONLY -->
|
||||
<HEAD>
|
||||
<TITLE>LAMMPS Users Manual</TITLE>
|
||||
<META NAME="docnumber" CONTENT="20 Jan 2017 version">
|
||||
<META NAME="docnumber" CONTENT="26 Jan 2017 version">
|
||||
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
|
||||
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
|
||||
</HEAD>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<H1></H1>
|
||||
|
||||
LAMMPS Documentation :c,h3
|
||||
20 Jan 2017 version :c,h4
|
||||
26 Jan 2017 version :c,h4
|
||||
|
||||
Version info: :h4
|
||||
|
||||
|
|
|
@ -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
|
|
@ -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<LMPDeviceType>();
|
||||
image = atomKK->k_image.view<LMPDeviceType>();
|
||||
|
@ -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<LMPDeviceType>();
|
||||
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<LMPDeviceType, TagDomain_image_flip>(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<LMPDeviceType>();
|
||||
|
||||
|
@ -562,6 +563,8 @@ void DomainKokkos::lamda2x(int n)
|
|||
Kokkos::parallel_for(Kokkos::RangePolicy<LMPDeviceType, TagDomain_lamda2x>(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<LMPDeviceType>();
|
||||
|
||||
|
@ -587,6 +589,8 @@ void DomainKokkos::x2lamda(int n)
|
|||
Kokkos::parallel_for(Kokkos::RangePolicy<LMPDeviceType, TagDomain_x2lamda>(0,n),*this);
|
||||
LMPDeviceType::fence();
|
||||
copymode = 0;
|
||||
|
||||
atomKK->modified(Device,X_MASK);
|
||||
}
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
|
|
|
@ -177,11 +177,12 @@ void FixLangevinKokkos<DeviceType>::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<DeviceType>::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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -147,9 +147,9 @@ void NeighborKokkos::init_ex_mol_bit_kokkos()
|
|||
int NeighborKokkos::check_distance()
|
||||
{
|
||||
if (device_flag)
|
||||
check_distance_kokkos<LMPDeviceType>();
|
||||
return check_distance_kokkos<LMPDeviceType>();
|
||||
else
|
||||
check_distance_kokkos<LMPHostType>();
|
||||
return check_distance_kokkos<LMPHostType>();
|
||||
}
|
||||
|
||||
template<class DeviceType>
|
||||
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -95,6 +95,10 @@ class NeighRequest : protected Pointers {
|
|||
|
||||
int ssa;
|
||||
|
||||
// 1 if bond neighbors, not atom neighbors
|
||||
|
||||
int bond;
|
||||
|
||||
// -----------------
|
||||
// end of optional settings
|
||||
// -----------------
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
#define LAMMPS_VERSION "20 Jan 2017"
|
||||
#define LAMMPS_VERSION "26 Jan 2017"
|
||||
|
|
Loading…
Reference in New Issue