[lammps-users] Switch between pair styles according to pair distances

Hi LAMMPS users,

I would like to switch between the pair potentials according to the criterion of pair distances between atoms. For example, if the pair distances between any pair of atoms are less than 2^(1/6)*sigma then the potential would be repulsive and if the pair distances between any pair of atoms are greater than 2^(1/6)*sigma then the potential would be attractive. I am attaching the example potential for more information. According to the LAMMPS manual, the potentials can be different for different atom types but I could not find them according to the distances.

Can I ask your opinion in this regard?

Thanking you in advance!!

Best regards
Piyush

AH.png

If you want a pair style with a piecewise defined function, you have to either implement it yourself in C++, or use pair style table, or implement it with pair style python (but note the warning about the slow performance and using pair_write and pair style table for better performance.

Hi Axel,

Thank you so much for the detailed information. I will check it out.

Sincerely,
Piyush