Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
16 tasks
kirk0830 opened this issue Oct 24, 2024 · 2 comments
Open
16 tasks
Assignees
Labels
GeometryRelaxation Issues related to geometry relaxation

Comments

@kirk0830
Copy link
Collaborator

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)

  • Verify the issue is not a duplicate.
  • Describe the bug.
  • Steps to reproduce.
  • Expected behavior.
  • Error message.
  • Environment details.
  • Additional context.
  • Assign a priority level (low, medium, high, urgent).
  • Assign the issue to a team member.
  • Label the issue with relevant tags.
  • Identify possible related issues.
  • Create a unit test or automated test to reproduce the bug (if applicable).
  • Fix the bug.
  • Test the fix.
  • Update documentation (if necessary).
  • Close the issue and inform the reporter (if applicable).
@kirk0830 kirk0830 added the GeometryRelaxation Issues related to geometry relaxation label Oct 24, 2024
@QuantumMisaka
Copy link
Collaborator

I've tried these example and confirm the problem

@19hello
Copy link
Collaborator

19hello commented Nov 15, 2024

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

@mohanchen mohanchen changed the title Bug: endless SiH2 molecule geometry optimization with bfgs method Bug: BFGS used for SiH2 molecule geometry optimization cannot lead to converged results Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GeometryRelaxation Issues related to geometry relaxation
Projects
None yet
Development

No branches or pull requests

4 participants