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:
- Take the local ID of a site and obtain it’s global ID i.
- Calculate the global ID of nearby sites (e.g. i-1,i+3)
- Convert the global IDs of the nearby sites to local IDs
- 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)