[lammps-users] Possible bug in the eam/opt routine

Dear LAMMPS developers and users,

I have observed a strange behavior of the optimized EAM routine (pair_style
eam/opt). What I can say is that at least for one simple test case it gives
different energies than the standard EAM routine (pair_style eam).

With this email I have included a small LAMMPS script that calculates the bond
energy of a Pd dimer as a function of bond length. With the eam/opt pair
style it gives a wrong energy curve with a very deep second well at small
atomic distances. If you change the pair style to "eam" it gives you the
correct curve.

I haven't found out myself what the problem is yet or where to find the bug in
the eam/opt code. I hope that the developers of the eam/opt routine know it
better. What I can say is that the error arises only with certain potential
files.

Maybe someone can verify my observations.

Alexander Stukowski

dimer.in (876 Bytes)

eam.Pd.Pd.LAMMPS.Foiles (35.6 KB)

I suggest you email the eam/opt developers directly.
Their names are at the top of the opt.h files. You could
probably find them via Google.
Fiscsher's email is [email protected]

Steve

2008/9/30 Alexander Stukowski <[email protected]>:

Dear LAMMPS developers and users,

I have observed a strange behavior of the optimized EAM routine (pair_style
eam/opt). What I can say is that at least for one simple test case it gives
different energies than the standard EAM routine (pair_style eam).

dear alexander,

please note, that several of the "opt" module violate ANSI C/C++
aliasing rules. i'm not using EAM, but i noticed that this is
true for several others. now, in case you are compiling with
GNU gcc/g++, the code assumes compliance with ANSI rules, and
thus may miscompile those files.

please have a look at MAKE/Makefile.openmpi (this should also
work for other MPI implementations) that takes care of this
when using GNU gcc/g++ version 4.1 and up.

hope this helps,
   axel.