diff --git a/src/COLLOID/fix_wall_colloid.cpp b/src/COLLOID/fix_wall_colloid.cpp index cae2b62606..c52ae1acb0 100644 --- a/src/COLLOID/fix_wall_colloid.cpp +++ b/src/COLLOID/fix_wall_colloid.cpp @@ -20,6 +20,7 @@ #include "string.h" #include "fix_wall_colloid.h" #include "atom.h" +#include "atom_vec.h" #include "domain.h" #include "update.h" #include "output.h" @@ -104,8 +105,10 @@ int FixWallColloid::setmask() void FixWallColloid::init() { - if (!atom->shape) + if (!atom->avec->shape_type) error->all("Fix wall/colloid requires atom attribute shape"); + if (atom->radius_flag) + error->all("Fix wall/colloid cannot be used with atom attribute diameter"); // insure all particle shapes are spherical @@ -145,6 +148,7 @@ void FixWallColloid::post_force(int vflag) { double **x = atom->x; double **f = atom->f; + double **shape = atom->shape; int *mask = atom->mask; int *type = atom->type; int nlocal = atom->nlocal; @@ -162,7 +166,7 @@ void FixWallColloid::post_force(int vflag) else delta = coord - x[i][dim]; if (delta <= 0.0) continue; if (delta > cutoff) continue; - rad = atom->shape[type[i]][0]; + rad = shape[type[i]][0]; new_coeff2 = coeff2*rad*rad*rad; diam = 2.0*rad; rad2 = rad*rad; diff --git a/src/COLLOID/pair_yukawa_colloid.cpp b/src/COLLOID/pair_yukawa_colloid.cpp index 5e3b8da329..a18eae1e6f 100644 --- a/src/COLLOID/pair_yukawa_colloid.cpp +++ b/src/COLLOID/pair_yukawa_colloid.cpp @@ -19,6 +19,7 @@ #include "stdlib.h" #include "pair_yukawa_colloid.h" #include "atom.h" +#include "atom_vec.h" #include "force.h" #include "comm.h" #include "neighbor.h" @@ -47,6 +48,7 @@ void PairYukawaColloid::compute(int eflag, int vflag) double **x = atom->x; double **f = atom->f; + double **shape = atom->shape; int *type = atom->type; int nlocal = atom->nlocal; int nall = nlocal + atom->nghost; @@ -66,7 +68,7 @@ void PairYukawaColloid::compute(int eflag, int vflag) ytmp = x[i][1]; ztmp = x[i][2]; itype = type[i]; - radi = atom->shape[itype][0]; + radi = shape[itype][0]; jlist = firstneigh[i]; jnum = numneigh[i]; @@ -84,7 +86,7 @@ void PairYukawaColloid::compute(int eflag, int vflag) delz = ztmp - x[j][2]; rsq = delx*delx + dely*dely + delz*delz; jtype = type[j]; - radj = atom->shape[jtype][0]; + radj = shape[jtype][0]; if (rsq < cutsq[itype][jtype]) { r2inv = 1.0/rsq; @@ -124,9 +126,12 @@ void PairYukawaColloid::compute(int eflag, int vflag) void PairYukawaColloid::init_style() { - if (!atom->shape) + if (!atom->avec->shape_type) error->all("Pair yukawa/colloid requires atom attribute shape"); - + if (atom->radius_flag) + error->all("Pair yukawa/colloid cannot be used with " + "atom attribute diameter"); + // insure all particle shapes are spherical for (int i = 1; i <= atom->ntypes; i++)