new pair style: CUDA implementation?

Hi. I want to implement the less-often-used form of the LJ potential, i.e. U® = r^-12 - 2r^-6 instead of U® = 4[r^-12 - r^-6]. LAMMPS doesn’t seem to have this potential. That’s no problem, easy to add this as a new pair style based on a simple modification pair_lj_cut. However, what’s less clear is how to get this new pair style (or any new pair style) to work with CUDA/GPUS. Is GPU acceleration now automatic when a new pair style is properly added, or is there something more that goes into a GPU-accelerated version of a pair style?

Thanks,
Rob

Hi. I want to implement the less-often-used form of the LJ potential, i.e.
U(r) = r^-12 - 2r^-6 instead of U(r) = 4[r^-12 - r^-6]. LAMMPS doesn't seem
to have this potential. That's no problem, easy to add this as a new pair

but those two are the same. they only differ in how sigma is defined.
you can convert between the two using a scaling factor of 2**1/6.

style based on a simple modification pair_lj_cut. However, what's less
clear is how to get this new pair style (or any new pair style) to work with
CUDA/GPUS. Is GPU acceleration now automatic when a new pair style is

automatic? that is a good one. :wink:

properly added, or is there something more that goes into a GPU-accelerated
version of a pair style?

in this case it is not really needed, but for other cases,
it would suggest to give pair_style table/gpu a shot.

axel.

Ah. Open keyboard, insert foot :slight_smile: Thanks Axel!