[lammps-users] question about pair_style buck/coul long long with ewald/n

Hello,
In summary, I’m using pair_styel buck/coul long long with ewald/n and even though I define pair_coeff for each atom type interaction my log file says:

WARNING: Geometric mixing assumed for 1/r^6 coefficients

I’m using lammps with the user-ewaldn package. I’m using ewald to calculate the dispersion and coulombic long range interactions using this command. I have an interface and some voids and sometimes non orthogonal lattice vectors so ewaldn is my best choice and I think using it to also calculate the van derwaals dispersion is better suited to these interfaces than a correction force. I am using atom_style full and have 5 types of atoms in my simulation and define the partial charges along with the xyz coordinates and bond connectivity in a data file. This is my input file for the potential where I explicitly define my pair potential for each atom type:

bond_style harmonic
angle_style harmonic
dihedral_style harmonic
improper_style harmonic
pair_style buck/coul/long 10.0 10.0
kspace_style ewald/n 1.0e-4

pair_coeff 1 1 14976.00 0.323625 640.80
pair_coeff 1 2 30183.57 0.291121 566.03
pair_coeff 1 3 30183.57 0.291121 566.03
pair_coeff 1 4 33702.40 0.279642 505.60
pair_coeff 1 5 4320.000 0.292826 138.20
pair_coeff 2 2 60833.90 0.264550 500.00
pair_coeff 2 3 60833.90 0.264550 500.00
pair_coeff 2 4 67925.95 0.255037 446.60
pair_coeff 2 5 12695.88 0.265957 116.96
pair_coeff 3 3 60833.90 0.264550 500.00
pair_coeff 3 4 67925.95 0.255037 446.60
pair_coeff 3 5 12695.88 0.265957 116.96
pair_coeff 4 4 75844.80 0.246124 398.90
pair_coeff 4 5 14175.97 0.256345 104.46
pair_coeff 5 5 2649.700 0.267380 27.400

In my log file I get the following:

pair_style buck/coul long long 10.0 10.0
WARNING: Geometric mixing assumed for 1/r^6 coefficients
WARNING: Using largest cut-off for buck/coul long long
kspace_style ewald/n 1.0e-4
in the manual it says:
“This pair styles does not support mixing. Thus, coefficients for all I,J pairs must be specified explicitly.”
So I’m not sure why it is doing geometric mixing. I created a restart file and then converted the restart file using the restart2data tool and it shows geometric mixing. I also compared a bunch of single point energies (run 0) between lammps and another program and they were almost identical but these were for a deforming a single molecule with no long range contributions (ewald) bu they did have short range vdw and coulombic forces which did not show mixing.

Any help would be great. Thanks Lynn

First, the warning message is only coming from the mix setting,
which is made via the pair_modify mix command. But if you
are setting all the coeffs explicitly, then no auto-mixing is taking
place. So it is not relevant.

But I don't see where the command requires you to set
all the coeffs yourself, i.e. this message:

"This pair styles does not support mixing. Thus, coefficients for all I,J
pairs must be specified explicitly."

So I think buck/coul would allow you to mix. What I think, the
warning is telling you is that in the long-range calculation assumes
that is is the kind of mixing taking place in order for the long-range
part to be correct. If you specify all the cross terms yourself,
you probably want to insure that is what you are doing as well.

Pieter can probably verify this.

Steve

Lynn,

I think the manual is a bit misleading. The way I programmed it, is that it does not support user-supplied cross terms. The warning means, that ‘pair_style buck/coul long long’ forces geometric mixing, even when explicit mixing terms are specified in the LAMMPS input file. The reason for this is, that the ewald implementation of the dispersion sum needs to assume geometric mixing, since it otherwise becomes ill-defined. Conversely, dispersion sums are not possible with user-defined cross-terms. The second warning regarding cut offs implies, that round off errors of sorts possibly cause one cut off to be larger than the other. The warning is informational, meaning that the cut off for both dispersion sum and electrostatics will be set to the largest of the two. This also has to do with how k-space vectors are set up. A mixed cut off would cause implementational issues. I hope this answers your quesitons

Best Regards,
Dr. Pieter J. in 't Veld
Polymer Physics

Phone: +49 621 60-46293, Fax: +49 621 60-6646293, E-Mail: pieter.intveld@…253…
Postal Address: BASF SE, GKC/M - G200, 67056 Ludwigshafen, Germany

BASF - The Chemical Company

BASF SE, Registered Office: 67056 Ludwigshafen, Germany
Companies’ Register: Amtsgericht Ludwigshafen, Registration No.: HRB 6000
Chairman of the Supervisory Board: Juergen Strube
Board of Executive Directors:
Juergen Hambrecht, Chairman; Eggert Voscherau, Vice Chairman;
Kurt Bock, Martin Brudermueller, John Feldmann, Andreas Kreimeyer, Stefan Marcinowski, Harald Schwager

Thanks Steve,
The part that I am quoting from the manual is found under the Mixing, shift, table, tail correction, restart, rRESPA info: heading of the documentation:
http://lammps.sandia.gov/doc/pair_buck_coul.html

