Mapping atoms in a custom multi-body potential

Hello,

I have implemented a new coarse-grained DNA model within LAMMPS. This model includes a multi-body pair-potential that applies forces between the pair of atoms i,j and neighboring sites on the DNA. I’ve attached an image to give you an idea of how the potential works.

As implemented, the model runs perfectly in a serial version of LAMMPS. Further investigation showed that this is to be expected given the use of atom->tag() and atom->map().

I would now like to take advantage of the MPI capability of LAMMPS. The thread below suggests that atom->tag() and atom->map() won’t work.
http://lammps.sandia.gov/threads/msg23810.html

This is what I’d like to do on each processor:

  1. Take the local ID of a site and obtain it’s global ID i.
  2. Calculate the global ID of nearby sites (e.g. i-1,i+3)
  3. Convert the global IDs of the nearby sites to local IDs
  4. Use local ID of all 3 sites in the calculation of “pair” potential

The nearby sites will always be very close to site i, so I assume that they would always be present either as local atoms or ghost atoms.

I’ve envisioned one solution where I construct a list similar to anglelist, etc. containing site i and 2 of its neighbors. This “pairlist” would be updated like the other bond lists and should, according to my limited understanding, store the local IDs of neighboring sites. However, it does not appear possible to know a priori which values in the “pairlist” to use for the pair interaction. I would have to search the list until I find the entry with a local ID that matches the local ID i used in the pair interaction.

Is this proposed solution viable? Are there other, better ways to do this in LAMMPS?

Thank you for your assistance!

basepair.pdf (442 KB)

hello dan,

Hello,

I have implemented a new coarse-grained DNA model within LAMMPS. This model
includes a multi-body pair-potential that applies forces between the pair of
atoms i,j and neighboring sites on the DNA. I've attached an image to give
you an idea of how the potential works.

am i reading the picture right that the interaction that you want to
look at contains three components: two angle terms and one dihedral
term that all have one pair i,j in common which is not bound, while
the other involved atoms are bound to the atoms i,j?

As implemented, the model runs perfectly in a serial version of LAMMPS.
Further investigation showed that this is to be expected given the use of
atom->tag() and atom->map().

I would now like to take advantage of the MPI capability of LAMMPS. The
thread below suggests that atom->tag() and atom->map() won't work.
http://lammps.sandia.gov/threads/msg23810.html

This is what I'd like to do on each processor:

1) Take the local ID of a site and obtain it's global ID i.
2) Calculate the global ID of nearby sites (e.g. i-1,i+3)
3) Convert the global IDs of the nearby sites to local IDs
4) Use local ID of all 3 sites in the calculation of "pair" potential

sounds convoluted and making assumptions about how the data will be
entered. i think a simpler way would be to simply walk the list of
atoms bound to either i or j. have a look at Atom::nbonds and
Atom::bond_atom[]. that would provide a simple way to generate all
topological angles/dihedrals around the (non-bonded) pair i,j and
eliminate the need to mess with atom ids.

The nearby sites will always be very close to site i, so I assume that they
would always be present either as local atoms or ghost atoms.

yes. this can also be tuned via the skin distance and communicate cutoff.

I've envisioned one solution where I construct a list similar to anglelist,
etc. containing site i and 2 of its neighbors. This "pairlist" would be
updated like the other bond lists and should, according to my limited
understanding, store the local IDs of neighboring sites. However, it does
not appear possible to know a priori which values in the "pairlist" to use
for the pair interaction. I would have to search the list until I find the
entry with a local ID that matches the local ID i used in the pair
interaction.

at this point it is very difficult to make any comments without
knowing your existing implementation. i would probably make the
collection of the list of close neighbors i,j part of the pair
potential, or - in case you implement this to be used via
hybrid/overlay - maintain a custom "short neighbors" list, like other
manybody potentials do.

Is this proposed solution viable? Are there other, better ways to do this
in LAMMPS?

i think this can be done more efficient and simpler. see above.

axel.