From 45e8ee1c087db0cc53415af8f20904bde36d66bf Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 2 Mar 2024 15:53:21 -0500 Subject: [PATCH] disallow using custom cutoff with multi cutoff neighbor lists --- src/compute_rdf.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compute_rdf.cpp b/src/compute_rdf.cpp index 17fe450fe5..f31c3c5743 100644 --- a/src/compute_rdf.cpp +++ b/src/compute_rdf.cpp @@ -68,6 +68,8 @@ 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 ((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;