Lammps openkim edip potential for carbon

Hi,
I installed the EDIP potential for carbon described in Marks paper with OpenKIM. My system is an amorphous carbon with 300000 atoms.
Everything runs. EXCEPT I noticed something really weird. When I plot the stress per atom outputted by LAMMPS, I can only positive ones. This is not normal. In addition, if I output the pressure with LAMMPS and take into consideration sign and volume, it doesn’t lead me to the same values Tham with the stress per atom. Has anyone tried to output the stress per atom given by LAMMPS when given this potential? When I follow the same procedure with a different potential, I get a distribution that is much more expected and has negative and positive values.
here is the beginning of my code:

metal units, pressure in bar

kim init EDIP_LAMMPS_Marks_2000_C__MO_374144505645_000 metal
atom_style atomic
read_restart ${file}

neighbor 1.0 bin
neigh_modify every 1 delay 5 check yes

kim interactions C

Define output parameters

variable nrelax equal 10000
variable nthermo2 equal 10000
variable ndump equal 50000 # every 0.5% def
variable nrestart equal 500000 # every 5% def

Define MD parameters

variable temp equal ${temperature} # temperature of initial sample
variable timestep equal 0.001 # timestep, in ps because of metal unit
variable erate equal 0.0001 # strain rate

Setup simulation control

compute 1 all stress/atom NULL
compute 2 all pe
variable g equal c_2
variable k equal pxx
variable l equal lx

thermo_style custom step time temp pe pxx pyy pzz pxy pxz pyz lx ly lz
thermo_modify norm no # default parameter for metal units anyway. means we don’t normalize by the number of atoms
timestep ${timestep}

reset velocities to temp with random seed

velocity all create ${temp} 5 rot yes dist gaussian

relax for a short time before deformation

fix 1 all npt temp {temp} {temp} (100.0*dt) aniso 0 0 (1000.0*dt) drag 1.0 # is drag necessary?

run ${nrelax}

Hi Raphaelle,

I am not an expert in atomistic stress so I may have to ask around or direct you somewhere else to ask this question. It’s highly unlikely that someone who just happened to run a similar situation with this specific potential will come across your post.

First I will try to help, and I have some follow up questions:

  1. What other potentials have you tried that DO produce the result you expected? Were they KIM potentials or built-in LAMMPS pair_styles?
  2. When you say "In addition, if I output the pressure with LAMMPS and take into consideration sign and volume, it doesn’t lead me to the same values Tham [sic] with the stress per atom. ", do you mean something like that the following lines (from compute stress/atom command — LAMMPS documentation) don’t produce identical columns as they should?
compute        peratom all stress/atom NULL
compute        p all reduce sum c_peratom[1] c_peratom[2] c_peratom[3]
variable       press equal -(c_p[1]+c_p[2]+c_p[3])/(3*vol)
thermo_style   custom step temp etotal press v_press

Cheers, ilia

Hi Ilia,

  1. I tried ML-PACE potential which is built-in and not KIM potentials. Although I also want to say that I used to have an older version of the carbon EDIP potential that wasn’t OpenKIM but gave the same wrong results.
  2. something like: “variable k equal pxx” so I know pxx, compared to “compute 1 all stress/atom NULL” where I can extract sigmaxx

I used to have an older version of the carbon EDIP potential that wasn’t OpenKIM but gave the same wrong results.

In that case I think it’s pretty clear that this is either a peculiarity with this parametrization of EDIP, or your expectations of the results are incorrect (I have no specific reason to believe this since I’m not an expert in atomistic stress calculations, but always a possibility!)

In either case, I think you’d be able to get more help in the general LAMMPS forum. You may also want to consider contacting Nigel Marks directly to see if this is a known behavior in this potential.

1 Like

Dear Raphaelle,
I hope you are doing well.
I am writing to you today because I have been working on a LAMMPS deposition simulation and encountered a performance issue with the EDIP potential, and I recall your work in this area.
My simulation, which uses about 1000 atoms, runs quite fast (around 3 minutes) with the standard pair_style edip potential. However, when I switched to the kim init EDIP_LAMMPS_Marks_2000_C__MO_374144505645_000 metal potential from the KIM project, the same simulation takes a significantly longer time (approximately 6 hours).
Given your experience with large-scale simulations of amorphous carbon, I was wondering if you had encountered a similar performance disparity between these two versions of the EDIP potential. If you have any insights or suggestions for optimizing the kim settings to improve performance, it would be greatly appreciated.
Thank you for your time and consideration.

Best regards,
AiDee

Hi AiDee,
I haven’t encountered such a problem I think… Are you running locally or on a supercomputer? how many nodes and cores?
If you’re running on a supercomputer, my first suggestion would be that you might have just encountered bad nodes/cores and this happens. So try to run it again to see if problem repeats. Give me more details, I’ll see if I think of something

Hi AiDee,

I can confirm that EDIP_LAMMPS_Marks_2000_C__MO_374144505645_000 is indeed running slow for me as well. We are looking into it. Note that EDIP_LAMMPS_Marks_2000_C__MO_374144505645_000 has additional terms that are not found in any LAMMPS pair_style (not in edip or edip/multi – see the explanation of the edip/c mode of the KIM Model Driver here). Therefore, it is possible (although unlikely) that this is simply how expensive it is to evaluate the additional terms.

When I compare, for example EDIP_LAMMPS_JiangMorganSzlufarska_2012_SiC__MO_667792548433_000 to pair_style edip/multi (which is a 1-1 comparison), then they run at approximately the same speed and get the same result.

Cheers, ilia

Hi Raphaelle. Thank you for your quick reply.
I am running the simulations on our supercomputer, which has 96 cores. I have run the simulations multiple times, and the performance issue is consistent regardless of the nodes or cores used. I also observe the same problem when attempting to use GPU acceleration, which suggests the issue is not hardware-specific. It might come from my settings. I am going to check it out, as ilia has suggested.
The performance difference is quite dramatic—the built-in potential takes minutes, while the KIM version takes over 100 times longer for the same job. I’m trying to understand if this is an issue with my setup or if this is characteristic of the potential on our type of hardware.
I was hoping you might be able to share a rough estimate of your simulation performance, such as steps per second, or any insights into how the potential scales on your system. Any information you can provide would be very helpful.
Thanks!

Hi ilia, that’s a very insightful way to compare kim edip SiC to built-in SiC, it helps to figure out if this phenomenon is caused by kim framework or edip/c potential itself. I am going to run this test on my supercomputer and see if the result aligns with yours.
Thanks!

Hi ilia. I have the results now. KIM edip SiC took 165% time compared to the built-in lammps edip SiC.edip on my supercomputer, it suggests that it’s mainly not my mistakes in KIM setting, but probably a internal performance issue of “EDIP_LAMMPS_Marks_2000_C__MO_374144505645_000”. Thanks for your insightful suggestion!!!