Remove optional toggle from pair style commands

This commit is contained in:
Steven Ray Anaya
2022-09-16 14:10:58 -06:00
parent 1655aba5f3
commit 43998570d1
3 changed files with 11 additions and 7 deletions

View File

@ -26,7 +26,7 @@ mass 2 30.98
# choose potential
# Specify MLIAP Unified pair style
pair_style mliap unified mliap_unified_hippynn_InP.pt 0
pair_style mliap unified mliap_unified_hippynn_InP.pt
pair_coeff * * In P
#dump 4 all custom 1 forces.xyz fx fy fz

View File

@ -11,7 +11,7 @@ mass 1 1.0
velocity all create 3.0 87287 loop geom
pair_style mliap unified mliap_unified_lj_Ar.pkl 0
pair_style mliap unified mliap_unified_lj_Ar.pkl
pair_coeff * * Ar
neighbor 0.3 bin

View File

@ -185,15 +185,19 @@ void PairMLIAP::settings(int narg, char ** arg)
} else if (strcmp(arg[iarg], "unified") == 0) {
if (modelflag) error->all(FLERR,"Illegal multiple pair_style mliap model definition");
if (descriptorflag) error->all(FLERR,"Illegal multiple pair_style mliap descriptor definition");
if (iarg+3 > narg) error->all(FLERR,"Illegal pair_style mliap command");
if (iarg+2 > narg) error->all(FLERR,"Illegal pair_style mliap command");
MLIAPBuildUnified_t build = build_unified(arg[iarg+1], data, lmp);
if (strcmp(arg[iarg+2],"0") == 0) {
if (iarg+3 > narg) {
ghostneigh = 0;
} else if (strcmp(arg[iarg+2],"1") == 0) {
ghostneigh = 1;
} else {
error->all(FLERR,"Illegal pair_style mliap command");
if (strcmp(arg[iarg+2],"0") == 0)
ghostneigh = 0;
else if (strcmp(arg[iarg+2],"1") == 0)
ghostneigh = 1;
else
error->all(FLERR,"Illegal pair_style mliap command");
}
iarg += 3;
model = build.model;
descriptor = build.descriptor;