diff --git a/src/compute_orientorder_atom.cpp b/src/compute_orientorder_atom.cpp index 43f13ecc32607a3e49dd2028fb4c8c072b439920..90e2830e39e55881884bb6cb57f137ec387f62bf 100644 --- a/src/compute_orientorder_atom.cpp +++ b/src/compute_orientorder_atom.cpp @@ -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");