[lammps-users] Rerunning the simulation with Different Force Field

Hi ,

I am running some simulations in LAMMPS with both Lennard Jones and
Electrostatics interactions turned on. Now I want to turn off Lennard
Jones and only keep electrostatic interactions but with the original
trajectory. The reason for doing this is that I want to decompose my
PMF(Potential of Mean Force) profile into lennard jones and
electrostatic components. This is how I do it in GROMACS.
But I am not sure if this can be done in the same way in LAMMPS or is
there a better way to do it.
Thanks.

Apoorv

Now I want to turn off Lennard
Jones and only keep electrostatic interactions but with the original
trajectory.

I'm not clear on what this means. By original trajectory
do you mean you want to re-run the same calculation as before,
but have no LJ interactions? If so, I don't see how you could
do this, since the forces will be different.

Steve

Now I want to turn off Lennard
Jones and only keep electrostatic interactions but with the original
trajectory.

I'm not clear on what this means. By original trajectory
do you mean you want to re-run the same calculation as before,
but have no LJ interactions? If so, I don't see how you could
do this, since the forces will be different.

steve,

this is common practice with other MD codes like namd and gromacs.

that is just another example for the usefulness of a rerun command.
the same could be used, for example to handle the recurring questions
on how to get the per-atom long-range contributions to the stress tensor:

you run the MD regularly with kspace and then do a re-run on a
subset of the frames with just regular coulomb and a very long
cutoff. this way you get the correct trajectory and a very good
approximation for the local stress, without having to pay too high
a price for the long cutoff.

that all being said, i am wondering if this could also be done with
the python interface (for the time being). initialize the system setup,
then read in coordinates frame by frame through pizza.py and then
update the coordinates and do a run 0 with pre yes to get the
desired decomposed force calculation. in principle one could do
both, lj and coul, in one pass through the trajectory file using
two lammps instances. something that none of the other codes
can do. :wink:

cheers,
    axel.

So by "rerun" you simply mean read in a series of snapshots
(previously dumped), and compute some new quantities on
a shapshot by snapshot basis, not do further time integration?

This could possibly be done thru a Python driver script, invoking
LAMMPS for a series of "run 0" commands. More cleanly,
I think it could be done if there was a read_dump command in
LAMMPS. I started to write one at one point, but there are some
tricky issues with box size/shape changing etc and I didn't finish.

So it's on the "todo" list.

Steve

So by "rerun" you simply mean read in a series of snapshots
(previously dumped), and compute some new quantities on
a shapshot by snapshot basis, not do further time integration?

correct.

This could possibly be done thru a Python driver script, invoking
LAMMPS for a series of "run 0" commands. More cleanly,
I think it could be done if there was a read_dump command in
LAMMPS. I started to write one at one point, but there are some
tricky issues with box size/shape changing etc and I didn't finish.

yup. that is where it gets nasty. :wink:

cheers,
    axel.

So it's on the "todo" list.

Steve

[...]

Yes you are correct.
I will look into pizza.py and try to do this.

Thanks for the help Steve and Axel.

Apoorv