git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4010 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -64,7 +64,6 @@ PairBuckCoul::PairBuckCoul(LAMMPS *lmp) : Pair(lmp)
|
||||
#define PAIR_MISSING "Cut-offs missing in pair_style buck/coul"
|
||||
#define PAIR_LJ_OFF "LJ6 off not supported in pair_style buck/coul"
|
||||
#define PAIR_COUL_CUT "Coulombic cut not supported in pair_style buck/coul"
|
||||
#define PAIR_MANY "Too many pair_style buck/coul commands"
|
||||
#define PAIR_LARGEST "Using largest cut-off for buck/coul long long"
|
||||
#define PAIR_MIX "Geometric mixing assumed for 1/r^6 coefficients"
|
||||
|
||||
@ -86,6 +85,8 @@ void PairBuckCoul::options(char **arg, int order)
|
||||
|
||||
void PairBuckCoul::settings(int narg, char **arg)
|
||||
{
|
||||
if (narg != 3 && narg != 4) error->all("Illegal pair_style command");
|
||||
|
||||
ewald_order = 0;
|
||||
ewald_off = 0;
|
||||
options(arg, 6);
|
||||
@ -97,8 +98,8 @@ void PairBuckCoul::settings(int narg, char **arg)
|
||||
if (!((ewald_order^ewald_off)&(1<<1))) error->all(PAIR_COUL_CUT);
|
||||
cut_buck_global = force->numeric(*(arg++));
|
||||
if (*arg&&(ewald_order&0x42==0x42)) error->all(PAIR_CUTOFF);
|
||||
cut_coul = *arg ? force->numeric(*(arg++)) : cut_buck_global;
|
||||
if (*arg) error->all(PAIR_MANY);
|
||||
if (narg == 4) cut_coul = force->numeric(*arg);
|
||||
else cut_coul = cut_buck_global;
|
||||
|
||||
if (allocated) { // reset explicit cuts
|
||||
int i,j;
|
||||
|
||||
@ -63,7 +63,6 @@ PairLJCoul::PairLJCoul(LAMMPS *lmp) : Pair(lmp)
|
||||
#define PAIR_CUTOFF "Only one cut-off allowed when requesting all long"
|
||||
#define PAIR_MISSING "Cut-offs missing in pair_style lj/coul"
|
||||
#define PAIR_COUL_CUT "Coulombic cut not supported in pair_style lj/coul"
|
||||
#define PAIR_MANY "Too many pair_style lj/coul commands"
|
||||
#define PAIR_LARGEST "Using largest cut-off for lj/coul long long"
|
||||
#define PAIR_MIX "Mixing forced for lj coefficients"
|
||||
|
||||
@ -85,6 +84,8 @@ void PairLJCoul::options(char **arg, int order)
|
||||
|
||||
void PairLJCoul::settings(int narg, char **arg)
|
||||
{
|
||||
if (narg != 3 && narg != 4) error->all("Illegal pair_style command");
|
||||
|
||||
ewald_off = 0;
|
||||
ewald_order = 0;
|
||||
options(arg, 6);
|
||||
@ -95,8 +96,8 @@ void PairLJCoul::settings(int narg, char **arg)
|
||||
if (!((ewald_order^ewald_off)&(1<<1))) error->all(PAIR_COUL_CUT);
|
||||
cut_lj_global = force->numeric(*(arg++));
|
||||
if (*arg&&(ewald_order&0x42==0x42)) error->all(PAIR_CUTOFF);
|
||||
cut_coul = *arg ? force->numeric(*(arg++)) : cut_lj_global;
|
||||
if (*arg) error->all(PAIR_MANY);
|
||||
if (narg == 4) cut_coul = force->numeric(*arg);
|
||||
else cut_coul = cut_lj_global;
|
||||
|
||||
if (allocated) { // reset explicit cuts
|
||||
int i,j;
|
||||
|
||||
@ -194,7 +194,8 @@ void PairHybrid::settings(int narg, char **arg)
|
||||
// count sub-styles by skipping numeric args
|
||||
// one exception is 1st arg of style "table", which is non-numeric word
|
||||
// one exception is 1st two args of style "lj/coul", which are non-numeric
|
||||
// one exception is 1st two args of style "lj/coul", which are non-numeric
|
||||
// one exception is 1st two args of style "buck/coul", which are non-numeric
|
||||
// one exception is 1st arg of any "gpu" style, which is non-numeric
|
||||
// need a better way to skip these exceptions
|
||||
|
||||
nstyles = 0;
|
||||
@ -202,6 +203,8 @@ void PairHybrid::settings(int narg, char **arg)
|
||||
while (i < narg) {
|
||||
if (strcmp(arg[i],"table") == 0) i++;
|
||||
if (strcmp(arg[i],"lj/coul") == 0) i += 2;
|
||||
if (strcmp(arg[i],"buck/coul") == 0) i += 2;
|
||||
if (strstr(arg[i],"gpu")) i++;
|
||||
i++;
|
||||
while (i < narg && !isalpha(arg[i][0])) i++;
|
||||
nstyles++;
|
||||
@ -216,6 +219,7 @@ void PairHybrid::settings(int narg, char **arg)
|
||||
// define subset of args for a sub-style by skipping numeric args
|
||||
// one exception is 1st arg of style "table", which is non-numeric
|
||||
// one exception is 1st two args of style "lj/coul", which are non-numeric
|
||||
// one exception is 1st two args of style "buck/coul", which are non-numeric
|
||||
// one exception is 1st arg of any "gpu" style, which is non-numeric
|
||||
// need a better way to skip these exceptions
|
||||
|
||||
@ -235,6 +239,7 @@ void PairHybrid::settings(int narg, char **arg)
|
||||
istyle = i;
|
||||
if (strcmp(arg[i],"table") == 0) i++;
|
||||
if (strcmp(arg[i],"lj/coul") == 0) i += 2;
|
||||
if (strcmp(arg[i],"buck/coul") == 0) i += 2;
|
||||
if (strstr(arg[i],"gpu")) i++;
|
||||
i++;
|
||||
while (i < narg && !isalpha(arg[i][0])) i++;
|
||||
|
||||
Reference in New Issue
Block a user