Dear Lammps users,
I want to minimize the potential energy of a slightly deformed 2D
system of LJ particles. to do that I used the following commands
displace_box all xy final 0.05 units box
fix 1 all enforce2d
min_modify line quadratic
min_modify dmax 0.02
minimize 1.0e-6 1.0e-8 100000 100000
The minimization fails with the stopping criterion "linesearch alpha
is zero". I've tried "min_style sd", "min_modify line backtrack" and
a larger value for dmax or tolE, but I always get the "linesearch
alpha is zero" after a few tens of steps. However if I decrease the
xy-tilt by a factor of 100 or more, then the minimizer works fine.
This situation is reproducible for different initial configurations.
In this simple example, why a small deformation makes the minimization
what are general remedies to avoid getting "linesearch alpha is zero"?
Also in 3D, the above error does not seem to occur. The minimization
for the deformed box works as perfectly as for the undeformed one.
Can you post a simple (small problem) input script?
The 2d vs 3d part sounds odd, as does the working
better on small deformations. Alpha = 0.0 is a reasonable
stopping condition for quadratic. The question is whether
it has driven down the energy enough.
I'll see if Aidan can take a look at this.
Attached please find a compressed file which contains input script,
data file and also a pair style code called lj12/cut which is needed
to be compiled with lammps (adds a pair style for soft sphere
particles [ (1/r)^12 ].)
It seems that the source of error is the "run 0" command at line 14 of
the input script. If you remove that line then minimization works.
Since in my main input script I need to initialize several variables,
removing the "run 0" won't help.
sample.tar.gz (30.9 KB)
Found the bug - fixed it via the 18Dec10 patch.
Good. It fixed the problem with minimization too. With the initial 'run 0',
the alpha=zero exit was caused by a discontinuity in the energy at the first
reneighboring, because the initial neighbor list was slightly off.