LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Axilrod-Teller Potential

# Re: [lammps-users] Axilrod-Teller Potential

 From: Stefan Paquay Date: Mon, 27 Nov 2017 12:52:17 -0500

Please always include the list; I am no expert in three-body-potentials so you need all the help you can get. ;)

On Mon, Nov 27, 2017 at 12:34 PM, Shane Jackson wrote:
I think I may be doing something wrong.  I’ve more or less copied the neighborlist/summing over all triplets from the pair_sw compute function but I must not understand the code correctly as the way I’m reading it, it looks like it calculating the force on each triplet 3 times.

I double checked and iList is summing over all atoms.  Here is the relevant code from pair_sw.cpp.  So for every atom i, this should pick out the neighbors below the cutoff and then sum over all triplet combination of neighbors.  Is this triple counting?

inum = list->inum;
ilist = list->ilist;
for (ii = 0; ii < inum; ii++) {
i = ilist[ii];
// j loop here over neighbor list of i
...
if (rsq >= params[ijparam].cutsq) {
continue;
} else {
neighshort[numshort++] = j;
if (numshort >= maxshort) {
maxshort += maxshort/2;
memory->grow(neighshort,maxshort,"pair:neighshort");
}
}
// End of j loop
jnumm1 = numshort - 1;

for (jj = 0; jj < jnumm1; jj++) {

for (kk = jj+1; kk < numshort; kk++) {
}

I think the way it works is that in the outer i loop it loops over j to do the pair calculations, but it makes sure to skip half of the pairs to prevent double counting. However, at the same time, for each particle i, it stores which atoms j were close enough to have a pair interaction. It does this in a small neighbor called neighshort. This is done as an optimization so the distance check does not have to be performed twice, which, if I recall correctly, led to a considerable increase in efficiency.

When it finally does the three body loop, it loops j over only the particles that were already determined to be in range (of which there are numshort), then it fetches j from neighshort and then it loops over the third neighbors k as well. Now, I am not certain but I am sure Trung or Axel know, but I think the way neighshort is constructed, the triple loop will encounter every triple only once.

In other words, if you just copy-paste the full pair_sw code that does the pairs and triples, you should be good. If you are uncertain, I would add some debug stuff to compute that prints all triplets it encounters to a file so you can double check whether or not each triplet is visited exactly once.

Also should the ev_tally3’s fourth argument should be the total 3 body energy, right?
Yes, but it is, because in the call to threebody the last argument, evdwl, is passed as reference, so threebody overwrites evdwl with just the three-body-energy.

Thank you for your time.

Shane

On Nov 16, 2017, at 8:46 PM, Stefan Paquay <stefanpaquay@...24...> wrote:

Standard tests are energy conservation and checking if the force computation matches a finite difference approximation based on the potential. Other than that you could compare results with literature but that's significantly more work.

As for docs, plain text with limited markdown is preferred (see the doc directory). I can help convert your pdf for you if you don't have time and it's not too much text.

On Nov 16, 2017 10:03 PM, "Shane Jackson" <swjackso@...114...> wrote:
I need to do further testing to make sure it actually works but I *think* the Axilrod Teller potential is almost ready.  Do you have any suggestions for testing the potential? Can I submit my documentation in PDF form?

Thanks

Shane

On Tue, Sep 19, 2017 at 7:42 AM Steve Plimpton <sjplimp@...24...> wrote:
No one (that I know of) has added that potential to LAMMPS.
If it has a 3-body form, SW is a good starting point.  Please
consider contributing your new code back to LAMMPS when you
have it working.

Steve

On Mon, Sep 18, 2017 at 11:32 AM, Shane Jackson wrote:
Hello all,

I’ve been looking around and haven’t been able to find an Axilrod Teller pair potential for LAMMPS. If anyone knows of one that’d be great otherwise I’ll continue on developing my own.  Before I head too far down the rabbit hole, I’ve started with the SW potential as a base - is there a better starting point?

Thanks

Shane
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...655....net
https://lists.sourceforge.net/lists/listinfo/lammps-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...655....net
https://lists.sourceforge.net/lists/listinfo/lammps-users