[lammps-users] implementing a new type of pairwise interaction

Dear Steve:

I am currently implementing a new type of pairwise interaction into LAMMPS. The basic idea is as below:

Each step, first loop over all the pairs to find the pair with minimal pair distance; for this pair, when the distance is smaller than (r<r1), use potential 1 ( FENE® ), otherwise use potential 2 ( FENE(r1) ); for all other pairs, use potential 3 (LJ potential with cutoff=1.13).

since it is a bit different from most pairwise interactions in LAMMPS with uniform potential. I have two general questions:

  1. Besides writing the new *.cpp and *.h files, is there any other file than style_user.h that will be affected ?

  2. about the program structure of this new module: it seems that following the same structure as existed one and adding the same loop (to find minimum) to the beginning of compute(), init_one(), single() separately is not an efficient way. would you please give any suggestions?

Also any comments on this try are welcome.

Thanks in advance!

Zhenlong Li
PhD student
Macromolecular Department
Case Western Reserve University

You should be able to do this in a single new pair style file (cpp, h).

The only part that seems tricky is finding the minimum-distance pair.
I'm not sure what this even means, since the closest neighbor to
atom A might be B, but B could have a neighbor C which is closer to B.
So do you want to call A-B and B-C both "min-dist" pairs?

You may want a neighbor list where all the neigbors of each atom
are stored, like Tersoff uses. You can set this with a flag at the
top of the pair style file.

You should be able to do some loop before computing pairwise
LJ to extract the min-dist pairs you want to compute via FENE. Then
you could either have FENE code inside your pair routine, or you could
construct a bond-neighbor list and call the bond_style FENE compute()
routine directly.

Hope that helps,
Steve