diff --git a/src/BPM/atom_vec_bpm_sphere.cpp b/src/BPM/atom_vec_bpm_sphere.cpp index 2820a74c8a..37a36f4a59 100644 --- a/src/BPM/atom_vec_bpm_sphere.cpp +++ b/src/BPM/atom_vec_bpm_sphere.cpp @@ -35,7 +35,6 @@ AtomVecBPMSphere::AtomVecBPMSphere(LAMMPS *_lmp) : AtomVec(_lmp) radvary = 0; atom->molecule_flag = 1; - atom->sphere_flag = 1; atom->radius_flag = atom->rmass_flag = atom->omega_flag = atom->torque_flag = atom->quat_flag = 1; // strings with peratom variables to include in each AtomVec method diff --git a/src/BPM/bond_bpm_rotational.cpp b/src/BPM/bond_bpm_rotational.cpp index ffb0d9521d..170609254d 100644 --- a/src/BPM/bond_bpm_rotational.cpp +++ b/src/BPM/bond_bpm_rotational.cpp @@ -645,7 +645,7 @@ void BondBPMRotational::init_style() { BondBPM::init_style(); - if (!atom->quat_flag || !atom->sphere_flag) + if (!atom->quat_flag || !atom->radius_flag || !atom->omega_flag) error->all(FLERR, "Bond bpm/rotational requires atom style bpm/sphere"); if (comm->ghost_velocity == 0) error->all(FLERR, "Bond bpm/rotational requires ghost atoms store velocity"); diff --git a/src/BPM/fix_nve_bpm_sphere.cpp b/src/BPM/fix_nve_bpm_sphere.cpp index ceab07822e..51470addd1 100644 --- a/src/BPM/fix_nve_bpm_sphere.cpp +++ b/src/BPM/fix_nve_bpm_sphere.cpp @@ -52,7 +52,7 @@ FixNVEBPMSphere::FixNVEBPMSphere(LAMMPS *_lmp, int narg, char **arg) : FixNVE(_l // error checks - if (!atom->quat_flag || !atom->sphere_flag) + if (!atom->quat_flag || !atom->radius_flag || !atom->omega_flag) error->all(FLERR, "Fix nve/bpm/sphere requires atom style bpm/sphere"); } diff --git a/src/BROWNIAN/fix_brownian_sphere.cpp b/src/BROWNIAN/fix_brownian_sphere.cpp index 220a3b9735..392cba95f5 100644 --- a/src/BROWNIAN/fix_brownian_sphere.cpp +++ b/src/BROWNIAN/fix_brownian_sphere.cpp @@ -41,7 +41,6 @@ FixBrownianSphere::FixBrownianSphere(LAMMPS *lmp, int narg, char **arg) : if (!gamma_t_flag || !gamma_r_flag) { error->all(FLERR, "Illegal fix brownian command."); } if (!atom->mu_flag) error->all(FLERR, "Fix brownian/sphere requires atom attribute mu"); - if (!atom->sphere_flag) error->all(FLERR, "Fix brownian/sphere requires atom style sphere"); } /* ---------------------------------------------------------------------- */ diff --git a/src/COLLOID/fix_wall_colloid.cpp b/src/COLLOID/fix_wall_colloid.cpp index 0637057417..75dc5c797f 100644 --- a/src/COLLOID/fix_wall_colloid.cpp +++ b/src/COLLOID/fix_wall_colloid.cpp @@ -34,7 +34,7 @@ FixWallColloid::FixWallColloid(LAMMPS *lmp, int narg, char **arg) : FixWall(lmp, void FixWallColloid::init() { - if (!atom->sphere_flag) error->all(FLERR, "Fix wall/colloid requires atom style sphere"); + if (!atom->radius_flag) error->all(FLERR, "Fix wall/colloid requires atom attribute radius"); // ensure all particles in group are extended particles diff --git a/src/COLLOID/pair_brownian.cpp b/src/COLLOID/pair_brownian.cpp index 82be043df0..5577f189a7 100644 --- a/src/COLLOID/pair_brownian.cpp +++ b/src/COLLOID/pair_brownian.cpp @@ -439,7 +439,7 @@ void PairBrownian::coeff(int narg, char **arg) void PairBrownian::init_style() { - if (!atom->sphere_flag) error->all(FLERR, "Pair brownian requires atom style sphere"); + if (!atom->radius_flag) error->all(FLERR, "Pair brownian requires atom attribute radius"); // if newton off, forces between atoms ij will be double computed // using different random numbers diff --git a/src/COLLOID/pair_brownian_poly.cpp b/src/COLLOID/pair_brownian_poly.cpp index 1e04b8dc2a..87ca756afb 100644 --- a/src/COLLOID/pair_brownian_poly.cpp +++ b/src/COLLOID/pair_brownian_poly.cpp @@ -322,8 +322,8 @@ void PairBrownianPoly::init_style() { if (force->newton_pair == 1) error->all(FLERR,"Pair brownian/poly requires newton pair off"); - if (!atom->sphere_flag) - error->all(FLERR,"Pair brownian/poly requires atom style sphere"); + if (!atom->radius_flag) + error->all(FLERR,"Pair brownian/poly requires atom attribute radius"); // ensure all particles are finite-size // for pair hybrid, should limit test to types using the pair style diff --git a/src/COLLOID/pair_lubricate.cpp b/src/COLLOID/pair_lubricate.cpp index 6f07d63bfb..39f4bc549f 100644 --- a/src/COLLOID/pair_lubricate.cpp +++ b/src/COLLOID/pair_lubricate.cpp @@ -531,8 +531,10 @@ void PairLubricate::coeff(int narg, char **arg) void PairLubricate::init_style() { - if (!atom->sphere_flag) - error->all(FLERR,"Pair lubricate requires atom style sphere"); + if (!atom->omega_flag) + error->all(FLERR,"Pair lubricate requires atom attribute omega"); + if (!atom->radius_flag) + error->all(FLERR,"Pair lubricate requires atom attribute radius"); if (comm->ghost_velocity == 0) error->all(FLERR,"Pair lubricate requires ghost atoms store velocity"); diff --git a/src/COLLOID/pair_lubricateU.cpp b/src/COLLOID/pair_lubricateU.cpp index ac1e62c2a2..d23dbb1b2e 100644 --- a/src/COLLOID/pair_lubricateU.cpp +++ b/src/COLLOID/pair_lubricateU.cpp @@ -1764,8 +1764,10 @@ void PairLubricateU::coeff(int narg, char **arg) void PairLubricateU::init_style() { - if (!atom->sphere_flag) - error->all(FLERR,"Pair lubricateU requires atom style sphere"); + if (!atom->omega_flag) + error->all(FLERR,"Pair lubricateU requires atom attribute omega"); + if (!atom->radius_flag) + error->all(FLERR,"Pair lubricateU requires atom attribute radius"); if (comm->ghost_velocity == 0) error->all(FLERR,"Pair lubricateU requires ghost atoms store velocity"); diff --git a/src/COLLOID/pair_lubricateU_poly.cpp b/src/COLLOID/pair_lubricateU_poly.cpp index 297c4e1924..1add41b5d7 100644 --- a/src/COLLOID/pair_lubricateU_poly.cpp +++ b/src/COLLOID/pair_lubricateU_poly.cpp @@ -1126,12 +1126,13 @@ void PairLubricateUPoly::settings(int narg, char **arg) void PairLubricateUPoly::init_style() { if (force->newton_pair == 1) - error->all(FLERR,"Pair lubricateU/poly requires newton pair off"); + error->all(FLERR, "Pair lubricateU/poly requires newton pair off"); if (comm->ghost_velocity == 0) - error->all(FLERR, - "Pair lubricateU/poly requires ghost atoms store velocity"); - if (!atom->sphere_flag) - error->all(FLERR,"Pair lubricate/poly requires atom style sphere"); + error->all(FLERR, "Pair lubricateU/poly requires ghost atoms store velocity"); + if (!atom->omega_flag) + error->all(FLERR, "Pair lubricateU/poly requires atom attribute omega"); + if (!atom->radius_flag) + error->all(FLERR, "Pair lubricateU/poly requires atom attribute radius"); // ensure all particles are finite-size // for pair hybrid, should limit test to types using the pair style @@ -1141,7 +1142,7 @@ void PairLubricateUPoly::init_style() for (int i = 0; i < nlocal; i++) if (radius[i] == 0.0) - error->one(FLERR,"Pair lubricate/poly requires extended particles"); + error->one(FLERR,"Pair lubricateU/poly requires extended particles"); // Set the isotropic constants depending on the volume fraction diff --git a/src/COLLOID/pair_lubricate_poly.cpp b/src/COLLOID/pair_lubricate_poly.cpp index e6a0606e87..286d99aefc 100644 --- a/src/COLLOID/pair_lubricate_poly.cpp +++ b/src/COLLOID/pair_lubricate_poly.cpp @@ -428,12 +428,13 @@ void PairLubricatePoly::compute(int eflag, int vflag) void PairLubricatePoly::init_style() { if (force->newton_pair == 1) - error->all(FLERR,"Pair lubricate/poly requires newton pair off"); + error->all(FLERR, "Pair lubricate/poly requires newton pair off"); if (comm->ghost_velocity == 0) - error->all(FLERR, - "Pair lubricate/poly requires ghost atoms store velocity"); - if (!atom->sphere_flag) - error->all(FLERR,"Pair lubricate/poly requires atom style sphere"); + error->all(FLERR, "Pair lubricate/poly requires ghost atoms store velocity"); + if (!atom->omega_flag) + error->all(FLERR, "Pair lubricate/poly requires atom attribute omega"); + if (!atom->radius_flag) + error->all(FLERR, "Pair lubricate/poly requires atom attribute radius"); // ensure all particles are finite-size // for pair hybrid, should limit test to types using the pair style @@ -443,7 +444,7 @@ void PairLubricatePoly::init_style() for (int i = 0; i < nlocal; i++) if (radius[i] == 0.0) - error->one(FLERR,"Pair lubricate/poly requires extended particles"); + error->one(FLERR,"Pair lubricate/poly requires only extended particles"); neighbor->add_request(this, NeighConst::REQ_FULL); diff --git a/src/COLLOID/pair_yukawa_colloid.cpp b/src/COLLOID/pair_yukawa_colloid.cpp index ad63292e33..37bd4dfd99 100644 --- a/src/COLLOID/pair_yukawa_colloid.cpp +++ b/src/COLLOID/pair_yukawa_colloid.cpp @@ -121,8 +121,8 @@ void PairYukawaColloid::compute(int eflag, int vflag) void PairYukawaColloid::init_style() { - if (!atom->sphere_flag) - error->all(FLERR,"Pair yukawa/colloid requires atom style sphere"); + if (!atom->radius_flag) + error->all(FLERR,"Pair yukawa/colloid requires atom attribute radius"); neighbor->add_request(this); diff --git a/src/EXTRA-FIX/fix_viscous_sphere.cpp b/src/EXTRA-FIX/fix_viscous_sphere.cpp index 5b4dd72231..0eda323c15 100644 --- a/src/EXTRA-FIX/fix_viscous_sphere.cpp +++ b/src/EXTRA-FIX/fix_viscous_sphere.cpp @@ -38,7 +38,7 @@ FixViscousSphere::FixViscousSphere(LAMMPS *_lmp, int narg, char **arg) : { dynamic_group_allow = 1; - if (!atom->sphere_flag) error->all(FLERR, "Fix viscous/sphere requires atom style sphere"); + if (!atom->omega_flag) error->all(FLERR, "Fix viscous/sphere requires atom attribute omega"); if (narg < 4) error->all(FLERR, "Illegal fix viscous/sphere command"); diff --git a/src/GPU/pair_yukawa_colloid_gpu.cpp b/src/GPU/pair_yukawa_colloid_gpu.cpp index c1e785380d..db199a4701 100644 --- a/src/GPU/pair_yukawa_colloid_gpu.cpp +++ b/src/GPU/pair_yukawa_colloid_gpu.cpp @@ -123,7 +123,7 @@ void PairYukawaColloidGPU::compute(int eflag, int vflag) void PairYukawaColloidGPU::init_style() { - if (!atom->sphere_flag) error->all(FLERR, "Pair yukawa/colloid/gpu requires atom style sphere"); + if (!atom->radius_flag) error->all(FLERR, "Pair style yukawa/colloid/gpu requires atom attribute radius"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GRANULAR/compute_contact_atom.cpp b/src/GRANULAR/compute_contact_atom.cpp index 310fdb5a41..9ab0880592 100644 --- a/src/GRANULAR/compute_contact_atom.cpp +++ b/src/GRANULAR/compute_contact_atom.cpp @@ -51,7 +51,7 @@ ComputeContactAtom::ComputeContactAtom(LAMMPS *lmp, int narg, char **arg) : // error checks - if (!atom->sphere_flag) error->all(FLERR, "Compute contact/atom requires atom style sphere"); + if (!atom->radius_flag) error->all(FLERR, "Compute contact/atom requires atom attribute radius"); } /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/fix_damping_cundall.cpp b/src/GRANULAR/fix_damping_cundall.cpp index cf17e91050..e37dde49e3 100644 --- a/src/GRANULAR/fix_damping_cundall.cpp +++ b/src/GRANULAR/fix_damping_cundall.cpp @@ -40,7 +40,7 @@ FixDampingCundall::FixDampingCundall(LAMMPS *_lmp, int narg, char **arg) : { dynamic_group_allow = 1; - if (!atom->sphere_flag) error->all(FLERR, "Fix damping/cundall requires atom style sphere"); + if (!atom->omega_flag) error->all(FLERR, "Fix damping/cundall requires atom attribute omega"); if (narg < 5) error->all(FLERR, "Illegal fix damping/cundall command"); diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 550d2e17db..821ff7d9a4 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -57,8 +57,8 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : { if (narg < 4) error->all(FLERR,"Illegal fix wall/gran command"); - if (!atom->sphere_flag) - error->all(FLERR,"Fix wall/gran requires atom style sphere"); + if (!atom->omega_flag) error->all(FLERR,"Fix wall/gran requires atom attribute omega"); + if (!atom->radius_flag) error->all(FLERR,"Fix wall/gran requires atom attribute radius"); create_attribute = 1; diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index 98191e0564..79bf2b87aa 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -435,10 +435,10 @@ void PairGranHookeHistory::init_style() // error and warning checks - if (!atom->radius_flag || !atom->rmass_flag) - error->all(FLERR, "Pair granular requires atom attributes radius, rmass"); + if (!atom->radius_flag || !atom->rmass_flag || !atom->omega_flag) + error->all(FLERR, "Pair gran/h* requires atom attributes radius, rmass, omega"); if (comm->ghost_velocity == 0) - error->all(FLERR, "Pair granular requires ghost atoms store velocity"); + error->all(FLERR, "Pair gran/h* requires ghost atoms store velocity"); // need a granular neighbor list diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 30f272791e..119feb1c38 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -401,8 +401,8 @@ void PairGranular::init_style() { // error and warning checks - if (!atom->radius_flag || !atom->rmass_flag) - error->all(FLERR,"Pair granular requires atom attributes radius, rmass"); + if (!atom->radius_flag || !atom->rmass_flag || !atom->omega_flag) + error->all(FLERR,"Pair granular requires atom attributes radius, rmass, omega"); if (comm->ghost_velocity == 0) error->all(FLERR,"Pair granular requires ghost atoms store velocity"); diff --git a/src/KOKKOS/fix_wall_gran_old.cpp b/src/KOKKOS/fix_wall_gran_old.cpp index 8c02e6146d..894532ef04 100644 --- a/src/KOKKOS/fix_wall_gran_old.cpp +++ b/src/KOKKOS/fix_wall_gran_old.cpp @@ -68,8 +68,8 @@ FixWallGranOld::FixWallGranOld(LAMMPS *lmp, int narg, char **arg) : { if (narg < 4) error->all(FLERR,"Illegal fix wall/gran command"); - if (!atom->sphere_flag) - error->all(FLERR,"Fix wall/gran requires atom style sphere"); + if (!atom->omega_flag) error->all(FLERR,"Fix {} requires atom attribute omega", style); + if (!atom->radius_flag) error->all(FLERR,"Fix {} requires atom attribute radius", style); create_attribute = 1; limit_damping = 0; diff --git a/src/OPENMP/fix_nh_sphere_omp.cpp b/src/OPENMP/fix_nh_sphere_omp.cpp index 93a674cbce..d1fef64b64 100644 --- a/src/OPENMP/fix_nh_sphere_omp.cpp +++ b/src/OPENMP/fix_nh_sphere_omp.cpp @@ -37,8 +37,8 @@ typedef struct { double x,y,z; } dbl3_t; FixNHSphereOMP::FixNHSphereOMP(LAMMPS *lmp, int narg, char **arg) : FixNHOMP(lmp, narg, arg) { - if (!atom->sphere_flag) - error->all(FLERR,"Fix nvt/nph/npt sphere requires atom style sphere"); + if (!atom->omega_flag) error->all(FLERR,"Fix {} requires atom attribute omega", style); + if (!atom->radius_flag) error->all(FLERR,"Fix {} requires atom attribute radius", style); } /* ---------------------------------------------------------------------- */ diff --git a/src/atom.cpp b/src/atom.cpp index c08df16614..d74ee24950 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -619,7 +619,7 @@ void Atom::set_atomflag_defaults() // identical list as 2nd customization in atom.h labelmapflag = 0; - sphere_flag = ellipsoid_flag = line_flag = tri_flag = body_flag = 0; + ellipsoid_flag = line_flag = tri_flag = body_flag = 0; quat_flag = 0; peri_flag = electron_flag = 0; wavepacket_flag = sph_flag = 0; diff --git a/src/atom.h b/src/atom.h index 548168ac59..2ceecefe5e 100644 --- a/src/atom.h +++ b/src/atom.h @@ -180,7 +180,7 @@ class Atom : protected Pointers { // 1 if variable is used, 0 if not int labelmapflag, types_style; - int sphere_flag, ellipsoid_flag, line_flag, tri_flag, body_flag; + int ellipsoid_flag, line_flag, tri_flag, body_flag; int peri_flag, electron_flag; int wavepacket_flag, sph_flag; diff --git a/src/atom_vec_line.cpp b/src/atom_vec_line.cpp index ff09bed6d0..cd747d0862 100644 --- a/src/atom_vec_line.cpp +++ b/src/atom_vec_line.cpp @@ -44,7 +44,6 @@ AtomVecLine::AtomVecLine(LAMMPS *lmp) : AtomVec(lmp) atom->line_flag = 1; atom->molecule_flag = atom->rmass_flag = 1; atom->radius_flag = atom->omega_flag = atom->torque_flag = 1; - atom->sphere_flag = 1; nlocal_bonus = nghost_bonus = nmax_bonus = 0; bonus = nullptr; diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index 8769c316d9..7a88190be3 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -32,7 +32,6 @@ AtomVecSphere::AtomVecSphere(LAMMPS *lmp) : AtomVec(lmp) molecular = Atom::ATOMIC; radvary = 0; - atom->sphere_flag = 1; atom->radius_flag = atom->rmass_flag = atom->omega_flag = atom->torque_flag = 1; // strings with peratom variables to include in each AtomVec method diff --git a/src/atom_vec_tri.cpp b/src/atom_vec_tri.cpp index a46609b02c..205e94d792 100644 --- a/src/atom_vec_tri.cpp +++ b/src/atom_vec_tri.cpp @@ -47,7 +47,6 @@ AtomVecTri::AtomVecTri(LAMMPS *lmp) : AtomVec(lmp) atom->molecule_flag = atom->rmass_flag = 1; atom->radius_flag = atom->omega_flag = atom->angmom_flag = 1; atom->torque_flag = 1; - atom->sphere_flag = 1; nlocal_bonus = nghost_bonus = nmax_bonus = 0; bonus = nullptr; diff --git a/src/compute_erotate_sphere.cpp b/src/compute_erotate_sphere.cpp index b020fc4e0e..ff0474230d 100644 --- a/src/compute_erotate_sphere.cpp +++ b/src/compute_erotate_sphere.cpp @@ -34,7 +34,7 @@ ComputeERotateSphere::ComputeERotateSphere(LAMMPS *lmp, int narg, char **arg) : // error check - if (!atom->sphere_flag) error->all(FLERR, "Compute erotate/sphere requires atom style sphere"); + if (!atom->omega_flag) error->all(FLERR, "Compute erotate/sphere requires atom attribute omega"); } /* ---------------------------------------------------------------------- */ diff --git a/src/compute_erotate_sphere_atom.cpp b/src/compute_erotate_sphere_atom.cpp index 3ec0f402a8..8000300485 100644 --- a/src/compute_erotate_sphere_atom.cpp +++ b/src/compute_erotate_sphere_atom.cpp @@ -40,8 +40,10 @@ ComputeErotateSphereAtom(LAMMPS *lmp, int narg, char **arg) : // error check - if (!atom->sphere_flag) - error->all(FLERR,"Compute erotate/sphere/atom requires atom style sphere"); + if (!atom->omega_flag) + error->all(FLERR,"Compute erotate/sphere/atom requires atom attribute omega"); + if (!atom->radius_flag) + error->all(FLERR,"Compute erotate/sphere/atom requires atom attribute radius"); nmax = 0; } diff --git a/src/compute_temp_sphere.cpp b/src/compute_temp_sphere.cpp index 0cfc9a93ba..56a22366c1 100644 --- a/src/compute_temp_sphere.cpp +++ b/src/compute_temp_sphere.cpp @@ -73,8 +73,10 @@ ComputeTempSphere::ComputeTempSphere(LAMMPS *lmp, int narg, char **arg) : // error checks - if (!atom->sphere_flag) - error->all(FLERR,"Compute temp/sphere requires atom style sphere"); + if (!atom->omega_flag) + error->all(FLERR,"Compute temp/sphere requires atom attribute omega"); + if (!atom->radius_flag) + error->all(FLERR,"Compute temp/sphere requires atom attribute radius"); } /* ---------------------------------------------------------------------- */ diff --git a/src/fix_langevin.cpp b/src/fix_langevin.cpp index 35bffb24fa..7d968330fb 100644 --- a/src/fix_langevin.cpp +++ b/src/fix_langevin.cpp @@ -240,8 +240,10 @@ void FixLangevin::init() if (flag) error->all(FLERR, "Fix langevin gjf should come before fix nve"); } - if (oflag && !atom->sphere_flag) - error->all(FLERR, "Fix langevin omega requires atom style sphere"); + if (oflag && !atom->omega_flag) + error->all(FLERR, "Fix langevin omega requires atom attribute omega"); + if (oflag && !atom->radius_flag) + error->all(FLERR, "Fix langevin omega requires atom attribute radius"); if (ascale && !atom->ellipsoid_flag) error->all(FLERR, "Fix langevin angmom requires atom style ellipsoid"); diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index 562ca51c29..6528488eb2 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -442,10 +442,16 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Invalid fix {} pressure settings", style); if (dipole_flag) { - if (!atom->sphere_flag) - error->all(FLERR,"Using update dipole flag requires atom style sphere"); - if (!atom->mu_flag) - error->all(FLERR,"Using update dipole flag requires atom attribute mu"); + if (strstr(style, "/sphere")) { + if (!atom->omega_flag) + error->all(FLERR,"Using update dipole flag requires atom attribute omega"); + if (!atom->radius_flag) + error->all(FLERR,"Using update dipole flag requires atom attribute radius"); + if (!atom->mu_flag) + error->all(FLERR,"Using update dipole flag requires atom attribute mu"); + } else { + error->all(FLERR, "Must use a '/sphere' Nose-Hoover fix style for updating dipoles"); + } } if ((tstat_flag && t_period <= 0.0) || diff --git a/src/fix_nh_sphere.cpp b/src/fix_nh_sphere.cpp index f39de6c656..0e427763e7 100644 --- a/src/fix_nh_sphere.cpp +++ b/src/fix_nh_sphere.cpp @@ -36,8 +36,10 @@ using namespace MathExtra; FixNHSphere::FixNHSphere(LAMMPS *lmp, int narg, char **arg) : FixNH(lmp, narg, arg) { - if (!atom->sphere_flag) - error->all(FLERR,"Fix nvt/nph/npt sphere requires atom style sphere"); + if (!atom->omega_flag) + error->all(FLERR,"Fix {} requires atom attribute omega", style); + if (!atom->radius_flag) + error->all(FLERR,"Fix {} requires atom attribute radius", style); // inertia = moment of inertia prefactor for sphere or disc diff --git a/src/fix_nve_sphere.cpp b/src/fix_nve_sphere.cpp index ea57028af4..21520d7a69 100644 --- a/src/fix_nve_sphere.cpp +++ b/src/fix_nve_sphere.cpp @@ -68,8 +68,8 @@ FixNVESphere::FixNVESphere(LAMMPS *lmp, int narg, char **arg) : // error checks - if (!atom->sphere_flag) - error->all(FLERR,"Fix nve/sphere requires atom style sphere"); + if (!atom->omega_flag) + error->all(FLERR,"Fix nve/sphere requires atom attribute omega"); if (extra == DIPOLE && !atom->mu_flag) error->all(FLERR,"Fix nve/sphere update dipole requires atom attribute mu"); } diff --git a/src/fix_wall_region.cpp b/src/fix_wall_region.cpp index da9ee757d9..5eea760b8b 100644 --- a/src/fix_wall_region.cpp +++ b/src/fix_wall_region.cpp @@ -127,7 +127,7 @@ void FixWallRegion::init() // ensure all particles in group are extended particles if (style == COLLOID) { - if (!atom->sphere_flag) error->all(FLERR, "Fix wall/region colloid requires atom style sphere"); + if (!atom->radius_flag) error->all(FLERR, "Fix wall/region colloid requires atom attribute radius"); double *radius = atom->radius; int *mask = atom->mask; @@ -140,7 +140,7 @@ void FixWallRegion::init() int flagall; MPI_Allreduce(&flag, &flagall, 1, MPI_INT, MPI_SUM, world); - if (flagall) error->all(FLERR, "Fix wall/region colloid requires extended particles"); + if (flagall) error->all(FLERR, "Fix wall/region colloid requires only extended particles"); } // setup coefficients for each style diff --git a/src/library.cpp b/src/library.cpp index a629df7b8c..e123cd3ab8 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -1265,8 +1265,6 @@ internally by the :doc:`Fortran interface ` and are not likely to be us - 1 if the atom style includes per-atom masses, 0 if there are per-type masses. See :doc:`atom_style`. * - radius_flag - 1 if the atom style includes a per-atom radius. See :doc:`atom_style`. - * - sphere_flag - - 1 if the atom style describes extended particles that can rotate. See :doc:`atom_style`. * - ellipsoid_flag - 1 if the atom style describes extended particles that may be ellipsoidal. See :doc:`atom_style`. * - omega_flag @@ -1333,7 +1331,7 @@ int lammps_extract_setting(void *handle, const char *keyword) if (strcmp(keyword,"mu_flag") == 0) return lmp->atom->mu_flag; if (strcmp(keyword,"rmass_flag") == 0) return lmp->atom->rmass_flag; if (strcmp(keyword,"radius_flag") == 0) return lmp->atom->radius_flag; - if (strcmp(keyword,"sphere_flag") == 0) return lmp->atom->sphere_flag; + if (strcmp(keyword,"ellipsoid_flag") == 0) return lmp->atom->ellipsoid_flag; if (strcmp(keyword,"omega_flag") == 0) return lmp->atom->omega_flag; if (strcmp(keyword,"torque_flag") == 0) return lmp->atom->torque_flag; diff --git a/unittest/c-library/test_library_properties.cpp b/unittest/c-library/test_library_properties.cpp index 40d0d08575..4f5cd97d1f 100644 --- a/unittest/c-library/test_library_properties.cpp +++ b/unittest/c-library/test_library_properties.cpp @@ -335,7 +335,7 @@ TEST_F(LibraryProperties, setting) EXPECT_EQ(lammps_extract_setting(lmp, "mu_flag"), 0); EXPECT_EQ(lammps_extract_setting(lmp, "rmass_flag"), 0); EXPECT_EQ(lammps_extract_setting(lmp, "radius_flag"), 0); - EXPECT_EQ(lammps_extract_setting(lmp, "sphere_flag"), 0); + EXPECT_EQ(lammps_extract_setting(lmp, "sphere_flag"), -1); EXPECT_EQ(lammps_extract_setting(lmp, "ellipsoid_flag"), 0); EXPECT_EQ(lammps_extract_setting(lmp, "omega_flag"), 0); EXPECT_EQ(lammps_extract_setting(lmp, "torque_flag"), 0); diff --git a/unittest/formats/test_atom_styles.cpp b/unittest/formats/test_atom_styles.cpp index 4ad571f9fa..0a36ad8c0d 100644 --- a/unittest/formats/test_atom_styles.cpp +++ b/unittest/formats/test_atom_styles.cpp @@ -156,7 +156,6 @@ struct AtomState { int extra_dihedral_per_atom = 0; int extra_improper_per_atom = 0; - int sphere_flag = 0; int ellipsoid_flag = 0; int line_flag = 0; int tri_flag = 0; @@ -293,7 +292,6 @@ void ASSERT_ATOM_STATE_EQ(Atom *atom, const AtomState &expected) ASSERT_EQ(atom->extra_dihedral_per_atom, expected.extra_dihedral_per_atom); ASSERT_EQ(atom->extra_improper_per_atom, expected.extra_improper_per_atom); - ASSERT_EQ(atom->sphere_flag, expected.sphere_flag); ASSERT_EQ(atom->ellipsoid_flag, expected.ellipsoid_flag); ASSERT_EQ(atom->line_flag, expected.line_flag); ASSERT_EQ(atom->tri_flag, expected.tri_flag); @@ -882,7 +880,6 @@ TEST_F(AtomStyleTest, sphere) expected.atom_style = "sphere"; expected.molecular = Atom::ATOMIC; expected.tag_enable = 1; - expected.sphere_flag = 1; expected.rmass_flag = 1; expected.radius_flag = 1; expected.omega_flag = 1; @@ -1391,7 +1388,6 @@ TEST_F(AtomStyleTest, line) expected.atom_style = "line"; expected.molecular = Atom::ATOMIC; expected.tag_enable = 1; - expected.sphere_flag = 1; expected.molecule_flag = 1; expected.line_flag = 1; expected.rmass_flag = 1; @@ -1661,7 +1657,6 @@ TEST_F(AtomStyleTest, tri) expected.atom_style = "tri"; expected.molecular = Atom::ATOMIC; expected.tag_enable = 1; - expected.sphere_flag = 1; expected.molecule_flag = 1; expected.tri_flag = 1; expected.rmass_flag = 1;