fix bug in compute orientorder/atom argument parsing
This commit is contained in:
@ -102,23 +102,22 @@ ComputeOrientOrderAtom::ComputeOrientOrderAtom(LAMMPS *lmp, int narg, char **arg
|
|||||||
if (qlist[iw] > qmax) qmax = qlist[iw];
|
if (qlist[iw] > qmax) qmax = qlist[iw];
|
||||||
}
|
}
|
||||||
iarg += nqlist;
|
iarg += nqlist;
|
||||||
if (strcmp(arg[iarg],"components") == 0) {
|
} else if (strcmp(arg[iarg],"components") == 0) {
|
||||||
qlcompflag = 1;
|
qlcompflag = 1;
|
||||||
if (iarg+2 > narg)
|
if (iarg+2 > narg)
|
||||||
error->all(FLERR,"Illegal compute orientorder/atom command");
|
error->all(FLERR,"Illegal compute orientorder/atom command");
|
||||||
qlcomp = force->numeric(FLERR,arg[iarg+1]);
|
qlcomp = force->numeric(FLERR,arg[iarg+1]);
|
||||||
if (qlcomp <= 0)
|
if (qlcomp <= 0)
|
||||||
error->all(FLERR,"Illegal compute orientorder/atom command");
|
error->all(FLERR,"Illegal compute orientorder/atom command");
|
||||||
iqlcomp = -1;
|
iqlcomp = -1;
|
||||||
for (int iw = 0; iw < nqlist; iw++)
|
for (int iw = 0; iw < nqlist; iw++)
|
||||||
if (qlcomp == qlist[iw]) {
|
if (qlcomp == qlist[iw]) {
|
||||||
iqlcomp = iw;
|
iqlcomp = iw;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (iqlcomp < 0)
|
if (iqlcomp < 0)
|
||||||
error->all(FLERR,"Illegal compute orientorder/atom command");
|
error->all(FLERR,"Illegal compute orientorder/atom command");
|
||||||
iarg += 2;
|
iarg += 2;
|
||||||
}
|
|
||||||
} else if (strcmp(arg[iarg],"cutoff") == 0) {
|
} else if (strcmp(arg[iarg],"cutoff") == 0) {
|
||||||
if (iarg+2 > narg)
|
if (iarg+2 > narg)
|
||||||
error->all(FLERR,"Illegal compute orientorder/atom command");
|
error->all(FLERR,"Illegal compute orientorder/atom command");
|
||||||
|
|||||||
Reference in New Issue
Block a user