Commit 7aa70023 authored by Ryan S. Elliott's avatar Ryan S. Elliott
Browse files

Added check & error for KIM/LAMMPSvirial argument

parent 9962f941
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -308,7 +308,17 @@ void PairKIM::settings(int narg, char **arg)
   ++settings_call_count;
   init_style_call_count = 0;

   if (narg != 1) error->all(FLERR,"Illegal pair_style command");
   if (narg != 1)
   {
     if ((narg > 0) && ((0 == strcmp("KIMvirial", argv[0])) ||
                        (0 == strcmp("LAMMPSvirial", argv[0]))))
     {
       error->all(FLERR,"'KIMvirial' or 'LAMMPSvirial' not supported with "
                  "kim-api-v2.");
     }
     else
       error->all(FLERR,"Illegal pair_style command");
   }
   // arg[0] is the KIM Model name

   lmps_using_molecular = (atom->molecular > 0);
+4 −0
Original line number Diff line number Diff line
@@ -179,6 +179,10 @@ E: KIM Compute returned error

The KIM model was unable, for some reason, to complete the computation.

E: 'KIMvirial' or 'LAMMPSvirial' not supported with kim-api-v2.

"KIMvirial or "LAMMPSvirial" found on the pair_style line.  These keys are not supported kim-api-v2. (The virial computation is always performed by LAMMPS.) Please remove these keys, make sure the KIM model you are using supports kim-api-v2, and rerun.

E: Illegal pair_style command

Self-explanatory.