I want to shift an lj/expand potential so that its value at cutoff reaches 0.0. I use “pair_modify shift yes”, but when I use pair_write to check the potential, it shows “pair_modify shift yes” does not work. Could you please guide me on what the problem can be?
I have two kinds of interaction in my system and I use “pair_style hybrid”.
Here is the part of my code defining the interactions:
pair_style hybrid lj/expand 3.1 lj/cut 2.5
pair_coeff * 2 lj/expand 1.0 1.0 2.0 3.1
pair_modify shift yes
pair_coeff 1 1 lj/cut 1.0 1.0 2.5
I would be thankful if you could help me.
The problem is sitting between your computer and your keyboard. Pair style
lj/expand is working exactly as described in the documentation and using
pair_write confirms it.
You have an interaction cutoff of 3.1 sigma and a value of delta of 2.0 sigma, thus the interaction stops at 5.1 sigma, which is exactly the distance at which the potential energy becomes zero in the generated table. Without
pair_modify shift yes the potential energy at 5.1 sigma with
lj/expand is non-zero.
Thank you for your reply and explanation.
Maybe I am confused about the “cutoff” that has been described in the documentation for this kind of LJ potential. Actually, I am going to check an interaction that Delta=2, rc=1.1, and its cutoff is 3.1. In other words, I am going to test a potential that only has the repulsive part:
pair_write 1 2 1000 r 0.001 3.1 ljExpand.txt ljExpand
Can pair_modify shift yes shift the potential so that the potential reaches zero at 3.1?
That is a superfluous question. I have already confirmed that lj/expand does the shifting correctly. The remainder is just to provide the correct input and that is up to you and you carefully studying the documentation and applying what it says.