Questions about switching off the attractive part of the LJ potential

Hi! I want to ask that if I want to only include the repulsive term of Lennard-Jones potential in the potential calculation. Someone else has asked this question before. And the answer is “all you have to do is to shift the potential so that the minimum is a zero energy and then set the cutoff to that radius”. I want know whether this means let Epsilon to be 0 and I should set the cutoff to radius value when Epsilon=0.

Thank you in advance!

Hi! I want to ask that if I want to only include the repulsive term of Lennard-Jones potential in the potential calculation. Someone else has asked this question before. And the answer is “all you have to do is to shift the potential so that the minimum is a zero energy and then set the cutoff to that radius”. I want know whether this means let Epsilon to be 0 and I should set the cutoff to radius value when Epsilon=0.

no. if epsilon is 0, you turned the potential off.
just look at the mathematical description of the
potential. with eps=0 there is nothing left but 0.

actually, the shifting of the potential is only needed
for accounting, i.e. to get the correct energy.

this is a very trivial problem. for a conventional
12-6 LJ potential the minimum is at r= sigma*2**(1/6)
you can easily validate that by using middle-school
level functional analysis. 1) determine the first derivative
with respect to r of the potential, 2) find out a which
value of r expressed in multiples of sigma this
function is zero. if you substitute this value of r
into the potential, you’ll see that the energy in
the minimum is -epsilon.

thus for a purely repulsive 12-6 LJ potential,
you have to setup the cutoff to 2*1/6 * sigma
or 1.12246204830937298142 * sigma and then
use the “pair_modify shift yes” option to shift
the potential, so the energy is 0 at the cutoff.

at this point, you should feel very embarrassed
that you couldn’t figure this out by yourself.

cheers,
axel.

We actually often use pure 1/r^12 repulsion in our simulations.
(Alternately, you could use a shifted Lennard Jones potential. But
sometimes using a simple 1/r^n potential makes it easier to explain
what you did to your audience. It depends on what you want.) If you
want to use U(r)=A/r^12, then probably the easiest way to get LAMMPS
to do this is to use the "table" pair_style:

Then create a 4-column text file with a table of values of
counter r A/r^12 -12*A/r^13
  : : : :
("A" is some constant)

Check out the documentation at:
http://lammps.sandia.gov/doc/pair_table.html
for details.

There were at least two errors in that previous email.

Then create a 4-column text file with a table of values of
counter r A/r^12 -12*A/r^13

This probably should be:
counter r A/r^12 12*A/r^13

And replace it with something like this:
lj1[i][j] = 12 * A[i][j];
lj2[i][j] = 6 * B[i][j];

perhaps this should have been -6*B[i][j]

(I hope you get the idea anyway.)
Cheers

Andrew