fix_pair.cpp: respect lmp->suffix when looking for pair_style name match

This commit is contained in:
Yury Lysogorskiy
2023-01-03 15:58:34 +01:00
parent cfbc2d8894
commit 295d8a6903

View File

@ -36,6 +36,10 @@ FixPair::FixPair(LAMMPS *lmp, int narg, char **arg) :
if (nevery < 1) error->all(FLERR,"Illegal fix pair every value: {}", nevery);
pairname = utils::strdup(arg[4]);
if(lmp->suffix) {
strcat(pairname,"/");
strcat(pairname,lmp->suffix);
}
pstyle = force->pair_match(pairname,1,0);
if (pstyle == nullptr) error->all(FLERR,"Pair style {} for fix pair not found", pairname);