[lammps-users] Stillinger-Weber documentation

Hi all,

I’m a little confused by the documentation on the Stillinger-Weber pair style. Under the “Mixing, shift …” header, the documentation says

For atom type pairs I,J and I != J, where types I and J correspond to two different element types, mixing is performed by LAMMPS as described above from values in the potential file.
However, this seems inconsistent with two sentences in the last paragraph of the description:
In the literature, however, the three-body parameters are usually defined by simple formulas involving two sets of pair-wise parameters, corresponding to the ij and ik pairs, where i is the center atom.
The user must ensure that the correct combining rule is used to calculate the values of the threebody parameters for alloys.

I read the latter line as saying that I ought to do any mixing calculations myself before entering any three body parameters (rather than entering only two body parameters and allowing LAMMPS to perform some mixing). This’d make the most sense to me, since a three body parameter corresponding to a set of atoms I,J,K is entered for that specific set of atoms I,J,K in the parameter file and should thus be unique. It also looks like no mixing is performed in pair_sw.cpp.
Can anyone familiar with the sw pair style confirm whether I’m right in thinking that that first line is no longer an accurate description of the way LAMMPS handles the sw pair style?
Thanks,
Tyler Harvey

Hi again,
Looking deeper on this, I’m also worried about what appears to be a limitation of the sw pair style as currently implemented: as far as I can tell, it’s impossible to independently specify a pair parameter corresponding to a I,J interaction for calculation of two different I,J,K interactions. For example, if I had three-body terms for Si-O-Si and Si-O-H, the latter term uses the O-Si pair parameters (gamma, a, sigma) described for the Si-O-Si interaction, so I can’t specify a new O-Si pair parameter specifically for the Si-O-H term. In fact, it appears that the pair parameters listed on a line where I,J and K are three different elements aren’t used at all. In pair_sw.cpp, the PairSW::threebody function takes &params[ijparam],&params[ikparam],&params[ijkparam] as arguments, and those indices are defined as:
ijparam = elem2param[itype][jtype][jtype];
ikparam = elem2param[itype][ktype][ktype];
ijkparam = elem2param[itype][jtype][ktype];

It’s certainly simpler to take parameters this way, but it’s not as flexible as I’d hope, at least for the use that I’m looking at right now. Can anybody who’s used the sw pair style confirm that what I’m seeing in the source is the behavior they’ve observed/behavior they’d expect?

Thanks,
Tyler Harvey

I'll let Aidan answer this question. This section of the SW doc page
may be helpful.

As annotated above, the first element in the entry is the center atom
in a three-body interaction. Thus an entry for SiCC means a Si atom
with 2 C atoms as neighbors. The parameter values used for the
two-body interaction come from the entry where the 2nd and 3rd
elements are the same. Thus the two-body parameters for Si interacting
with C, comes from the SiCC entry. The three-body parameters can in
principle be specific to the three elements of the configuration. In
the literature, however, the three-body parameters are usually defined
by simple formulas involving two sets of pair-wise parameters,
corresponding to the ij and ik pairs, where i is the center atom. The
user must ensure that the correct combining rule is used to calculate
the values of the threebody parameters for alloys. Note also that the
function phi3 contains two exponential screening factors with
parameter values from the ij pair and ik pairs. So phi3 for a C atom
bonded to a Si atom and a second C atom will depend on the three-body
parameters for the CSiC entry, and also on the two-body parameters for
the CCC and CSiSi entries. Since the order of the two neighbors is
arbitrary, the threebody parameters for entries CSiC and CCSi should
be the same. Similarly, the two-body parameters for entries SiCC and
CSiSi should also be the same. The parameters used only for two-body
interactions (A, B, p, and q) in entries whose 2nd and 3rd element are
different (e.g. SiCSi) are not used for anything and can be set to 0.0
if desired.

Steve

I think that piece of the documentation is accurate, if not entirely
obvious. The key clause is " from values in the potential file."

This would make a fairly complicated situation even more complicated. In the
absence of any published papers that use this scheme, I think we will leave
things the way they are now.

Hi again,
Looking deeper on this, I'm also worried about what appears to be a
limitation of the sw pair style as currently implemented: as far as I can
tell, it's impossible to independently specify a pair parameter
corresponding to a I,J interaction for calculation of two different I,J,K
interactions. For example, if I had three-body terms for Si-O-Si and Si-O-H,
the latter term uses the O-Si pair parameters (gamma, a, sigma) described
for the Si-O-Si interaction, so I can't specify a new O-Si pair parameter
specifically for the Si-O-H term. In fact, it appears that the pair

hi tyler,

what you are describing is essentially that you have
more than one type of Si in your potential. of course,
that would lead to a nightmare to parameterize it well.
at this point, i would probably start considering using
a semi-empirical quantum chemistry method instead
and rather throw more computational power at the problem
than using a hard to parameterize empirical potential.

cheers,
    axel.

Hi again,
Looking deeper on this, I'm also worried about what appears to be a
limitation of the sw pair style as currently implemented: as far as I can
tell, it's impossible to independently specify a pair parameter
corresponding to a I,J interaction for calculation of two different I,J,K
interactions. For example, if I had three-body terms for Si-O-Si and Si-O-H,
the latter term uses the O-Si pair parameters (gamma, a, sigma) described
for the Si-O-Si interaction, so I can't specify a new O-Si pair parameter
specifically for the Si-O-H term. In fact, it appears that the pair

hi tyler,

what you are describing is essentially that you have
more than one type of Si in your potential. of course,
that would lead to a nightmare to parameterize it well.
at this point, i would probably start considering using
a semi-empirical quantum chemistry method instead
and rather throw more computational power at the problem
than using a hard to parameterize empirical potential.

cheers,
    axel.

Note also that the function phi3 contains two exponential screening factors with parameter values from the ij pair and ik pairs.
So phi3 for a C atom bonded to a Si atom and a second C atom will depend on the three-body parameters for the CSiC entry, and also on the two-body parameters for the CCC and CSiSi entries.
Since the order of the two neighbors is arbitrary, the threebody parameters for entries CSiC and CCSi should
be the same.

Boy, it’s surprising what you see the second time around. I guess I totally missed those last couple of lines that describe exactly what I found when that wasn’t the behavior that I was looking for.

I don’t mean to beat a dead horse, because I think I’m on the right page now, and I completely agree with Aidan that the current simpler way to take parameters is best without any major rewrite of the pair style, but I do have two final clarification questions in case anybody runs into this confusion in the future (or in case I actually am still misunderstanding things).

Similarly, the two-body parameters for entries SiCC and CSiSi should also be the same.

This is only two of two-body parameters and not true of pair parameters used in the three-body term, right? It looks like an index like elem2param[1][2][2] is read separately and used independently of elem2param[2][1][1] in the three-body term calculation.

The parameters used only for two-body interactions (A, B, p, and q) in entries whose 2nd and 3rd element are
different (e.g. SiCSi) are not used for anything and can be set to 0.0
if desired.

It might be helpful to add a, sigma, and gamma to that (A, B, p, and q) list since I believe this is true for them, too, right?

Thanks all for the clarifications. I know now to read the documentation several times over in these relatively tricky instances.

Tyler

It might be helpful to add a, sigma, and gamma to that (A, B, p, and q) list
since I believe this is true for them, too, right?

You may be right about that. Have you tested it?

I confirmed that sigma, a, and gamma are not used for ijk entries
and can be set to zero. I added this to the documentation and
modified GaN.sw and CdTe.sw accordinly. Thanks for noticing that.