fix bug in compute orientorder/atom argument parsing

This commit is contained in:
Axel Kohlmeyer
2017-06-10 04:35:11 -04:00
parent 0ecdb99885
commit dd44189d1f

View File

@ -102,23 +102,22 @@ ComputeOrientOrderAtom::ComputeOrientOrderAtom(LAMMPS *lmp, int narg, char **arg
if (qlist[iw] > qmax) qmax = qlist[iw];
}
iarg += nqlist;
if (strcmp(arg[iarg],"components") == 0) {
qlcompflag = 1;
if (iarg+2 > narg)
error->all(FLERR,"Illegal compute orientorder/atom command");
qlcomp = force->numeric(FLERR,arg[iarg+1]);
if (qlcomp <= 0)
error->all(FLERR,"Illegal compute orientorder/atom command");
iqlcomp = -1;
for (int iw = 0; iw < nqlist; iw++)
if (qlcomp == qlist[iw]) {
iqlcomp = iw;
break;
}
if (iqlcomp < 0)
error->all(FLERR,"Illegal compute orientorder/atom command");
iarg += 2;
}
} else if (strcmp(arg[iarg],"components") == 0) {
qlcompflag = 1;
if (iarg+2 > narg)
error->all(FLERR,"Illegal compute orientorder/atom command");
qlcomp = force->numeric(FLERR,arg[iarg+1]);
if (qlcomp <= 0)
error->all(FLERR,"Illegal compute orientorder/atom command");
iqlcomp = -1;
for (int iw = 0; iw < nqlist; iw++)
if (qlcomp == qlist[iw]) {
iqlcomp = iw;
break;
}
if (iqlcomp < 0)
error->all(FLERR,"Illegal compute orientorder/atom command");
iarg += 2;
} else if (strcmp(arg[iarg],"cutoff") == 0) {
if (iarg+2 > narg)
error->all(FLERR,"Illegal compute orientorder/atom command");