error out in compute ave/sphere/atom and efield/wolf/atom with multi-cutoff neighborlists
This commit is contained in:
@ -102,6 +102,8 @@ This compute is part of the EXTRA-COMPUTE package. It is only enabled
|
|||||||
if LAMMPS was built with that package. See the :doc:`Build package
|
if LAMMPS was built with that package. See the :doc:`Build package
|
||||||
<Build_package>` page for more info.
|
<Build_package>` page for more info.
|
||||||
|
|
||||||
|
This compute requires :doc:`neighbor styles 'bin' or 'nsq' <neighbor>`.
|
||||||
|
|
||||||
Related commands
|
Related commands
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|
||||||
|
|||||||
@ -106,6 +106,8 @@ Restrictions
|
|||||||
This compute is part of the EXTRA-COMPUTE package. It is only enabled if
|
This compute is part of the EXTRA-COMPUTE package. It is only enabled if
|
||||||
LAMMPS was built with that package.
|
LAMMPS was built with that package.
|
||||||
|
|
||||||
|
This compute requires :doc:`neighbor styles 'bin' or 'nsq' <neighbor>`.
|
||||||
|
|
||||||
Related commands
|
Related commands
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace MathConst;
|
using MathConst::MY_PI;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -108,6 +108,9 @@ void ComputeAveSphereAtom::init()
|
|||||||
else
|
else
|
||||||
volume = MY_PI * cutsq;
|
volume = MY_PI * cutsq;
|
||||||
|
|
||||||
|
if ((neighbor->style == Neighbor::MULTI) || (neighbor->style == Neighbor::MULTI_OLD))
|
||||||
|
error->all(FLERR, "Compute ave/sphere/atom requires neighbor style 'bin' or 'nsq'");
|
||||||
|
|
||||||
// need an occasional full neighbor list
|
// need an occasional full neighbor list
|
||||||
|
|
||||||
auto req = neighbor->add_request(this, NeighConst::REQ_FULL | NeighConst::REQ_OCCASIONAL);
|
auto req = neighbor->add_request(this, NeighConst::REQ_FULL | NeighConst::REQ_OCCASIONAL);
|
||||||
|
|||||||
@ -92,7 +92,11 @@ void ComputeEfieldWolfAtom::init()
|
|||||||
if (atom->mu_flag && (comm->me == 0))
|
if (atom->mu_flag && (comm->me == 0))
|
||||||
error->warning(FLERR, "Compute efield/wolf/atom does not support per-atom dipoles");
|
error->warning(FLERR, "Compute efield/wolf/atom does not support per-atom dipoles");
|
||||||
|
|
||||||
// need an occasional full neighbor list
|
if ((neighbor->style == Neighbor::MULTI) || (neighbor->style == Neighbor::MULTI_OLD))
|
||||||
|
error->all(FLERR, "Compute efield/wolf/atom requires neighbor style 'bin' or 'nsq'");
|
||||||
|
|
||||||
|
// request an occasional full neighbor list
|
||||||
|
|
||||||
auto req = neighbor->add_request(this, NeighConst::REQ_FULL | NeighConst::REQ_OCCASIONAL);
|
auto req = neighbor->add_request(this, NeighConst::REQ_FULL | NeighConst::REQ_OCCASIONAL);
|
||||||
if (cutoff_flag) req->set_cutoff(cutoff);
|
if (cutoff_flag) req->set_cutoff(cutoff);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user