bring back changes from develop that were wiped out

This commit is contained in:
Axel Kohlmeyer
2024-09-10 21:15:37 -04:00
parent 6488fd2a48
commit 2b1bef39e4

View File

@ -60,7 +60,7 @@ FixQEq::FixQEq(LAMMPS *lmp, int narg, char **arg) :
b_t(nullptr), p(nullptr), q(nullptr), r(nullptr), d(nullptr),
qf(nullptr), q1(nullptr), q2(nullptr), qv(nullptr)
{
if (narg < 8) error->all(FLERR,"Illegal fix qeq command");
if (narg < 8) utils::missing_cmd_args(FLERR, "fix " + std::string(style), error);
scalar_flag = 1;
extscalar = 0;
@ -76,6 +76,9 @@ FixQEq::FixQEq(LAMMPS *lmp, int narg, char **arg) :
if ((nevery <= 0) || (cutoff <= 0.0) || (tolerance <= 0.0) || (maxiter <= 0))
error->all(FLERR,"Illegal fix qeq command");
// must have charges
if (!atom->q_flag) error->all(FLERR, "Fix {} requires atom attribute q", style);
alpha = 0.20;
swa = 0.0;
swb = cutoff;
@ -146,7 +149,7 @@ FixQEq::FixQEq(LAMMPS *lmp, int narg, char **arg) :
FixQEq::~FixQEq()
{
// unregister callbacks to this fix from Atom class
atom->delete_callback(id,Atom::GROW);
if (modify->get_fix_by_id(id)) atom->delete_callback(id,Atom::GROW);
memory->destroy(s_hist);
memory->destroy(t_hist);
@ -347,12 +350,6 @@ void FixQEq::setup_pre_force(int vflag)
if (force->newton_pair == 0)
error->all(FLERR,"QEQ with 'newton pair off' not supported");
if (force->pair) {
if (force->pair->suffix_flag & (Suffix::INTEL|Suffix::GPU))
error->all(FLERR,"QEQ is not compatiple with suffix version "
"of pair style");
}
deallocate_storage();
allocate_storage();