more docs

also, relax I <= J requirement for pair_coeff, as 'required' by type labels
This commit is contained in:
jrgissing
2021-01-30 21:22:49 -05:00
parent e3a6afe1ab
commit 2ee6e8f582
9 changed files with 126 additions and 45 deletions

View File

@ -1753,6 +1753,22 @@ void Input::pair_coeff()
error->all(FLERR,"Pair_coeff command before pair_style is defined");
readtype(arg[0],atom->ATOM);
readtype(arg[1],atom->ATOM);
// if arg[1] < arg[0], and neither contain a wildcard, reorder
int itype,jtype;
int *ptr;
char *str;
if (strchr(arg[0],'*') == nullptr && strchr(arg[1],'*') == nullptr) {
itype = utils::numeric(FLERR,arg[0],false,lmp);
jtype = utils::numeric(FLERR,arg[1],false,lmp);
if (jtype < itype) {
str = arg[0];
arg[0] = arg[1];
arg[1] = str;
}
}
force->pair->coeff(narg,arg);
}