convert e3b and srp
This commit is contained in:
@ -353,9 +353,7 @@ void PairSRP::settings(int narg, char **arg)
|
||||
if (strcmp(arg[1],"*") == 0) {
|
||||
btype = 0;
|
||||
} else {
|
||||
btype = utils::expand_type_int(FLERR, arg[1], Atom::BOND, lmp);
|
||||
if ((btype > atom->nbondtypes) || (btype <= 0))
|
||||
error->all(FLERR,"Illegal pair_style command");
|
||||
btype_str = arg[1];
|
||||
}
|
||||
|
||||
// settings
|
||||
@ -383,20 +381,10 @@ void PairSRP::settings(int narg, char **arg)
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"bptype") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal pair srp command");
|
||||
bptype = utils::inumeric(FLERR, arg[iarg+1], false, lmp);
|
||||
if ((bptype < 1) || (bptype > atom->ntypes))
|
||||
error->all(FLERR,"Illegal bond particle type for srp");
|
||||
bptype_str = arg[iarg+1];
|
||||
iarg += 2;
|
||||
} else error->all(FLERR,"Illegal pair srp command");
|
||||
}
|
||||
|
||||
// reset cutoffs if explicitly set
|
||||
if (allocated) {
|
||||
int i,j;
|
||||
for (i = 1; i <= bptype; i++)
|
||||
for (j = i; j <= bptype; j++)
|
||||
if (setflag[i][j]) cut[i][j] = cut_global;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -409,6 +397,22 @@ void PairSRP::coeff(int narg, char **arg)
|
||||
error->all(FLERR,"PairSRP: Incorrect args for pair coeff");
|
||||
if (!allocated) allocate();
|
||||
|
||||
btype = utils::expand_type_int(FLERR, btype_str, Atom::BOND, lmp);
|
||||
if ((btype > atom->nbondtypes) || (btype <= 0))
|
||||
error->all(FLERR,"Illegal pair_style command");
|
||||
|
||||
bptype = utils::expand_type_int(FLERR, bptype_str, Atom::ATOM, lmp);
|
||||
if ((bptype < 1) || (bptype > atom->ntypes))
|
||||
error->all(FLERR,"Illegal bond particle type for srp");
|
||||
|
||||
// reset cutoffs if explicitly set
|
||||
if (allocated) {
|
||||
int i,j;
|
||||
for (i = 1; i <= bptype; i++)
|
||||
for (j = i; j <= bptype; j++)
|
||||
if (setflag[i][j]) cut[i][j] = cut_global;
|
||||
}
|
||||
|
||||
// set ij bond-bond cutoffs
|
||||
int ilo, ihi, jlo, jhi;
|
||||
utils::bounds(FLERR,arg[0], 1, bptype, ilo, ihi, error);
|
||||
|
||||
Reference in New Issue
Block a user