I am trying to get a feel for how to use the lj/cut/coul/long and kspace_style commands. My basic set up is 4000 LJ particles, 10 of which are charged (system is neutral). I define the potential using
I forgot to mention that my initial configuration is from an equilibrated LJ run, so I don't think I would have any overlapping atoms. The charges on the ions are +/- 5.0. Would that be considered too much? I can try it with a lower charge.
My initial configuration for the particles is taken from an equilibrated LJ run, so I do not believe atom overlap to be the problem. I tried reducing the charge from +/- 5.0 to 1.0, but get the same results as below, namely NAN on the first time step for the PE, E_vdwl, and E_Coul. What's strange is that when I use
pair_style lj/cut/coul/cut 2.5 8.0
everything runs fine. The problem arise only with the long version of this pair_style. Any thoughts?
My guess is that the charges on your particles are producing huge forces. The LAMMPS manual says that for LJ units (which I assume you’re using) you should have “charge = reduced LJ charge” (see: http://lammps.sandia.gov/doc/units.html ). So your charges of 5 or 1 would be fine in real units, but probably too large in LJ units. How about trying your simulation using real units throughout?
If my hunch is wrong, I’d recommend that you send us your data file and input script so that we can try it out here.
Attached are the input and data files. I tried using real units throughout, but I got the same results, namely NaNs when using lj/cut/coul/long and numbers when using lj/cut/coul/cut. I then went back to lj units and tried smaller values for the charge (instead of +/- 1.0 I used +/- 0.1), which also produced the same outcomes.