How to specify a switching function in script?

Hi all,

I am new to LAMMPS. Following the method detailed in a journal article. I am now implementing a jamming simulation of granular materials, where the particle normal interaction is Hooke with damp component (mass_velocity).

Specifically, it is mentioned that “An extra switching function is employed to set the magnitude of normal force to zero” if the damp component is larger than the Hooken component (which will result in attractive force). However, I do not know how I can specify the “switching function” in my script.

I think this modification matters since I failed to reproduce their results (other settings are basically the same), and I am looking forward to your feedback.

Here is my current settings in script:

pair_style granular
pair_coeff * * hooke 1 0.5 damping mass_velocity tangential linear_history 1 1 0
comm_modify vel yes


If you are new to a software, then it is more likely that your problem reproducing published results is due to some more fundamental issue. There is a large probability that you misinterpreted something, mistyped or misunderstood some detail. Something like applying a switching function has usually a more subtle effect where your results would be just a little bit off.

You have to check very carefully if the authors made a modification to the LAMMPS source code and used that. All available options in LAMMPS are documented. You should probably contact the authors of your reference publication to get a clarification, and the modified sources, if that is what they used.