This commit is contained in:
Axel Kohlmeyer
2021-08-18 18:05:36 -04:00
parent 104fa4624e
commit f6874af7e5
3 changed files with 54 additions and 106 deletions

View File

@ -785,8 +785,8 @@ int DumpVTK::count()
i = ATTRIBUTES + nfield + ithresh; i = ATTRIBUTES + nfield + ithresh;
iwhich = atom->find_custom(id_custom[field2index[i]],flag,cols) iwhich = atom->find_custom(id_custom[field2index[i]],flag,cols)
double **darray = atom->darray[iwhich]; double **darray = atom->darray[iwhich];
ptr = &darray[0][argindex[i]-1]; ptr = &darray[0][argindex[i]-1];
nstride = atom->dcols[iwhich]; nstride = atom->dcols[iwhich];
} }
// unselect atoms that don't meet threshold criterion // unselect atoms that don't meet threshold criterion

View File

@ -122,262 +122,215 @@ ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) :
} else if (strcmp(arg[iarg],"q") == 0) { } else if (strcmp(arg[iarg],"q") == 0) {
if (!atom->q_flag) if (!atom->q_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_q; pack_choice[i] = &ComputePropertyAtom::pack_q;
} else if (strcmp(arg[iarg],"mux") == 0) { } else if (strcmp(arg[iarg],"mux") == 0) {
if (!atom->mu_flag) if (!atom->mu_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_mux; pack_choice[i] = &ComputePropertyAtom::pack_mux;
} else if (strcmp(arg[iarg],"muy") == 0) { } else if (strcmp(arg[iarg],"muy") == 0) {
if (!atom->mu_flag) if (!atom->mu_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_muy; pack_choice[i] = &ComputePropertyAtom::pack_muy;
} else if (strcmp(arg[iarg],"muz") == 0) { } else if (strcmp(arg[iarg],"muz") == 0) {
if (!atom->mu_flag) if (!atom->mu_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_muz; pack_choice[i] = &ComputePropertyAtom::pack_muz;
} else if (strcmp(arg[iarg],"mu") == 0) { } else if (strcmp(arg[iarg],"mu") == 0) {
if (!atom->mu_flag) if (!atom->mu_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_mu; pack_choice[i] = &ComputePropertyAtom::pack_mu;
// pack magnetic variables // pack magnetic variables
} else if (strcmp(arg[iarg],"spx") == 0) { } else if (strcmp(arg[iarg],"spx") == 0) {
if (!atom->sp_flag) if (!atom->sp_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_spx; pack_choice[i] = &ComputePropertyAtom::pack_spx;
} else if (strcmp(arg[iarg],"spy") == 0) { } else if (strcmp(arg[iarg],"spy") == 0) {
if (!atom->sp_flag) if (!atom->sp_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_spy; pack_choice[i] = &ComputePropertyAtom::pack_spy;
} else if (strcmp(arg[iarg],"spz") == 0) { } else if (strcmp(arg[iarg],"spz") == 0) {
if (!atom->sp_flag) if (!atom->sp_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_spz; pack_choice[i] = &ComputePropertyAtom::pack_spz;
} else if (strcmp(arg[iarg],"sp") == 0) { } else if (strcmp(arg[iarg],"sp") == 0) {
if (!atom->sp_flag) if (!atom->sp_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_sp; pack_choice[i] = &ComputePropertyAtom::pack_sp;
} else if (strcmp(arg[iarg],"fmx") == 0) { } else if (strcmp(arg[iarg],"fmx") == 0) {
if (!atom->sp_flag) if (!atom->sp_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_fmx; pack_choice[i] = &ComputePropertyAtom::pack_fmx;
} else if (strcmp(arg[iarg],"fmy") == 0) { } else if (strcmp(arg[iarg],"fmy") == 0) {
if (!atom->sp_flag) if (!atom->sp_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_fmy; pack_choice[i] = &ComputePropertyAtom::pack_fmy;
} else if (strcmp(arg[iarg],"fmz") == 0) { } else if (strcmp(arg[iarg],"fmz") == 0) {
if (!atom->sp_flag) if (!atom->sp_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_fmz; pack_choice[i] = &ComputePropertyAtom::pack_fmz;
// bond count // bond count
} else if (strcmp(arg[iarg],"nbonds") == 0) { } else if (strcmp(arg[iarg],"nbonds") == 0) {
if (!atom->molecule_flag) if (!atom->molecule_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_nbonds; pack_choice[i] = &ComputePropertyAtom::pack_nbonds;
// finite-size particles // finite-size particles
} else if (strcmp(arg[iarg],"radius") == 0) { } else if (strcmp(arg[iarg],"radius") == 0) {
if (!atom->radius_flag) if (!atom->radius_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_radius; pack_choice[i] = &ComputePropertyAtom::pack_radius;
} else if (strcmp(arg[iarg],"diameter") == 0) { } else if (strcmp(arg[iarg],"diameter") == 0) {
if (!atom->radius_flag) if (!atom->radius_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_diameter; pack_choice[i] = &ComputePropertyAtom::pack_diameter;
} else if (strcmp(arg[iarg],"omegax") == 0) { } else if (strcmp(arg[iarg],"omegax") == 0) {
if (!atom->omega_flag) if (!atom->omega_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_omegax; pack_choice[i] = &ComputePropertyAtom::pack_omegax;
} else if (strcmp(arg[iarg],"omegay") == 0) { } else if (strcmp(arg[iarg],"omegay") == 0) {
if (!atom->omega_flag) if (!atom->omega_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_omegay; pack_choice[i] = &ComputePropertyAtom::pack_omegay;
} else if (strcmp(arg[iarg],"omegaz") == 0) { } else if (strcmp(arg[iarg],"omegaz") == 0) {
if (!atom->omega_flag) if (!atom->omega_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_omegaz; pack_choice[i] = &ComputePropertyAtom::pack_omegaz;
} else if (strcmp(arg[iarg],"angmomx") == 0) { } else if (strcmp(arg[iarg],"angmomx") == 0) {
if (!atom->angmom_flag) if (!atom->angmom_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_angmomx; pack_choice[i] = &ComputePropertyAtom::pack_angmomx;
} else if (strcmp(arg[iarg],"angmomy") == 0) { } else if (strcmp(arg[iarg],"angmomy") == 0) {
if (!atom->angmom_flag) if (!atom->angmom_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_angmomy; pack_choice[i] = &ComputePropertyAtom::pack_angmomy;
} else if (strcmp(arg[iarg],"angmomz") == 0) { } else if (strcmp(arg[iarg],"angmomz") == 0) {
if (!atom->angmom_flag) if (!atom->angmom_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_angmomz; pack_choice[i] = &ComputePropertyAtom::pack_angmomz;
} else if (strcmp(arg[iarg],"shapex") == 0) { } else if (strcmp(arg[iarg],"shapex") == 0) {
avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
if (!avec_ellipsoid) error->all(FLERR,"Compute property/atom for " if (!avec_ellipsoid) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_shapex; pack_choice[i] = &ComputePropertyAtom::pack_shapex;
} else if (strcmp(arg[iarg],"shapey") == 0) { } else if (strcmp(arg[iarg],"shapey") == 0) {
avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
if (!avec_ellipsoid) error->all(FLERR,"Compute property/atom for " if (!avec_ellipsoid) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_shapey; pack_choice[i] = &ComputePropertyAtom::pack_shapey;
} else if (strcmp(arg[iarg],"shapez") == 0) { } else if (strcmp(arg[iarg],"shapez") == 0) {
avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
if (!avec_ellipsoid) error->all(FLERR,"Compute property/atom for " if (!avec_ellipsoid) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_shapez; pack_choice[i] = &ComputePropertyAtom::pack_shapez;
} else if (strcmp(arg[iarg],"quatw") == 0) { } else if (strcmp(arg[iarg],"quatw") == 0) {
avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
avec_body = (AtomVecBody *) atom->style_match("body"); avec_body = (AtomVecBody *) atom->style_match("body");
if (!avec_ellipsoid && !avec_body) if (!avec_ellipsoid && !avec_body)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_quatw; pack_choice[i] = &ComputePropertyAtom::pack_quatw;
} else if (strcmp(arg[iarg],"quati") == 0) { } else if (strcmp(arg[iarg],"quati") == 0) {
avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
avec_body = (AtomVecBody *) atom->style_match("body"); avec_body = (AtomVecBody *) atom->style_match("body");
if (!avec_ellipsoid && !avec_body) if (!avec_ellipsoid && !avec_body)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_quati; pack_choice[i] = &ComputePropertyAtom::pack_quati;
} else if (strcmp(arg[iarg],"quatj") == 0) { } else if (strcmp(arg[iarg],"quatj") == 0) {
avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
avec_body = (AtomVecBody *) atom->style_match("body"); avec_body = (AtomVecBody *) atom->style_match("body");
if (!avec_ellipsoid && !avec_body) if (!avec_ellipsoid && !avec_body)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_quatj; pack_choice[i] = &ComputePropertyAtom::pack_quatj;
} else if (strcmp(arg[iarg],"quatk") == 0) { } else if (strcmp(arg[iarg],"quatk") == 0) {
avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
avec_body = (AtomVecBody *) atom->style_match("body"); avec_body = (AtomVecBody *) atom->style_match("body");
if (!avec_ellipsoid && !avec_body) if (!avec_ellipsoid && !avec_body)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_quatk; pack_choice[i] = &ComputePropertyAtom::pack_quatk;
} else if (strcmp(arg[iarg],"tqx") == 0) { } else if (strcmp(arg[iarg],"tqx") == 0) {
if (!atom->torque_flag) if (!atom->torque_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_tqx; pack_choice[i] = &ComputePropertyAtom::pack_tqx;
} else if (strcmp(arg[iarg],"tqy") == 0) { } else if (strcmp(arg[iarg],"tqy") == 0) {
if (!atom->torque_flag) if (!atom->torque_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_tqy; pack_choice[i] = &ComputePropertyAtom::pack_tqy;
} else if (strcmp(arg[iarg],"tqz") == 0) { } else if (strcmp(arg[iarg],"tqz") == 0) {
if (!atom->torque_flag) if (!atom->torque_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_tqz; pack_choice[i] = &ComputePropertyAtom::pack_tqz;
} else if (strcmp(arg[iarg],"end1x") == 0) { } else if (strcmp(arg[iarg],"end1x") == 0) {
avec_line = (AtomVecLine *) atom->style_match("line"); avec_line = (AtomVecLine *) atom->style_match("line");
if (!avec_line) error->all(FLERR,"Compute property/atom for " if (!avec_line) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_end1x; pack_choice[i] = &ComputePropertyAtom::pack_end1x;
} else if (strcmp(arg[iarg],"end1y") == 0) { } else if (strcmp(arg[iarg],"end1y") == 0) {
avec_line = (AtomVecLine *) atom->style_match("line"); avec_line = (AtomVecLine *) atom->style_match("line");
if (!avec_line) error->all(FLERR,"Compute property/atom for " if (!avec_line) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_end1y; pack_choice[i] = &ComputePropertyAtom::pack_end1y;
} else if (strcmp(arg[iarg],"end1z") == 0) { } else if (strcmp(arg[iarg],"end1z") == 0) {
avec_line = (AtomVecLine *) atom->style_match("line"); avec_line = (AtomVecLine *) atom->style_match("line");
if (!avec_line) error->all(FLERR,"Compute property/atom for " if (!avec_line) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_end1z; pack_choice[i] = &ComputePropertyAtom::pack_end1z;
} else if (strcmp(arg[iarg],"end2x") == 0) { } else if (strcmp(arg[iarg],"end2x") == 0) {
avec_line = (AtomVecLine *) atom->style_match("line"); avec_line = (AtomVecLine *) atom->style_match("line");
if (!avec_line) error->all(FLERR,"Compute property/atom for " if (!avec_line) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_end2x; pack_choice[i] = &ComputePropertyAtom::pack_end2x;
} else if (strcmp(arg[iarg],"end2y") == 0) { } else if (strcmp(arg[iarg],"end2y") == 0) {
avec_line = (AtomVecLine *) atom->style_match("line"); avec_line = (AtomVecLine *) atom->style_match("line");
if (!avec_line) error->all(FLERR,"Compute property/atom for " if (!avec_line) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_end2y; pack_choice[i] = &ComputePropertyAtom::pack_end2y;
} else if (strcmp(arg[iarg],"end2z") == 0) { } else if (strcmp(arg[iarg],"end2z") == 0) {
avec_line = (AtomVecLine *) atom->style_match("line"); avec_line = (AtomVecLine *) atom->style_match("line");
if (!avec_line) error->all(FLERR,"Compute property/atom for " if (!avec_line) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_end2z; pack_choice[i] = &ComputePropertyAtom::pack_end2z;
} else if (strcmp(arg[iarg],"corner1x") == 0) { } else if (strcmp(arg[iarg],"corner1x") == 0) {
avec_tri = (AtomVecTri *) atom->style_match("tri"); avec_tri = (AtomVecTri *) atom->style_match("tri");
if (!avec_tri) error->all(FLERR,"Compute property/atom for " if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_corner1x; pack_choice[i] = &ComputePropertyAtom::pack_corner1x;
} else if (strcmp(arg[iarg],"corner1y") == 0) { } else if (strcmp(arg[iarg],"corner1y") == 0) {
avec_tri = (AtomVecTri *) atom->style_match("tri"); avec_tri = (AtomVecTri *) atom->style_match("tri");
if (!avec_tri) error->all(FLERR,"Compute property/atom for " if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_corner1y; pack_choice[i] = &ComputePropertyAtom::pack_corner1y;
} else if (strcmp(arg[iarg],"corner1z") == 0) { } else if (strcmp(arg[iarg],"corner1z") == 0) {
avec_tri = (AtomVecTri *) atom->style_match("tri"); avec_tri = (AtomVecTri *) atom->style_match("tri");
if (!avec_tri) error->all(FLERR,"Compute property/atom for " if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_corner1z; pack_choice[i] = &ComputePropertyAtom::pack_corner1z;
} else if (strcmp(arg[iarg],"corner2x") == 0) { } else if (strcmp(arg[iarg],"corner2x") == 0) {
avec_tri = (AtomVecTri *) atom->style_match("tri"); avec_tri = (AtomVecTri *) atom->style_match("tri");
if (!avec_tri) error->all(FLERR,"Compute property/atom for " if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_corner2x; pack_choice[i] = &ComputePropertyAtom::pack_corner2x;
} else if (strcmp(arg[iarg],"corner2y") == 0) { } else if (strcmp(arg[iarg],"corner2y") == 0) {
avec_tri = (AtomVecTri *) atom->style_match("tri"); avec_tri = (AtomVecTri *) atom->style_match("tri");
if (!avec_tri) error->all(FLERR,"Compute property/atom for " if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_corner2y; pack_choice[i] = &ComputePropertyAtom::pack_corner2y;
} else if (strcmp(arg[iarg],"corner2z") == 0) { } else if (strcmp(arg[iarg],"corner2z") == 0) {
avec_tri = (AtomVecTri *) atom->style_match("tri"); avec_tri = (AtomVecTri *) atom->style_match("tri");
if (!avec_tri) error->all(FLERR,"Compute property/atom for " if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_corner2z; pack_choice[i] = &ComputePropertyAtom::pack_corner2z;
} else if (strcmp(arg[iarg],"corner3x") == 0) { } else if (strcmp(arg[iarg],"corner3x") == 0) {
avec_tri = (AtomVecTri *) atom->style_match("tri"); avec_tri = (AtomVecTri *) atom->style_match("tri");
if (!avec_tri) error->all(FLERR,"Compute property/atom for " if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_corner3x; pack_choice[i] = &ComputePropertyAtom::pack_corner3x;
} else if (strcmp(arg[iarg],"corner3y") == 0) { } else if (strcmp(arg[iarg],"corner3y") == 0) {
avec_tri = (AtomVecTri *) atom->style_match("tri"); avec_tri = (AtomVecTri *) atom->style_match("tri");
if (!avec_tri) error->all(FLERR,"Compute property/atom for " if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_corner3y; pack_choice[i] = &ComputePropertyAtom::pack_corner3y;
} else if (strcmp(arg[iarg],"corner3z") == 0) { } else if (strcmp(arg[iarg],"corner3z") == 0) {
avec_tri = (AtomVecTri *) atom->style_match("tri"); avec_tri = (AtomVecTri *) atom->style_match("tri");
if (!avec_tri) error->all(FLERR,"Compute property/atom for " if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_corner3z; pack_choice[i] = &ComputePropertyAtom::pack_corner3z;
} else if (strcmp(arg[iarg],"nbonds") == 0) { } else if (strcmp(arg[iarg],"nbonds") == 0) {
if (!atom->molecule_flag) if (!atom->molecule_flag)
error->all(FLERR,"Compute property/atom for " error->all(FLERR,"Compute property/atom for atom property that isn't allocated");
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_nbonds; pack_choice[i] = &ComputePropertyAtom::pack_nbonds;
// custom per-atom vector // custom per-atom vector

View File

@ -223,16 +223,11 @@ void Modify::init()
list_init_energy_global(n_energy_global,list_energy_global); list_init_energy_global(n_energy_global,list_energy_global);
list_init_energy_atom(n_energy_atom,list_energy_atom); list_init_energy_atom(n_energy_atom,list_energy_atom);
list_init(INITIAL_INTEGRATE_RESPA, list_init(INITIAL_INTEGRATE_RESPA,n_initial_integrate_respa,list_initial_integrate_respa);
n_initial_integrate_respa,list_initial_integrate_respa); list_init(POST_INTEGRATE_RESPA,n_post_integrate_respa,list_post_integrate_respa);
list_init(POST_INTEGRATE_RESPA, list_init(POST_FORCE_RESPA,n_post_force_respa,list_post_force_respa);
n_post_integrate_respa,list_post_integrate_respa); list_init(PRE_FORCE_RESPA,n_pre_force_respa,list_pre_force_respa);
list_init(POST_FORCE_RESPA, list_init(FINAL_INTEGRATE_RESPA,n_final_integrate_respa,list_final_integrate_respa);
n_post_force_respa,list_post_force_respa);
list_init(PRE_FORCE_RESPA,
n_pre_force_respa,list_pre_force_respa);
list_init(FINAL_INTEGRATE_RESPA,
n_final_integrate_respa,list_final_integrate_respa);
list_init(MIN_PRE_EXCHANGE,n_min_pre_exchange,list_min_pre_exchange); list_init(MIN_PRE_EXCHANGE,n_min_pre_exchange,list_min_pre_exchange);
list_init(MIN_PRE_NEIGHBOR,n_min_pre_neighbor,list_min_pre_neighbor); list_init(MIN_PRE_NEIGHBOR,n_min_pre_neighbor,list_min_pre_neighbor);