modernize

This commit is contained in:
Axel Kohlmeyer
2024-03-02 15:53:33 -05:00
parent 45e8ee1c08
commit ccdf55151d

View File

@ -46,7 +46,7 @@ ComputeRDF::ComputeRDF(LAMMPS *lmp, int narg, char **arg) :
hist(nullptr), histall(nullptr), typecount(nullptr), icount(nullptr), jcount(nullptr),
duplicates(nullptr)
{
if (narg < 4) error->all(FLERR,"Illegal compute rdf command");
if (narg < 4) utils::missing_cmd_args(FLERR,"compute rdf", error);
array_flag = 1;
extarray = 0;
@ -67,14 +67,14 @@ ComputeRDF::ComputeRDF(LAMMPS *lmp, int narg, char **arg) :
while (iarg < narg) {
if (strcmp(arg[iarg],"cutoff") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal compute rdf command");
if (iarg+2 > narg) utils::missing_cmd_args(FLERR,"compute rdf cutoff", error);
if ((neighbor->style == Neighbor::MULTI) || (neighbor->style == Neighbor::MULTI_OLD))
error->all(FLERR, "Compute rdf with custom cutoff requires neighbor style 'bin' or 'nsq'");
cutoff_user = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (cutoff_user <= 0.0) cutflag = 0;
else cutflag = 1;
iarg += 2;
} else error->all(FLERR,"Illegal compute rdf command");
} else error->all(FLERR,"Unknown compute rdf keyword {}", arg[iarg]);
}
// pairwise args
@ -160,8 +160,7 @@ void ComputeRDF::init()
{
if (!force->pair && !cutflag)
error->all(FLERR,"Compute rdf requires a pair style be defined "
"or cutoff specified");
error->all(FLERR,"Compute rdf requires a pair style or an explicit cutoff");
if (cutflag) {
double skin = neighbor->skin;