deepmodeling / abacus-develop

An electronic structure package based on either plane wave basis or numerical atomic orbitals.
http://abacus.ustc.edu.cn
GNU Lesser General Public License v3.0
174 stars 136 forks source link

Bug: BFGS used for SiH2 molecule geometry optimization cannot lead to converged results #5338

Open kirk0830 opened 1 month ago

kirk0830 commented 1 month ago

Describe the bug

try this example, you will find ABACUS cannot get geometry optimization converged within 40 steps for such a quite simple molecule (only three atoms), but if substitute the geometry optimizer with ASE-BFGS, then it can converge in 3 steps to 0.05 eV/Angstrom, additional 2 steps to 0.01 eV/Angstrom. SiH2-3et-relax.zip

Expected behavior

No response

To Reproduce

No response

Environment

No response

Additional Context

No response

Task list for Issue attackers (only for developers)

QuantumMisaka commented 1 month ago

I've tried these example and confirm the problem

19hello commented 2 weeks ago

I've written a new bfgs method in branch #5467. you can add a new parameter "relax_method bfgs_trad" in the INPUT file to call my bfgs. the followings are the results of running your example on my computer using bfgs_taud in abacus. The results converged within 5 steps.

STEP OF ION RELAXATION : 1

START CHARGE : atomic DONE(26.3435 SEC) : INIT SCF ITER TMAG AMAG ETOT/eV EDIFF/eV DRHO TIME/s DA1 2.00e+00 2.03e+00 -1.36488047e+02 0.00000000e+00 3.9185e-01 67.66 DA2 2.00e+00 2.03e+00 -1.35639323e+02 8.48724853e-01 2.9515e-01 46.96 DA3 2.00e+00 2.03e+00 -1.35175018e+02 4.64304219e-01 1.2141e-01 49.95 DA4 2.00e+00 2.03e+00 -1.35231536e+02 -5.65178630e-02 2.5339e-02 64.18 DA5 2.00e+00 2.02e+00 -1.35222711e+02 8.82512136e-03 1.0236e-02 80.27 DA6 2.00e+00 2.02e+00 -1.35217865e+02 4.84660755e-03 3.1181e-03 78.66 DA7 2.00e+00 2.02e+00 -1.35217872e+02 -7.33928889e-06 5.5952e-04 100.37 DA8 2.00e+00 2.02e+00 -1.35201171e+02 1.67013151e-02 3.9924e-04 74.71 DA9 2.00e+00 2.02e+00 -1.35194998e+02 6.17261755e-03 4.3632e-05 80.36 DA10 2.00e+00 2.02e+00 -1.35193314e+02 1.68393041e-03 2.5192e-05 136.85 DA11 2.00e+00 2.02e+00 -1.35189848e+02 3.46604543e-03 8.9616e-06 91.01 DA12 2.00e+00 2.02e+00 -1.35189045e+02 8.02713411e-04 1.7975e-06 158.18 DA13 2.00e+00 2.02e+00 -1.35188238e+02 8.07283414e-04 8.9097e-07 156.32 DA14 2.00e+00 2.02e+00 -1.35188208e+02 3.00653633e-05 3.6123e-07 184.99 DA15 2.00e+00 2.02e+00 -1.35188171e+02 3.68581656e-05 1.0798e-07 208.42 DA16 2.00e+00 2.02e+00 -1.35188152e+02 1.86521458e-05 7.5997e-08 162.83 enter Step 8.90708e-05

STEP OF ION RELAXATION : 2

DONE(1805.62 SEC) : INIT SCF ITER TMAG AMAG ETOT/eV EDIFF/eV DRHO TIME/s DA1 2.00e+00 2.02e+00 -1.35188153e+02 0.00000000e+00 5.6291e-09 350.83 enter Step 7.6773e-05

STEP OF ION RELAXATION : 3

DONE(2199.74 SEC) : INIT SCF ITER TMAG AMAG ETOT/eV EDIFF/eV DRHO TIME/s DA1 2.00e+00 2.02e+00 -1.35188153e+02 0.00000000e+00 3.1195e-08 236.86 enter Step 4.10153e-05

STEP OF ION RELAXATION : 4

DONE(2483.47 SEC) : INIT SCF ITER TMAG AMAG ETOT/eV EDIFF/eV DRHO TIME/s DA1 2.00e+00 2.02e+00 -1.35188167e+02 0.00000000e+00 1.0078e-07 199.77 DA2 2.00e+00 2.02e+00 -1.35188153e+02 1.40178310e-05 6.6679e-08 149.30 enter Step 1.97053e-05

STEP OF ION RELAXATION : 5

DONE(2877.01 SEC) : INIT SCF ITER TMAG AMAG ETOT/eV EDIFF/eV DRHO TIME/s DA1 2.00e+00 2.02e+00 -1.35188154e+02 0.00000000e+00 3.3028e-07 179.21 DA2 2.00e+00 2.02e+00 -1.35188152e+02 1.83609165e-06 2.1776e-07 138.71 DA3 2.00e+00 2.02e+00 -1.35188154e+02 -1.39226035e-06 7.6465e-09 196.32 enter Step 8.1824e-06 TIME STATISTICS