lj/mdf and lennard/mdf pair_coeff parameters

Hi everybody! The doc page for the lj/mdf pair style has the example commands

pair_style lj/mdf 2.5 3.0
pair_coeff * * 1 1
pair_coeff 1 1 1 1.1 2.8 3.0 3.2

As I understand it, the first two lines set up lj/mdf with epsilon = 1, sigma = 1, and inner and outer cutoffs of 2.5 and 3.0. What do the first and third lines set up, i.e. what does the “2.8 3.0 3.2” specify?

Also, there seems to be an inconsistency in the documentation for lennard/mdf. The text on https://lammps.sandia.gov/doc/pair_mdf.html specifies four pair coefficient (A, B, r_m, and r_cut), but the equation for E® doesn’t include B. I’m guessing it should be E® = A/r^12 - B/r^6. More confusingly, the input-parameter example is

pair_style lennard/mdf 2.5 3.0
pair_coeff * * 1 1
pair_coeff 1 1 1 1.1 2.8 3.0 3.2

I can’t seem to square having either two or five pair coefficients with the above description of this style’s input parameters. Please advise :slight_smile:

Thanks,
Rob

Looks like a case of outdated documentation slipping past the review. The best advice in these cases is to just check the source code to see the order of the parameters and then check the compute() function to see how the coefficients are used.

Looks like a case of outdated documentation slipping past the review. The best advice in these cases is to just check the source code to see the order of the parameters and then check the compute() function to see how the coefficients are used.

as it turns out, looking at the source code was revealing some issues there, too. this seems to be a case of copy-and-not-enough-modify. i’ve tried to remedy the most important issues and make the documentation consistent with the implementation in this pull request, which should make it into the next LAMMPS patch release. https://github.com/lammps/lammps/pull/1448

as for the review process. this code was added before we switched to maintaining LAMMPS on github and thus predates the more systematic review process. at that time review for user package was considered the responsibility of the contributors and for contributions to USER-MISC the barrier to get code added was set particularly low to make contributions easier.

axel.

Thanks guys! Think I’ve figured it out. We should have a generalized-LJ version (similar to pair_nm) of the MDF-cutoff potential available shortly, am happy to send it to the developers if you like…

Best,
Rob

Thanks guys! Think I’ve figured it out. We should have a generalized-LJ version (similar to pair_nm) of the MDF-cutoff potential available shortly, am happy to send it to the developers if you like…

if you do this, please be certain to base your work on the code and docs in the pull request branch i mentioned.

axel.