[lammps-users] energy minimization in LAMMPS

Hello all,

I am dealing with geometry optimization of molecules of aluminum hydride (e.g. Al2H6) .
For this purpose I use “minimize” command like this:

I'll Aidan comment on the multiple minimization.
One thing that is odd about these outputs, is
that the 2nd min doesn't start with the same energy
as the 1st min ended with. Aidan - is there
something odd about ReaxFF (for a tiny system)
in that respect?

Steve

I like tiny systems. Minimization is always difficult, for a variety of
reasons. You have to work at it. One issue is that in ReaxFF, like many
other potentials, the potential energy contains small discontinuities. I
have found that in these cases, lineseach quadratic works better than
backtrack (the default). You could also try the new minimizers quickmin and
fire, which work for non-conservative forces.

The difference in energy:

  36 \-621\.43511541866
  36 \-635\.87372243025

is hard to explain. It would be interesting to print out the different
energy categories (see pair_reax.html) to see which ones changed. Maybe it's
the charge equilibration energy.

Aidan

2010/11/10 Thompson, Aidan <[email protected]>

I like tiny systems. Minimization is always difficult, for a variety of
reasons. You have to work at it. One issue is that in ReaxFF, like many
other potentials, the potential energy contains small discontinuities. I
have found that in these cases, lineseach quadratic works better than
backtrack (the default). You could also try the new minimizers quickmin and
fire, which work for non-conservative forces.

The difference in energy:

36 -621.43511541866

36 -635.87372243025

is hard to explain. It would be interesting to print out the different
energy categories (see pair_reax.html) to see which ones changed. Maybe it’s
the charge equilibration energy.

Aidan


Aidan P. Thompson
01435 Multiscale Dynamic Materials Modeling
Sandia National Laboratories
PO Box 5800, MS 1322 Phone: 505-844-9702
Albuquerque, NM 87185 Fax : 505-845-7442
E-mail:athomps@…429… Cell : 505-550-2614

From: Steve Plimpton <sjplimp@…36…24…>
Date: Wed, 10 Nov 2010 09:51:02 -0700
To: Konstantin Shefov <konstontins@…24…>, Aidan Thompson
<[email protected]>
Cc: <[email protected]>
Subject: Re: [lammps-users] energy minimization in LAMMPS

I’ll Aidan comment on the multiple minimization.
One thing that is odd about these outputs, is
that the 2nd min doesn’t start with the same energy
as the 1st min ended with. Aidan - is there
something odd about ReaxFF (for a tiny system)
in that respect?

Steve

Hello all,

I am dealing with geometry optimization of molecules of aluminum hydride
(e.g. Al2H6) .
For this purpose I use “minimize” command like this:

======================================
units real
dimension 3
atom_style charge
boundary p p p

read_data Al2H6.data
orthogonal box = (-15 -25 -15) to (15 25 15)
1 by 1 by 1 processor grid
8 atoms

pair_style reax 10.0 1 1.0e-6
pair_coeff * * ffield.reax 7 2

compute energy all pe

thermo 1
thermo_style custom step c_energy
thermo_modify format float %15.14g

min_style sd
min_modify dmax 0.005
minimize 1.0e-8 1.0e-9 3000 30000

After minimization I have this messsage:

=============================
Minimization stats:
Stopping criterion = linesearch alpha is zero
Energy initial, next-to-last, final =
-606.035856099 -621.503061683 -621.435115419
Force two-norm initial, final = 84.8319 8.62375
Force max component initial, final = 41.5147 4.07076
Final line search alpha, max atom move = 1.46412e-10 5.96007e-10
Iterations, force evaluations = 36 59

The first question is about “stopping criterion = linesearch alpha is zero”

  • why does this happen?

After this I write another LAMMPS input file with double minimize command
(starting atom configuration in molecule is the same):

===========================
min_style sd
min_modify dmax 0.005
minimize 1.0e-8 1.0e-9 3000 30000
minimize 1.0e-8 1.0e-9 3000 30000

The log file is:

===============================
WARNING: Resetting reneighboring criteria during minimization
Memory usage per processor = 2.64422 Mbytes
Step energy
0 -606.03585609891
1 -606.88696084349
2 -607.71117388035
3 -608.50878022767
4 -609.28067027681
5 -610.02705521709
6 -610.74828179075
7 -611.4446510371
8 -612.11642321448
9 -612.76382208859
10 -613.38703899677
11 -613.98623668683
12 -614.56155271956
13 -615.11310010553
14 -615.64181906358
15 -616.14513768432
16 -616.62632560839
17 -617.08383082359
18 -617.51796887446
19 -617.92879095468
20 -618.31635950719
21 -618.68082792898
22 -619.02240769311
23 -619.34134273874
24 -619.63820072321
25 -619.91209904791
26 -620.16593288801
27 -620.39704957175
28 -620.61290825331
29 -620.74523949489
30 -620.91030902225
31 -621.05315612666
32 -621.17858268389
33 -621.29275192935
34 -621.39950867556
35 -621.50306168287
36 -621.43511541866
Loop time of 0.0109789 on 1 procs for 36 steps with 8 atoms

