Lost atoms during NPH step in metal additive manufacturing MD simulation

Title: Lost atoms during NPH step in metal additive manufacturing MD simulation

Description:

I am trying to reproduce the multi-layer deposition methodology from this paper:

Singh et al., “Understanding defect structures in nanoscale metal additive manufacturing via molecular dynamics”, Computational Materials Science 200 (2021) 110807

System details:

Software: LAMMPS 11 Feb 2026
Potential: EAM — Cu_u3.eam (Zhou et al. 2004)
System size: 16a x 16a x 32a copper = 32768 atoms
Substrate temperature: 300K
Liquid temperature: 1500K
Boundary: p p p with 50A vacuum

What I am doing:

1. Equilibrate solid substrate at 300K (NPT)
2. Create pre-equilibrated liquid box at 1500K
3. Place liquid on top of solid with 5A gap
4. Fix solid atoms, heat liquid to 1500K (NVT)
5. Unfix solid
6. Run NPH iso 5ps (paper methodology)
7. NPT cooling 300K

Problem: Every time I run the NPH step I get:

ERROR: Lost atoms: original 65536 current 65534

What I have tried:

  • Different vacuum sizes (30A, 50A, 100A)

  • NPH with drag coefficient (drag 2.0)

  • Smaller timestep during NPH (0.001 ps)

  • z-only pressure control (nph z)

  • Gradual heating of liquid in stages

  • Energy minimization before dynamics

Important observation: Small system (8a x 8a x 16a = 7631 atoms) works perfectly with 91.6% FCC. Full system (65536 atoms) always fails at NPH.

My LAMMPS script for Layer 1:

lammps

# Freeze solid
fix fr1 solid setforce 0.0 0.0 0.0
velocity solid create 300 55555

# Heat liquid gradually
velocity liquid create 500 11111
fix nvt1 liquid nvt temp 500 1500 0.1
run 7500
unfix nvt1

# Equilibrate liquid
fix nvt2 liquid nvt temp 1500 1500 0.1
run 5000
unfix nvt2

# Unfix solid
unfix fr1

# NPH step — THIS IS WHERE IT FAILS
fix nph1 all nph iso 0.0 0.0 1.0 drag 2.0
run 2500
unfix nph1

Question: How should I correctly implement the NPH interaction step for large liquid-solid systems without losing atoms? Is there a specific way to handle the pressure coupling when liquid at 1500K meets solid at 300K?

Any help is greatly appreciated!

It is difficult to give recommendation on a subject that is not my area of research and also without knowing more details.

Since you are only losing 2 atoms you need to first identify which they are and where they are located. That will likely give you are hint of what is the cause. It is unlikely that fix nph itself is the cause. You can confirm how much of an impact it has by running with fix nve instead and monitor whether you have good energy conservation and retain the temperature of both parts of the system. If you still lose atoms and energy conservation is poor or temperature rises unexpectedly, then likely your equilibration protocol was insufficient.

Then you can turn on thermo_modify lost ignore to keep the simulation going and then output the trajectory dump frequently with atoms sorted by ID so that you can compare frames and identify which atoms are lost. Then use visualization to see where those are located and then make an informed choice to remove the high potential energy for those.

More generally speaking, using isotropic box changes for a highly anisotropic system seems just plain wrong.

Also, note that fix setforce has no effect when you are running fix nvt only for the group of liquid atoms.

Plus, before running fix nph, I would run some equilibration on the sold atoms only (and immobilze the liquid atom by keeping the unfix nvt2 in your input.

1 Like

thanks for your valuable insight . i will try and let you know if it works.

A 5 angstrom gap is pretty large, and expecting the liquid to equilibrate “into” it in a few thousand timesteps is optimistic. I’d budget at least half a nanosecond of equilibration. You can be a bit more aggressive by trying to increase the “equilibration” time by a factor of 2, seeing if atoms are still lost, increasing by another factor of 2, … but remember: just because a simulation runs without crashing does not guarantee that the results are correct!

1 Like

thanks for your valuable insight. i will try and let u know.