Soft-sphere potential

Dear LAMMPS users,

Does anyone know how to implement soft-sphere potential

U® = 4 e ( sigma /r )^12 ; r < rc
= 0 ; r > rc

Thanks in advance
Karteek

It is just a variation of the L-J 12-6 potential. You just need to turn off the ^6 term (comment it out in the src).

Ray

Thanks,
you want me to edit the source file.

Thanks
Karteek

Hello,

"comment it out in the src" suggests to go in the lammps directory, to edit the
file pair_lj_cut.cpp. Everywhere the r^{-6} terms appear, you should delete it.

You should be careful to modify the force computation, the energy computation,
the offset. From reading the file, the simplest seems to set "lj2[i][j]" and
"lj4[i][j]" to 0 in PairLJCut::init_one and delete "- pow(ratio,6.0)" from
"offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0));" This
still does not take care of the tail correction, a few more edits are needed.

Do not forget to recompile lammps afterwards.

Regards,

Pierre

is there a specific reason you cannot use WCA, i.e. the standard 12-6
LJ with the cutoff set at sigma*2**1/6?
for all practical purposes, it should be nearly the same.

of course, you can also always use tabulation, but that requires
careful testing of the tables...

axel.

Thanks Axel,

I will be using

pair_style lj/cut sigma*2**1/6
pair_modify shift yes

Thanks again
Karteek