Minimization stats:
Stopping criterion = linesearch alpha is zero
Energy initial, next-to-last, final =
-606.035856099 -621.503061683 -621.435115419
Force two-norm initial, final = 84.8319 8.62375
Force max component initial, final = 41.5147 4.07076
Final line search alpha, max atom move = 1.46412e-10 5.96007e-10
Iterations, force evaluations = 36 59

Pair time () = 0.0106444 (96.9532) Neigh time () = 0 (0)
Comm time () = 3.26633e-05 (0.297509) Outpt time () = 0.000147343 (1.34205)
Other time (%) = 0.000154495 (1.4072)

Nlocal: 8 ave 8 max 8 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 5 ave 5 max 5 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 28 ave 28 max 28 min
Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 28
Ave neighs/atom = 3.5
Neighbor list builds = 0
Dangerous builds = 0

minimize 1.0e-8 1.0e-9 3000 30000
WARNING: Resetting reneighboring criteria during minimization
Memory usage per processor = 2.64422 Mbytes
Step energy
36 -635.87372243025
37 -636.02729757062
38 -636.16598429637
39 -636.29575037075
40 -636.41907965189
41 -636.54456619295
42 -636.66904939514
43 -636.79515245068
44 -636.90917600717
45 -636.9649171969
46 -637.07275579005
47 -637.17124214459
48 -637.27257759694
49 -637.36563721807
50 -637.46115344458
51 -637.54796254489
52 -637.63787343088
53 -637.57509754671
Loop time of 0.0060699 on 1 procs for 17 steps with 8 atoms

Minimization stats:
Stopping criterion = linesearch alpha is zero
Energy initial, next-to-last, final =
-635.87372243 -637.637873431 -637.575097547
Force two-norm initial, final = 14.79 6.98522
Force max component initial, final = 6.84349 3.09654
Final line search alpha, max atom move = 1.92501e-10 5.96089e-10
Iterations, force evaluations = 17 40

Pair time () = 0.0059123 (97.4037) Neigh time () = 0 (0)
Comm time () = 2.12193e-05 (0.349582) Outpt time () = 5.126e-05 (0.844495)
Other time (%) = 8.51154e-05 (1.40225)

Nlocal: 8 ave 8 max 8 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 5 ave 5 max 5 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 28 ave 28 max 28 min
Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 28
Ave neighs/atom = 3.5
Neighbor list builds = 0
Dangerous builds = 0

===========================================

It can be seen that forces became closer to 0.0.

Finally i tried to make 10 minimizations by repeating “minimize” command and
had this at the end:

============================
Step energy
90 -638.69647968579
91 -638.6942645357
Loop time of 0.00307417 on 1 procs for 1 steps with 8 atoms

Minimization stats:
Stopping criterion = linesearch alpha is zero
Energy initial, next-to-last, final =
-638.696479686 -638.696479686 -638.694264536
Force two-norm initial, final = 2.03854 2.0386
Force max component initial, final = 1.01736 1.0174
Final line search alpha, max atom move = 2.3435e-09 2.38428e-09
Iterations, force evaluations = 1 22

The norm of the forces becomes closer to zero.

So the question is why I have to repeat minimize commands instead of using
just one to make forces less?

P.S. I have tried quadratic search and cg algorithm also, but the problem
remains.

Thanks.


Yours sincerely, Konstantin Shefov

----------------------------------------------------------------------------->>

The Next 800 Companies to Lead America’s Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book “Blueprint to a
Billion” shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev


lammps-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lammps-users

It seems I have solved my minimization problem using your new C++ version of ReaxFF. There are no more energy jumps and forces are very close to 0.0.

Good, but there are 2 questions of interest here, we should
probably figure out.

1) why did the energy change going from the last step
of the 1st min to the 1st step of the 2nd min. Is the
system being charge equlibrated again, and if so, why
did the charges change and change the energy?\
Can you send an input script for your small problem
that illustrates this?

2) why is the C version of ReaxFF doing something
different than the Fortran - they shouldn't be radically
different.

Steve

Aidan can look at this more if he wants to.
But given that (1) is not happening I would
say that the difference in (2) is not significant.
The progression thru the end stages of a
minimization is a sensitive thing to small differences
in a potential and the kind of cutoff/round-off issues
Aidan mentioned, so I'm not surprised the C and
Fortran version give slightly different answers.

Steve

When comparing both codes, you have to check that they are both running with
the same accuracy parameters e.g. bond order cut-offs, etc. These won't have
much effect on MD simulations, but can dramatically affect how well a
minimization progresses.