simplify hybrid coeff parsing. check for number is already done with conversion
This commit is contained in:
@ -468,10 +468,7 @@ void PairHybrid::coeff(int narg, char **arg)
|
||||
if (multiple[m]) {
|
||||
multflag = 1;
|
||||
if (narg < 4) error->all(FLERR,"Incorrect args for pair coefficients");
|
||||
if (!isdigit(arg[3][0]))
|
||||
error->all(FLERR,"Incorrect args for pair coefficients");
|
||||
int index = utils::inumeric(FLERR,arg[3],false,lmp);
|
||||
if (index == multiple[m]) break;
|
||||
if (multiple[m] == utils::inumeric(FLERR,arg[3],false,lmp)) break;
|
||||
else continue;
|
||||
} else break;
|
||||
}
|
||||
@ -492,7 +489,7 @@ void PairHybrid::coeff(int narg, char **arg)
|
||||
|
||||
// invoke sub-style coeff() starting with 1st remaining arg
|
||||
|
||||
if (!none) styles[m]->coeff(narg-1-multflag,&arg[1+multflag]);
|
||||
if (!none) styles[m]->coeff(narg-1-multflag,arg+1+multflag);
|
||||
|
||||
// if sub-style only allows one pair coeff call (with * * and type mapping)
|
||||
// then unset setflag/map assigned to that style before setting it below
|
||||
|
||||
Reference in New Issue
Block a user