Let me see if I’m understanding this, using ewald/n for this command:
pair_style buck/coul/long 10.0 10.0

The dispersion terms (1/r^6) can only be calculated using geometric mixing, hence this WARNING: Geometric mixing assumed for 1/r^6 coefficients. The ewald/n does not allow the cross terms to be explicitly defined for long-range interactions? Do you know of a way I can check if geometric mixing is being used for the ewald dispersion terms?
I appreciate the help, Lynn

lynn,

Thanks Steve,
The part that I am quoting from the manual is found under the Mixing, shift,
table, tail correction, restart, rRESPA info: heading of the documentation:
http://lammps.sandia.gov/doc/pair_buck_coul.html

Let me see if I'm understanding this, using ewald/n for this command:
pair_style buck/coul/long 10.0 10.0

The dispersion terms (1/r^6) can only be calculated using geometric mixing,
hence this WARNING: Geometric mixing assumed for 1/r^6 coefficients. The

a quick look at the source code reveals, that this "warning" is more meant to
be a "reminder"; i.e. when you turn on long range corrections for the buckingham
part, then you should have used geometric mixing as that would be what the
ewald/n code will assume.

ewald/n does not allow the cross terms to be explicitly defined for
long-range interactions? Do you know of a way I can check if geometric
mixing is being used for the ewald dispersion terms?

no. i suspect you are looking at this the wrong way around.

the message is trying to tell you something like: "Watch out. Long
range dispersion correction
requested. Will compute it assuming geometric mixing. You better have
used geometric
mixing when entering your parameters."

the warning message will _always_ show up when you use the "long" flag
for the buckingham part of the potential. it won't do any checking at all.

does that make sense to you?

cheers,
    axel.

Thank you Axel, I think I’m getting it now with you, Steve, and Pieter’s help, is this statement correct?

The pair_style buck/coul long long with ewald/n assumes geometric mixing for long range dispersion but because the pair_style buck/coul long long does not support mixing then I am required to define all pair_coeff including those for cross terms myself. The cross terms for “C” constant of the 1/r^6 term should be defined using the formula for geometric mixing. The cross terms for the exponential repulsion constants are not effected by the geometric mixing constraint because they are not included in the ewald and I can define them however I want.

If I define cross terms for the “C” constant of the dispersion not using geometric mixing, the ewald sum will have difficulty cancelling out the real space and k-space terms since the kpace is using mixing. I ask this because the potential I’m using defines all cross terms using geometric mixing except for the CH term. The difference between the potential and geometric mixing for the CH terms are mainly in the repulsive constants and the difference is much smaller in the dispersion term. I think I can get away with only using geometric mixing on the dispersion term and using the published repulsion terms unless this would be inconsistant with the ewald/n implementation. Would you have any suggestions?
Thanks
Lynn

Now I’m confused. The code appears to actually require user-supplied
cross terms (not “does not support them”). It performs no mixing,
regardless of the user mixing setting (not “forces geometric mixing”).

I’m not clear what generates
the warning about geometric mixing, but I think it is if the user has
set the mixing flag. Regardless of the setting, the code appears
to ignore it. Am I missing something?

So I think the doc page is correct. Is there some additional
info that should be there, like that the user should be sure to
provide cross-terms that obey geometric mixing rules, else the
pair style or long-range computation will be messed up?

Steve

Hi Steve, from the posts by Pieter and Axel, I think your statement is correct:
“The user should be sure to provide cross-terms that obey geometric mixing rules, else the pair style or long-range computation will be messed up”

Axel said the warning I am seeing is a reminder that I better use geometric mixing for the cross terms I enter because the ewald/n code is going to be using geometric mixing when it computes the long range portion.

However, I think this only effects the dispersion (1/r^6) portion of the pair style and the repulsion term does not need to obey geometric mixing because it is not calculated by the pair style.

All,

I am mixing up how pair_lj and pair_buck for ewald/n were coded up (it has been a while). As Steve correctly points out, pair_buck needs all terms, including the cross terms. However, when used in combination with ewald/n, geometric mixing is assumed for all long-range dispersion sum contributions. It is assumed that the user supplied the correct coefficients Cij for the 1/r^6 dispersion term, since pair_buck does not apply any mixing and does not check for correctness either. This pair style then becomes one of the category “user beware”. This does, however, give the user the flexibility to apply non-geometric mixing to the repulsive coefficients without impacting the physical correctness of the model.

Best Regards,
Dr. Pieter J. in 't Veld
Polymer Physics

Phone: +49 621 60-46293, Fax: +49 621 60-6646293, E-Mail: pieter.intveld@…253…
Postal Address: BASF SE, GKC/M - G200, 67056 Ludwigshafen, Germany

BASF - The Chemical Company

BASF SE, Registered Office: 67056 Ludwigshafen, Germany
Companies’ Register: Amtsgericht Ludwigshafen, Registration No.: HRB 6000
Chairman of the Supervisory Board: Juergen Strube
Board of Executive Directors:
Juergen Hambrecht, Chairman; Eggert Voscherau, Vice Chairman;
Kurt Bock, Martin Brudermueller, John Feldmann, Andreas Kreimeyer, Stefan Marcinowski, Harald Schwager