ERROR: Attempt to push beyond stack limit in fix box/relax


I am doing a simulation of simple linear system however when I’m using the conjugate gradient ‘cg’ minimizer, the structure does not converge to a minimum whereas when I use the ‘hftn’ minimiser, the FTol of the structure does decrease but I get the following error “ERROR: Attempt to push beyond stack limit in fix box/relax (fix_box_relax.cpp:548)”. When I searched about the error on the Lammps documentation, I was told “Internal LAMMPS error. Please report it to the developers”. I have included my input and data files as well as the trajectory and coordinate files. Can someone explain to me what the problem is and how I can resolve it?

Thanks in advance,


dump.lamm+pstrj (609 KB)

log.lammps (132 KB) (385 KB) (936 Bytes) (1.18 KB)

Aidan can answer this. Presumably you are attempting
to minimize the box size/shape as well as the atom
coords. This is not a fully consistent minimization problem.
But usually that error indicates something else is wrong
with your system. You may have better luck not
minimizing all at once to high tolerance, but running
the minimize command a few times in succession,
so it can start each time with a better starting point.


There is no fundamental difference between CG and HFTN. They should both
work, but HFTN converges faster on some problems. Howerver, HFTN is known
to sometimes fail, as you observed. The issue has not yet been resolved,
as it resides somewhere between the main LAMMPS and the HFTN

More generally, minimization is a tricky business, much more so than MD. I
have generally found that CG with quadratic line search works best. Even
then you need to experiment with parameters like dmax and vmax to get fast
convergence. Pay attention to what is happening to the system during
minimization. Most importantly, try to make sure that your problem is
well-posed. Some potentials have discontinuities that trip up some