diff --git a/src/ML-SNAP/pair_sna_grid.cpp b/src/ML-SNAP/pair_sna_grid.cpp index f2176b7520..3bfdcb7e12 100644 --- a/src/ML-SNAP/pair_sna_grid.cpp +++ b/src/ML-SNAP/pair_sna_grid.cpp @@ -205,8 +205,8 @@ void PairSNAGrid::settings(int narg, char ** arg) // process required arguments - memory->create(radelem,ntypes+1,"sna/grid/local:radelem"); // offset by 1 to match up with types - memory->create(wjelem,ntypes+1,"sna/grid/local:wjelem"); + memory->create(radelem,ntypes+1,"pair:sna/grid:radelem"); // offset by 1 to match up with types + memory->create(wjelem,ntypes+1,"pair:sna/grid:wjelem"); rcutfac = atof(arg[0]); rfac0 = atof(arg[1]); @@ -221,7 +221,7 @@ void PairSNAGrid::settings(int narg, char ** arg) double cut; cutmax = 0.0; - memory->create(cutsq,ntypes+1,ntypes+1,"sna/grid/local:cutsq"); + memory->create(cutsq,ntypes+1,ntypes+1,"pair:sna/grid:cutsq"); for(int i = 1; i <= ntypes; i++) { cut = 2.0*radelem[i]*rcutfac; if (cut > cutmax) cutmax = cut; @@ -262,7 +262,7 @@ void PairSNAGrid::settings(int narg, char ** arg) if (iarg+2 > narg) error->all(FLERR,"Illegal pair sna/grid command"); chemflag = 1; - memory->create(map,ntypes+1,"compute_sna_grid_local:map"); + memory->create(map,ntypes+1,"pair:sna/grid:map"); nelements = utils::inumeric(FLERR,arg[iarg+1],false,lmp); for (int i = 0; i < ntypes; i++) { int jelem = utils::inumeric(FLERR,arg[iarg+2+i],false,lmp); diff --git a/src/ML-SNAP/pair_sna_grid.h b/src/ML-SNAP/pair_sna_grid.h index 30b6aa8f92..2216739ce3 100644 --- a/src/ML-SNAP/pair_sna_grid.h +++ b/src/ML-SNAP/pair_sna_grid.h @@ -45,7 +45,6 @@ class PairSNAGrid : public PairGrid { int *map; // map types to [0,nelements) int nelements, chemflag; class SNA *snaptr; - double cutmax; int quadraticflag; }; diff --git a/src/pair_grid.cpp b/src/pair_grid.cpp index 56478ad21f..166d4c258d 100644 --- a/src/pair_grid.cpp +++ b/src/pair_grid.cpp @@ -67,6 +67,7 @@ void PairGrid::init() void PairGrid::setup() { + printf("Hello, world! C\n"); deallocate_grid(); set_grid_global(); set_grid_local(); @@ -297,9 +298,11 @@ void PairGrid::settings(int narg, char ** arg) void PairGrid::coeff(int narg, char **arg) { if (!allocated) allocate(); - if (narg != 2 + atom->ntypes) error->all(FLERR,"Incorrect args for pair coefficients"); + if (narg != 2) error->all(FLERR,"Incorrect args for pair coefficients"); + // if (narg != 2 + atom->ntypes) error->all(FLERR,"Incorrect args for pair coefficients"); - map_element2type(narg-4,arg+4); + // map_element2type(narg-4,arg+4); + // map_element2type(0,nullptr); } @@ -321,13 +324,13 @@ void PairGrid::init_style() } /* ---------------------------------------------------------------------- - init for one type pair i,j and corresponding j,i + return maximum force cut off distance ------------------------------------------------------------------------- */ double PairGrid::init_one(int i, int j) { if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); - return 0.0; + return cutmax; } /* ---------------------------------------------------------------------- diff --git a/src/pair_grid.h b/src/pair_grid.h index 9c40165154..d7aa151633 100644 --- a/src/pair_grid.h +++ b/src/pair_grid.h @@ -57,7 +57,7 @@ class PairGrid : public Pair { int ndesc; // number of descriptors int ndesc_base; // number of columns used for coords, etc. int gridlocal_allocated; // shows if gridlocal allocated - double **beta; // betas for all local grid points in list + double **beta; // betas for all local grid points in list int beta_max; // length of beta void allocate(); // allocate pairstyle arrays diff --git a/src/verlet.cpp b/src/verlet.cpp index b9b0b392e1..385b234a29 100644 --- a/src/verlet.cpp +++ b/src/verlet.cpp @@ -99,6 +99,8 @@ void Verlet::setup(int flag) } } + printf("Hello, world! A\n"); + if (lmp->kokkos) error->all(FLERR,"KOKKOS package requires run_style verlet/kk"); @@ -126,6 +128,8 @@ void Verlet::setup(int flag) modify->setup_post_neighbor(); neighbor->ncalls = 0; + printf("Hello, world! B\n"); + // compute all forces force->setup(); @@ -133,6 +137,8 @@ void Verlet::setup(int flag) force_clear(); modify->setup_pre_force(vflag); + printf("Hello, world!\n"); + if (pair_compute_flag) force->pair->compute(eflag,vflag); else if (force->pair) force->pair->compute_dummy(eflag,vflag);