diff --git a/examples/snap/in.grid.pair b/examples/snap/in.grid.pair index 9d21c1f62c..5f70f79d09 100644 --- a/examples/snap/in.grid.pair +++ b/examples/snap/in.grid.pair @@ -58,4 +58,6 @@ pair_style sna/grid grid ${ngrid} ${ngrid} ${ngrid} & quadraticflag ${quad} switchflag ${switch} pair_coeff * * Al +neighbor 0.0 nsq + run 0 diff --git a/src/ML-SNAP/pair_sna_grid.cpp b/src/ML-SNAP/pair_sna_grid.cpp index dc3de8e941..6dc7bc9173 100644 --- a/src/ML-SNAP/pair_sna_grid.cpp +++ b/src/ML-SNAP/pair_sna_grid.cpp @@ -56,17 +56,14 @@ PairSNAGrid::~PairSNAGrid() void PairSNAGrid::init_style() { - if (force->pair == nullptr) - error->all(FLERR,"Pair sna/grid requires a pair style be defined"); + if (force->newton_pair == 0) + error->all(FLERR,"Pair style sna/grid requires newton pair on"); - // need an occasional full neighbor list + // need a full neighbor list int irequest = neighbor->request(this,instance_me); - neighbor->requests[irequest]->pair = 0; - neighbor->requests[irequest]->compute = 1; neighbor->requests[irequest]->half = 0; neighbor->requests[irequest]->full = 1; - neighbor->requests[irequest]->occasional = 1; snaptr = new SNA(lmp, rfac0, twojmax, rmin0, switchflag, bzeroflag, diff --git a/src/pair_grid.cpp b/src/pair_grid.cpp index dd35f75f8c..f76629717b 100644 --- a/src/pair_grid.cpp +++ b/src/pair_grid.cpp @@ -60,6 +60,7 @@ PairGrid::~PairGrid() void PairGrid::setup() { + printf("Inside PairGrid::setup()\n"); printf("Hello, world! C\n"); // deallocate_grid(); printf("Hello, world! D\n"); @@ -317,6 +318,7 @@ void PairGrid::coeff(int narg, char **arg) double PairGrid::init_one(int i, int j) { + printf("Inside PairGrid::init_one()\n"); printf("i = %d j = %d setflag = %d\n", i, j, setflag[i][j]); if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); printf("PairGrid cutmax = %g\n",cutmax);