Using qeq/reax fix_modify energy in recent versions of LAMMPS

In previous versions of LAMMPS (e.g. 31 Mar 2017), I have used:

fix qeq all qeq/reax 1 0.0 10.0 1e-6 reax/c

fix_modify qeq energy yes

As I understood, this included the qeq potential energy in the total potential energy of the system (necessary for minimizations).

However, when running conda-forge/osx-64::lammps-2019.06.05-py36_openmpi_5,

I get the following error:

an error is raised: ERROR: Illegal fix_modify command (src/fix.cpp:147)

Last command: fix_modify qeq energy yes

Is this an expected change to the code and/or is the fix_modify actually required?

Kind Regards,

In previous versions of LAMMPS (e.g. 31 Mar 2017), I have used:

fix qeq all qeq/reax 1 0.0 10.0 1e-6 reax/c

fix_modify qeq energy yes

As I understood, this included the qeq potential energy in the total potential energy of the system (necessary for minimizations).

sorry, but the charge equilibration of fix qeq does not add/remove any potential energy. it modifies the charges and their contribution to the potential energy is included when computing the ReaxFF pair style.

However, when running conda-forge/osx-64::lammps-2019.06.05-py36_openmpi_5,

I get the following error:

an error is raised: ERROR: Illegal fix_modify command (src/fix.cpp:147)

Last command: fix_modify qeq energy yes

Is this an expected change to the code and/or is the fix_modify actually required?

this is the behavior i would expect.

axel.

What would trigger this error is if fix qeq/reax did not set the THERMO_ENERGY mask
to indicate it provided a contribution to the thermo output of energy. Which
it does not currently. Axel, did that change in a newer version (since Mar 2017) ?

Steve

What would trigger this error is if fix qeq/reax did not set the THERMO_ENERGY mask
to indicate it provided a contribution to the thermo output of energy. Which
it does not currently. Axel, did that change in a newer version (since Mar 2017) ?

there has been only one change to FixQEqReax::setmask() since 2010 and that was the addition of the PRE_FORCE_RESPA flag.

however, the fix_modify code was augmented in 09/2017 to allow for virial contributions from fixes and in that change set, “fix_modify energy yes” would include a check if TERMO_ENERGY is set, which it previously didn’t.

as i mentioned before, fix qeq does not change the energy directly, it adjusts the charges (in Fix::pre_force()) that are then used in the force/energy computation in the pair style where the energy contributions from the modified charges are properly accounted for. thus using fix_modify thermo yes makes no sense and should be dropped.

axel.