git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14655 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -657,6 +657,9 @@ void ImproperClass2::angleangle(int eflag, int vflag)
|
|||||||
i4 = improperlist[n][3];
|
i4 = improperlist[n][3];
|
||||||
type = improperlist[n][4];
|
type = improperlist[n][4];
|
||||||
|
|
||||||
|
if ((aa_k1[type] == 0.0) && (aa_k2[type] == 0.0)
|
||||||
|
&& (aa_k3[type] == 0.0)) continue;
|
||||||
|
|
||||||
// difference vectors
|
// difference vectors
|
||||||
|
|
||||||
delxAB = x[i1][0] - x[i2][0];
|
delxAB = x[i1][0] - x[i2][0];
|
||||||
|
|||||||
@ -764,8 +764,11 @@ struct AtomVecFullKokkos_PackBorder {
|
|||||||
union ubuf {
|
union ubuf {
|
||||||
double d;
|
double d;
|
||||||
int64_t i;
|
int64_t i;
|
||||||
|
KOKKOS_INLINE_FUNCTION
|
||||||
ubuf(double arg) : d(arg) {}
|
ubuf(double arg) : d(arg) {}
|
||||||
|
KOKKOS_INLINE_FUNCTION
|
||||||
ubuf(int64_t arg) : i(arg) {}
|
ubuf(int64_t arg) : i(arg) {}
|
||||||
|
KOKKOS_INLINE_FUNCTION
|
||||||
ubuf(int arg) : i(arg) {}
|
ubuf(int arg) : i(arg) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1030,8 +1033,11 @@ struct AtomVecFullKokkos_UnpackBorder {
|
|||||||
union ubuf {
|
union ubuf {
|
||||||
double d;
|
double d;
|
||||||
int64_t i;
|
int64_t i;
|
||||||
|
KOKKOS_INLINE_FUNCTION
|
||||||
ubuf(double arg) : d(arg) {}
|
ubuf(double arg) : d(arg) {}
|
||||||
|
KOKKOS_INLINE_FUNCTION
|
||||||
ubuf(int64_t arg) : i(arg) {}
|
ubuf(int64_t arg) : i(arg) {}
|
||||||
|
KOKKOS_INLINE_FUNCTION
|
||||||
ubuf(int arg) : i(arg) {}
|
ubuf(int arg) : i(arg) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1177,8 +1183,11 @@ struct AtomVecFullKokkos_PackExchangeFunctor {
|
|||||||
union ubuf {
|
union ubuf {
|
||||||
double d;
|
double d;
|
||||||
int64_t i;
|
int64_t i;
|
||||||
|
KOKKOS_INLINE_FUNCTION
|
||||||
ubuf(double arg) : d(arg) {}
|
ubuf(double arg) : d(arg) {}
|
||||||
|
KOKKOS_INLINE_FUNCTION
|
||||||
ubuf(int64_t arg) : i(arg) {}
|
ubuf(int64_t arg) : i(arg) {}
|
||||||
|
KOKKOS_INLINE_FUNCTION
|
||||||
ubuf(int arg) : i(arg) {}
|
ubuf(int arg) : i(arg) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1527,8 +1536,11 @@ struct AtomVecFullKokkos_UnpackExchangeFunctor {
|
|||||||
union ubuf {
|
union ubuf {
|
||||||
double d;
|
double d;
|
||||||
int64_t i;
|
int64_t i;
|
||||||
|
KOKKOS_INLINE_FUNCTION
|
||||||
ubuf(double arg) : d(arg) {}
|
ubuf(double arg) : d(arg) {}
|
||||||
|
KOKKOS_INLINE_FUNCTION
|
||||||
ubuf(int64_t arg) : i(arg) {}
|
ubuf(int64_t arg) : i(arg) {}
|
||||||
|
KOKKOS_INLINE_FUNCTION
|
||||||
ubuf(int arg) : i(arg) {}
|
ubuf(int arg) : i(arg) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -13,9 +13,9 @@
|
|||||||
|
|
||||||
#ifdef DIHEDRAL_CLASS
|
#ifdef DIHEDRAL_CLASS
|
||||||
|
|
||||||
DihedralStyle(charmm/kk,DihedralOPLSKokkos<LMPDeviceType>)
|
DihedralStyle(opls/kk,DihedralOPLSKokkos<LMPDeviceType>)
|
||||||
DihedralStyle(charmm/kk/device,DihedralOPLSKokkos<LMPDeviceType>)
|
DihedralStyle(opls/kk/device,DihedralOPLSKokkos<LMPDeviceType>)
|
||||||
DihedralStyle(charmm/kk/host,DihedralOPLSKokkos<LMPHostType>)
|
DihedralStyle(opls/kk/host,DihedralOPLSKokkos<LMPHostType>)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|||||||
@ -120,7 +120,8 @@ void Ndx2Group::command(int narg, char **arg)
|
|||||||
// if we had processed a section, before we need to step back
|
// if we had processed a section, before we need to step back
|
||||||
if (name != NULL) {
|
if (name != NULL) {
|
||||||
rewind(fp);
|
rewind(fp);
|
||||||
find_section(fp,name);
|
char *tmp = find_section(fp,name);
|
||||||
|
delete[] tmp;
|
||||||
delete[] name;
|
delete[] name;
|
||||||
name = NULL;
|
name = NULL;
|
||||||
}
|
}
|
||||||
@ -171,6 +172,7 @@ void Ndx2Group::command(int narg, char **arg)
|
|||||||
len = 0;
|
len = 0;
|
||||||
|
|
||||||
// find named section, search from beginning of file
|
// find named section, search from beginning of file
|
||||||
|
if (name != NULL) delete[] name;
|
||||||
rewind(fp);
|
rewind(fp);
|
||||||
name = find_section(fp,arg[idx]);
|
name = find_section(fp,arg[idx]);
|
||||||
if (name != NULL) len=strlen(name);
|
if (name != NULL) len=strlen(name);
|
||||||
|
|||||||
@ -395,7 +395,7 @@ double FixEOStable::splint(double *xa, double *ya, double *y2a, int n, double x)
|
|||||||
void FixEOStable::energy_lookup(double t, double &u)
|
void FixEOStable::energy_lookup(double t, double &u)
|
||||||
{
|
{
|
||||||
int itable;
|
int itable;
|
||||||
double fraction,a,b;
|
double fraction;
|
||||||
|
|
||||||
Table *tb = &tables[0];
|
Table *tb = &tables[0];
|
||||||
if(t < tb->lo || t > tb->hi){
|
if(t < tb->lo || t > tb->hi){
|
||||||
@ -417,7 +417,7 @@ void FixEOStable::energy_lookup(double t, double &u)
|
|||||||
void FixEOStable::temperature_lookup(double u, double &t)
|
void FixEOStable::temperature_lookup(double u, double &t)
|
||||||
{
|
{
|
||||||
int itable;
|
int itable;
|
||||||
double fraction,a,b;
|
double fraction;
|
||||||
|
|
||||||
Table *tb = &tables[1];
|
Table *tb = &tables[1];
|
||||||
if(u < tb->lo || u > tb->hi){
|
if(u < tb->lo || u > tb->hi){
|
||||||
|
|||||||
@ -156,7 +156,7 @@ void FixShardlow::initial_integrate(int vflag)
|
|||||||
int i,j,ii,jj,inum,jnum,itype,jtype;
|
int i,j,ii,jj,inum,jnum,itype,jtype;
|
||||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||||
double xtmp,ytmp,ztmp,delx,dely,delz;
|
double xtmp,ytmp,ztmp,delx,dely,delz;
|
||||||
double vxtmp,vytmp,vztmp,delvx,delvy,delvz;
|
double delvx,delvy,delvz;
|
||||||
double rsq,r,rinv;
|
double rsq,r,rinv;
|
||||||
double dot,wd,wr,randnum,factor_dpd,factor_dpd1;
|
double dot,wd,wr,randnum,factor_dpd,factor_dpd1;
|
||||||
double dpx,dpy,dpz;
|
double dpx,dpy,dpz;
|
||||||
@ -170,7 +170,6 @@ void FixShardlow::initial_integrate(int vflag)
|
|||||||
int nlocal = atom->nlocal;
|
int nlocal = atom->nlocal;
|
||||||
int nghost = atom->nghost;
|
int nghost = atom->nghost;
|
||||||
int nall = nlocal + nghost;
|
int nall = nlocal + nghost;
|
||||||
double *special_lj = force->special_lj;
|
|
||||||
int newton_pair = force->newton_pair;
|
int newton_pair = force->newton_pair;
|
||||||
double randPair;
|
double randPair;
|
||||||
|
|
||||||
@ -179,7 +178,7 @@ void FixShardlow::initial_integrate(int vflag)
|
|||||||
double *duCond = atom->duCond;
|
double *duCond = atom->duCond;
|
||||||
double *duMech = atom->duMech;
|
double *duMech = atom->duMech;
|
||||||
double *dpdTheta = atom->dpdTheta;
|
double *dpdTheta = atom->dpdTheta;
|
||||||
double kappa_ij, alpha_ij, theta_ij, gamma_ij, sigma_ij, u_ij;
|
double kappa_ij, alpha_ij, theta_ij, gamma_ij, sigma_ij;
|
||||||
double vxi, vyi, vzi, vxj, vyj, vzj;
|
double vxi, vyi, vzi, vxj, vyj, vzj;
|
||||||
double vx0i, vy0i, vz0i, vx0j, vy0j, vz0j;
|
double vx0i, vy0i, vz0i, vx0j, vy0j, vz0j;
|
||||||
double dot1, dot2, dot3, dot4;
|
double dot1, dot2, dot3, dot4;
|
||||||
|
|||||||
@ -212,7 +212,6 @@ void PairDPDfdt::coeff(int narg, char **arg)
|
|||||||
double a0_one = force->numeric(FLERR,arg[2]);
|
double a0_one = force->numeric(FLERR,arg[2]);
|
||||||
double sigma_one = force->numeric(FLERR,arg[3]);
|
double sigma_one = force->numeric(FLERR,arg[3]);
|
||||||
double cut_one = cut_global;
|
double cut_one = cut_global;
|
||||||
double kappa_one;
|
|
||||||
|
|
||||||
if (narg == 5) cut_one = force->numeric(FLERR,arg[4]);
|
if (narg == 5) cut_one = force->numeric(FLERR,arg[4]);
|
||||||
|
|
||||||
|
|||||||
@ -147,7 +147,7 @@ class Comm : protected Pointers {
|
|||||||
W: OMP_NUM_THREADS environment is not set.
|
W: OMP_NUM_THREADS environment is not set.
|
||||||
|
|
||||||
This environment variable must be set appropriately to use the
|
This environment variable must be set appropriately to use the
|
||||||
USER-OMP pacakge.
|
USER-OMP package.
|
||||||
|
|
||||||
E: Illegal ... command
|
E: Illegal ... command
|
||||||
|
|
||||||
|
|||||||
@ -451,7 +451,7 @@ int DumpCustom::count()
|
|||||||
choose[i] = 0;
|
choose[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// un-choose if any threshhold criterion isn't met
|
// un-choose if any threshold criterion isn't met
|
||||||
|
|
||||||
if (nthresh) {
|
if (nthresh) {
|
||||||
double *ptr;
|
double *ptr;
|
||||||
@ -471,7 +471,7 @@ int DumpCustom::count()
|
|||||||
} else if (thresh_array[ithresh] == MOL) {
|
} else if (thresh_array[ithresh] == MOL) {
|
||||||
if (!atom->molecule_flag)
|
if (!atom->molecule_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
tagint *molecule = atom->molecule;
|
tagint *molecule = atom->molecule;
|
||||||
for (i = 0; i < nlocal; i++) dchoose[i] = molecule[i];
|
for (i = 0; i < nlocal; i++) dchoose[i] = molecule[i];
|
||||||
ptr = dchoose;
|
ptr = dchoose;
|
||||||
@ -740,44 +740,44 @@ int DumpCustom::count()
|
|||||||
} else if (thresh_array[ithresh] == Q) {
|
} else if (thresh_array[ithresh] == Q) {
|
||||||
if (!atom->q_flag)
|
if (!atom->q_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
ptr = atom->q;
|
ptr = atom->q;
|
||||||
nstride = 1;
|
nstride = 1;
|
||||||
} else if (thresh_array[ithresh] == MUX) {
|
} else if (thresh_array[ithresh] == MUX) {
|
||||||
if (!atom->mu_flag)
|
if (!atom->mu_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
ptr = &atom->mu[0][0];
|
ptr = &atom->mu[0][0];
|
||||||
nstride = 4;
|
nstride = 4;
|
||||||
} else if (thresh_array[ithresh] == MUY) {
|
} else if (thresh_array[ithresh] == MUY) {
|
||||||
if (!atom->mu_flag)
|
if (!atom->mu_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
ptr = &atom->mu[0][1];
|
ptr = &atom->mu[0][1];
|
||||||
nstride = 4;
|
nstride = 4;
|
||||||
} else if (thresh_array[ithresh] == MUZ) {
|
} else if (thresh_array[ithresh] == MUZ) {
|
||||||
if (!atom->mu_flag)
|
if (!atom->mu_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
ptr = &atom->mu[0][2];
|
ptr = &atom->mu[0][2];
|
||||||
nstride = 4;
|
nstride = 4;
|
||||||
} else if (thresh_array[ithresh] == MU) {
|
} else if (thresh_array[ithresh] == MU) {
|
||||||
if (!atom->mu_flag)
|
if (!atom->mu_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
ptr = &atom->mu[0][3];
|
ptr = &atom->mu[0][3];
|
||||||
nstride = 4;
|
nstride = 4;
|
||||||
|
|
||||||
} else if (thresh_array[ithresh] == RADIUS) {
|
} else if (thresh_array[ithresh] == RADIUS) {
|
||||||
if (!atom->radius_flag)
|
if (!atom->radius_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
ptr = atom->radius;
|
ptr = atom->radius;
|
||||||
nstride = 1;
|
nstride = 1;
|
||||||
} else if (thresh_array[ithresh] == DIAMETER) {
|
} else if (thresh_array[ithresh] == DIAMETER) {
|
||||||
if (!atom->radius_flag)
|
if (!atom->radius_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
double *radius = atom->radius;
|
double *radius = atom->radius;
|
||||||
for (i = 0; i < nlocal; i++) dchoose[i] = 2.0*radius[i];
|
for (i = 0; i < nlocal; i++) dchoose[i] = 2.0*radius[i];
|
||||||
ptr = dchoose;
|
ptr = dchoose;
|
||||||
@ -785,55 +785,55 @@ int DumpCustom::count()
|
|||||||
} else if (thresh_array[ithresh] == OMEGAX) {
|
} else if (thresh_array[ithresh] == OMEGAX) {
|
||||||
if (!atom->omega_flag)
|
if (!atom->omega_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
ptr = &atom->omega[0][0];
|
ptr = &atom->omega[0][0];
|
||||||
nstride = 3;
|
nstride = 3;
|
||||||
} else if (thresh_array[ithresh] == OMEGAY) {
|
} else if (thresh_array[ithresh] == OMEGAY) {
|
||||||
if (!atom->omega_flag)
|
if (!atom->omega_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
ptr = &atom->omega[0][1];
|
ptr = &atom->omega[0][1];
|
||||||
nstride = 3;
|
nstride = 3;
|
||||||
} else if (thresh_array[ithresh] == OMEGAZ) {
|
} else if (thresh_array[ithresh] == OMEGAZ) {
|
||||||
if (!atom->omega_flag)
|
if (!atom->omega_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
ptr = &atom->omega[0][2];
|
ptr = &atom->omega[0][2];
|
||||||
nstride = 3;
|
nstride = 3;
|
||||||
} else if (thresh_array[ithresh] == ANGMOMX) {
|
} else if (thresh_array[ithresh] == ANGMOMX) {
|
||||||
if (!atom->angmom_flag)
|
if (!atom->angmom_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
ptr = &atom->angmom[0][0];
|
ptr = &atom->angmom[0][0];
|
||||||
nstride = 3;
|
nstride = 3;
|
||||||
} else if (thresh_array[ithresh] == ANGMOMY) {
|
} else if (thresh_array[ithresh] == ANGMOMY) {
|
||||||
if (!atom->angmom_flag)
|
if (!atom->angmom_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
ptr = &atom->angmom[0][1];
|
ptr = &atom->angmom[0][1];
|
||||||
nstride = 3;
|
nstride = 3;
|
||||||
} else if (thresh_array[ithresh] == ANGMOMZ) {
|
} else if (thresh_array[ithresh] == ANGMOMZ) {
|
||||||
if (!atom->angmom_flag)
|
if (!atom->angmom_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
ptr = &atom->angmom[0][2];
|
ptr = &atom->angmom[0][2];
|
||||||
nstride = 3;
|
nstride = 3;
|
||||||
} else if (thresh_array[ithresh] == TQX) {
|
} else if (thresh_array[ithresh] == TQX) {
|
||||||
if (!atom->torque_flag)
|
if (!atom->torque_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
ptr = &atom->torque[0][0];
|
ptr = &atom->torque[0][0];
|
||||||
nstride = 3;
|
nstride = 3;
|
||||||
} else if (thresh_array[ithresh] == TQY) {
|
} else if (thresh_array[ithresh] == TQY) {
|
||||||
if (!atom->torque_flag)
|
if (!atom->torque_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
ptr = &atom->torque[0][1];
|
ptr = &atom->torque[0][1];
|
||||||
nstride = 3;
|
nstride = 3;
|
||||||
} else if (thresh_array[ithresh] == TQZ) {
|
} else if (thresh_array[ithresh] == TQZ) {
|
||||||
if (!atom->torque_flag)
|
if (!atom->torque_flag)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
"Threshhold for an atom property that isn't allocated");
|
"Threshold for an atom property that isn't allocated");
|
||||||
ptr = &atom->torque[0][2];
|
ptr = &atom->torque[0][2];
|
||||||
nstride = 3;
|
nstride = 3;
|
||||||
|
|
||||||
@ -881,7 +881,7 @@ int DumpCustom::count()
|
|||||||
nstride = 1;
|
nstride = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// unselect atoms that don't meet threshhold criterion
|
// unselect atoms that don't meet threshold criterion
|
||||||
|
|
||||||
value = thresh_value[ithresh];
|
value = thresh_value[ithresh];
|
||||||
|
|
||||||
@ -1459,6 +1459,7 @@ int DumpCustom::modify_param(int narg, char **arg)
|
|||||||
iregion = domain->find_region(arg[1]);
|
iregion = domain->find_region(arg[1]);
|
||||||
if (iregion == -1)
|
if (iregion == -1)
|
||||||
error->all(FLERR,"Dump_modify region ID does not exist");
|
error->all(FLERR,"Dump_modify region ID does not exist");
|
||||||
|
delete [] idregion;
|
||||||
int n = strlen(arg[1]) + 1;
|
int n = strlen(arg[1]) + 1;
|
||||||
idregion = new char[n];
|
idregion = new char[n];
|
||||||
strcpy(idregion,arg[1]);
|
strcpy(idregion,arg[1]);
|
||||||
@ -1502,13 +1503,13 @@ int DumpCustom::modify_param(int narg, char **arg)
|
|||||||
|
|
||||||
if (narg < 4) error->all(FLERR,"Illegal dump_modify command");
|
if (narg < 4) error->all(FLERR,"Illegal dump_modify command");
|
||||||
|
|
||||||
// grow threshhold arrays
|
// grow threshold arrays
|
||||||
|
|
||||||
memory->grow(thresh_array,nthresh+1,"dump:thresh_array");
|
memory->grow(thresh_array,nthresh+1,"dump:thresh_array");
|
||||||
memory->grow(thresh_op,(nthresh+1),"dump:thresh_op");
|
memory->grow(thresh_op,(nthresh+1),"dump:thresh_op");
|
||||||
memory->grow(thresh_value,(nthresh+1),"dump:thresh_value");
|
memory->grow(thresh_value,(nthresh+1),"dump:thresh_value");
|
||||||
|
|
||||||
// set attribute type of threshhold
|
// set attribute type of threshold
|
||||||
// customize by adding to if statement
|
// customize by adding to if statement
|
||||||
|
|
||||||
if (strcmp(arg[1],"id") == 0) thresh_array[nthresh] = ID;
|
if (strcmp(arg[1],"id") == 0) thresh_array[nthresh] = ID;
|
||||||
@ -1733,7 +1734,7 @@ int DumpCustom::modify_param(int narg, char **arg)
|
|||||||
|
|
||||||
} else error->all(FLERR,"Invalid dump_modify threshhold operator");
|
} else error->all(FLERR,"Invalid dump_modify threshhold operator");
|
||||||
|
|
||||||
// set operation type of threshhold
|
// set operation type of threshold
|
||||||
|
|
||||||
if (strcmp(arg[2],"<") == 0) thresh_op[nthresh] = LT;
|
if (strcmp(arg[2],"<") == 0) thresh_op[nthresh] = LT;
|
||||||
else if (strcmp(arg[2],"<=") == 0) thresh_op[nthresh] = LE;
|
else if (strcmp(arg[2],"<=") == 0) thresh_op[nthresh] = LE;
|
||||||
@ -1741,9 +1742,9 @@ int DumpCustom::modify_param(int narg, char **arg)
|
|||||||
else if (strcmp(arg[2],">=") == 0) thresh_op[nthresh] = GE;
|
else if (strcmp(arg[2],">=") == 0) thresh_op[nthresh] = GE;
|
||||||
else if (strcmp(arg[2],"==") == 0) thresh_op[nthresh] = EQ;
|
else if (strcmp(arg[2],"==") == 0) thresh_op[nthresh] = EQ;
|
||||||
else if (strcmp(arg[2],"!=") == 0) thresh_op[nthresh] = NEQ;
|
else if (strcmp(arg[2],"!=") == 0) thresh_op[nthresh] = NEQ;
|
||||||
else error->all(FLERR,"Invalid dump_modify threshhold operator");
|
else error->all(FLERR,"Invalid dump_modify threshold operator");
|
||||||
|
|
||||||
// set threshhold value
|
// set threshold value
|
||||||
|
|
||||||
thresh_value[nthresh] = force->numeric(FLERR,arg[3]);
|
thresh_value[nthresh] = force->numeric(FLERR,arg[3]);
|
||||||
|
|
||||||
|
|||||||
@ -89,6 +89,7 @@ FixAdapt::FixAdapt(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
|||||||
strcpy(adapt[nadapt].pstyle,arg[iarg+1]);
|
strcpy(adapt[nadapt].pstyle,arg[iarg+1]);
|
||||||
n = strlen(arg[iarg+2]) + 1;
|
n = strlen(arg[iarg+2]) + 1;
|
||||||
adapt[nadapt].pparam = new char[n];
|
adapt[nadapt].pparam = new char[n];
|
||||||
|
adapt[nadapt].pair = NULL;
|
||||||
strcpy(adapt[nadapt].pparam,arg[iarg+2]);
|
strcpy(adapt[nadapt].pparam,arg[iarg+2]);
|
||||||
force->bounds(arg[iarg+3],atom->ntypes,
|
force->bounds(arg[iarg+3],atom->ntypes,
|
||||||
adapt[nadapt].ilo,adapt[nadapt].ihi);
|
adapt[nadapt].ilo,adapt[nadapt].ihi);
|
||||||
@ -294,7 +295,7 @@ void FixAdapt::init()
|
|||||||
|
|
||||||
if (ad->which == PAIR) {
|
if (ad->which == PAIR) {
|
||||||
anypair = 1;
|
anypair = 1;
|
||||||
Pair *pair = NULL;
|
ad->pair = NULL;
|
||||||
|
|
||||||
// if ad->pstyle has trailing sub-style annotation ":N",
|
// if ad->pstyle has trailing sub-style annotation ":N",
|
||||||
// strip it for pstyle arg to pair_match() and set nsub = N
|
// strip it for pstyle arg to pair_match() and set nsub = N
|
||||||
@ -317,23 +318,25 @@ void FixAdapt::init()
|
|||||||
strcpy(psuffix,pstyle);
|
strcpy(psuffix,pstyle);
|
||||||
strcat(psuffix,"/");
|
strcat(psuffix,"/");
|
||||||
strcat(psuffix,lmp->suffix);
|
strcat(psuffix,lmp->suffix);
|
||||||
pair = force->pair_match(psuffix,1,nsub);
|
ad->pair = force->pair_match(psuffix,1,nsub);
|
||||||
delete[] psuffix;
|
delete[] psuffix;
|
||||||
}
|
}
|
||||||
if (pair == NULL) pair = force->pair_match(pstyle,1,nsub);
|
if (ad->pair == NULL) ad->pair = force->pair_match(pstyle,1,nsub);
|
||||||
if (pair == NULL) error->all(FLERR,"Fix adapt pair style does not exist");
|
if (ad->pair == NULL) error->all(FLERR,"Fix adapt pair style does not exist");
|
||||||
void *ptr = pair->extract(ad->pparam,ad->pdim);
|
|
||||||
|
void *ptr = ad->pair->extract(ad->pparam,ad->pdim);
|
||||||
if (ptr == NULL)
|
if (ptr == NULL)
|
||||||
error->all(FLERR,"Fix adapt pair style param not supported");
|
error->all(FLERR,"Fix adapt pair style param not supported");
|
||||||
|
|
||||||
ad->pdim = 2;
|
// for pair styles only parameters that are 2-d arrays in atom types are supported
|
||||||
if (ad->pdim == 0) ad->scalar = (double *) ptr;
|
if (ad->pdim != 2)
|
||||||
if (ad->pdim == 2) ad->array = (double **) ptr;
|
error->all(FLERR,"Fix adapt pair style param is not compatible");
|
||||||
|
else ad->array = (double **) ptr;
|
||||||
|
|
||||||
// if pair hybrid, test that ilo,ihi,jlo,jhi are valid for sub-style
|
// if pair hybrid, test that ilo,ihi,jlo,jhi are valid for sub-style
|
||||||
|
|
||||||
if (ad->pdim == 2 && (strcmp(force->pair_style,"hybrid") == 0 ||
|
if (strcmp(force->pair_style,"hybrid") == 0 ||
|
||||||
strcmp(force->pair_style,"hybrid/overlay") == 0)) {
|
strcmp(force->pair_style,"hybrid/overlay") == 0) {
|
||||||
PairHybrid *pair = (PairHybrid *) force->pair;
|
PairHybrid *pair = (PairHybrid *) force->pair;
|
||||||
for (i = ad->ilo; i <= ad->ihi; i++)
|
for (i = ad->ilo; i <= ad->ihi; i++)
|
||||||
for (j = MAX(ad->jlo,i); j <= ad->jhi; j++)
|
for (j = MAX(ad->jlo,i); j <= ad->jhi; j++)
|
||||||
@ -515,8 +518,14 @@ void FixAdapt::change_settings()
|
|||||||
// re-initialize pair styles if any PAIR settings were changed
|
// re-initialize pair styles if any PAIR settings were changed
|
||||||
// this resets other coeffs that may depend on changed values,
|
// this resets other coeffs that may depend on changed values,
|
||||||
// and also offset and tail corrections
|
// and also offset and tail corrections
|
||||||
|
if (anypair) {
|
||||||
if (anypair) force->pair->reinit();
|
for (int m = 0; m < nadapt; m++) {
|
||||||
|
Adapt *ad = &adapt[m];
|
||||||
|
if (ad->which == PAIR) {
|
||||||
|
ad->pair->reinit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// reset KSpace charges if charges have changed
|
// reset KSpace charges if charges have changed
|
||||||
|
|
||||||
|
|||||||
@ -57,6 +57,7 @@ class FixAdapt : public Fix {
|
|||||||
double *scalar,scalar_orig;
|
double *scalar,scalar_orig;
|
||||||
double **array,**array_orig;
|
double **array,**array_orig;
|
||||||
int aparam;
|
int aparam;
|
||||||
|
class Pair *pair;
|
||||||
};
|
};
|
||||||
|
|
||||||
Adapt *adapt;
|
Adapt *adapt;
|
||||||
@ -99,6 +100,10 @@ E: Fix adapt pair style param not supported
|
|||||||
|
|
||||||
The pair style does not know about the parameter you specified.
|
The pair style does not know about the parameter you specified.
|
||||||
|
|
||||||
|
E: Fix adapt pair style param is not compatible
|
||||||
|
|
||||||
|
Self-explanatory
|
||||||
|
|
||||||
E: Fix adapt type pair range is not valid for pair hybrid sub-style
|
E: Fix adapt type pair range is not valid for pair hybrid sub-style
|
||||||
|
|
||||||
Self-explanatory.
|
Self-explanatory.
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
#define LMP_MPIIO_H
|
#define LMP_MPIIO_H
|
||||||
|
|
||||||
// true interface to MPIIO package
|
// true interface to MPIIO package
|
||||||
// used when MPIIO pacakge is installed
|
// used when MPIIO package is installed
|
||||||
|
|
||||||
#ifdef LMP_MPIIO
|
#ifdef LMP_MPIIO
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user