[lammps-users] Need your help for alloy EAM potential in Lammps!!

Hi Steve and Guys:

Thank you very much for help!!

Yes, the commands should be:
pair_style eam
pair_coeff 1 1 Zr.eam
pair_coeff 2 2 Ni.eam

But,

------Note that the Zr.eam and Ni.eam files above must be in funcfl format,
------so you would have to convert your fs and alloy files to that.

So I tried to convert Zr_2.eam.fs and Ni99.eam.alloy to funcfl format. It is easy to get 3 parts(Embedding function, pair interaction and electron density---3 parts) from old files and inserted them into new funcfl files . But I run simulations which got error to fail or gave "nan" results for both transfered Zr and Ni single funcfl files.

A DYNAMO single-element funcfl file is formatted as follows:
line 1: comment (ignored)
line 2: atomic number, mass, lattice constant, lattice type (e.g. FCC)
line 3: Nrho, drho, Nr, dr, cutoff
then:
embedding function F(rho) (Nrho values)
effective charge function Z(r) (Nr values) (!!!!!! Not pair interaction like setfl and FS format !!!!!!)
density function rho(r) (Nr values)

And
A DYNAMO multi-element setfl file is formatted as follows:

lines 1,2,3 = comments (ignored)
line 4: Nelements Element1 Element2 ... ElementN
line 5: Nrho, drho, Nr, dr, cutoff
then
line 1 = atomic number, mass, lattice constant, lattice type (e.g. FCC)
embedding function F(rho) (Nrho values)
density function rho(r) (Nr values)
Following the Nelements sections, Nr values for each pair potential phi(r) array are listed for all i,j element pairs in the same format as other arrays.

Same thing happens to FS EAM format.

Now the problem is that in funcfl format the second parts are not pair interaction but effective charge instead. Maybe this is the possible reason for error.

So How should I do if we only have setfl and FS format for single element?

Thank you very much!!!

best regards

Rongguang

---------------------------Last email from Steve Plimpton

Hi - neither of your command sequences is correct. The 2nd pair_style
command will override the first.

If you want LAMMPS to mix the cross-interaction, then you
need to use pair_style eam like this:

pair_style eam
pair_coeff 1 1 Zr.eam
pair_coeff 2 2 Ni.eam

It will mix for the Zr-Ni interaction the same way DYNAMO did - not
sure what that means vis-a-vis the Johnson paper, but I can point you
to where this happens in the code.

Note that the Zr.eam and Ni.eam files above must be in funcfl format,
so you would have to convert your fs and alloy files to that.

Alternatively you can put both the Zr and Ni into one file (in alloy setfl
or FS format) and do this:

pair_style eam/alloy
pair_coeff * * NiZr.eam.alloy Zr Ni

But this will require you to do the mixing yourself b/c the
cross term is listed in the setfl file.

Please post future Qs to the LAMMPS mail list, so others can
answer/learn.

Hope that helps,
Steve

Now the problem is that in funcfl format the second parts are not pair interaction but effective charge instead. Maybe this is the >possible reason for error.

This is indeed the problem - the funcfl and setfl files contain
different, but related info. You'll have to convert to what
the funcfl files need. I'd look at the original EAM papers
and in the pair_eam and pair_eam_alloy.cpp files to
see how this is done.

Steve