[lammps-users] Running LAMMPS simulations backward in time

Dear all,

I am trying to run a LAMMPS simulation of a simple (pairwise interaction only) particle system with viscous friction backward in time. This would mean that the direction of potential forces should be reversed and (viscous) friction should inject, instead of extract energy of the system.

I realised that I can run the simulation with a negative time and negative damping coefficient and the LAMMPS did not complain. However, it seems that nothing changes in trajectories of particles. I do remember trying only time reversal of potential forces on two-particle system and it gave plausible trajectories both in forward and backward case.

Is there a simple way to achieve what I am doing? I tried all 4 combinations (fwd/bwd time and +/- damping coefficient) and trajectories stayed the same. If possible, I wouldn't want to intervene in LAMMPS sources although I could manage some minor changes/additions to the source on my own.

I would appreciate a short description of how damping force is applied as well, ie. is it just added to potential forces or is damping implemented in another way.

Thank you,

Never tried this. You can look at the source code in fix_nve.cpp and
fix_viscous.cpp and see what it's doing. That'a where
the x and v are updated.

Steve