[lammps-users] Hard sphere potential

Hi everyone,

I am simulating a very simple system with bunch of atoms connected with bonds, angles and impropers torsions.
For pairwise interaction, I am using LJ 12-6 and simple coulombic interactions.
I want to use a hard-sphere potential for certain group of atoms (just for volume exclusion principle, no attraction).
I couldn't even find any pair wise potential having only repulsive part of LJ.

is writing a hard-sphere potential function in c++ the only solution ? and if it is, how do I combine this code into lammps.

Thanks in advance,

If you set the cutoff of pair_style lj.cut to 2^(1/6) ~ 1.12
then you will have only the repulsive portion. There is
no true hard-sphere potential in LAMMPS, though a LJ
interaction is pretty hard, as is the pair_style granular
if you turn up the stiffness. To do true hard-sphere
dynamics, you don't time integrate. Rather you
detect next collisions with a variable timestep.
It's a different kind of code/algorithm.