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

add LBFGS method #6005

Merged
merged 25 commits into from
Mar 23, 2025
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2a79ecb
update bfgs method
19hello Dec 2, 2024
0b52719
update bfgs method and modify the parameter force in relax_step to be…
19hello Dec 2, 2024
f79ab76
update bfgs method and modify the parameter force in relax_step to be…
19hello Dec 2, 2024
808feb5
Introduce the differences between the two BFGS methods
19hello Dec 10, 2024
ebdac58
Add & in relax_step input parameters
19hello Dec 11, 2024
f3b9541
Merge branch 'develop' into updatebfgstrad
19hello Dec 13, 2024
31d81b4
Merge branch 'develop' into updatebfgstrad
19hello Dec 13, 2024
44b974b
fix confilct
19hello Dec 13, 2024
9ca9366
Merge branch 'updatebfgstrad' of https://github.com/19hello/myrepo in…
19hello Dec 13, 2024
093b2eb
add lbfgs method
19hello Feb 15, 2025
e2ada07
add lbfgs method
19hello Mar 7, 2025
c6b8458
add lbfgs
19hello Mar 11, 2025
279f99e
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
19hello Mar 12, 2025
caf7bcd
lbfgs0
19hello Mar 12, 2025
f4fefe4
addlbfgs
19hello Mar 12, 2025
a0197d8
add lbfgs method
19hello Mar 15, 2025
ca96d15
add lbfgs method
19hello Mar 15, 2025
c8b7066
Refactor the code and add comments
19hello Mar 19, 2025
b452a90
Modify comments
19hello Mar 20, 2025
53bc754
remove auto
19hello Mar 22, 2025
75605b6
remove auto
19hello Mar 22, 2025
280fef6
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
19hello Mar 22, 2025
8e25419
remove auto
19hello Mar 22, 2025
7ee2e48
remove auto
19hello Mar 22, 2025
87a201a
remove auto
19hello Mar 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update bfgs method and modify the parameter force in relax_step to be…
… passed by reference
19hello committed Dec 2, 2024
commit 0b52719c0ce3c983566c8e67879b162f738d74d3
2 changes: 1 addition & 1 deletion docs/advanced/input_files/input-main.md
Original file line number Diff line number Diff line change
@@ -1369,7 +1369,7 @@ These variables are used to control the geometry relaxation.
- **Description**: The methods to do geometry optimization.
- cg: using the conjugate gradient (CG) algorithm. Note that there are two implementations of the conjugate gradient (CG) method, see [relax_new](#relax_new).
- bfgs: using the Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm.
- bfgs_trad: using BFGS algorithm consistent with the BFGS algorithm in ASE.
- bfgs_trad: using the standard Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm.
- cg_bfgs: using the CG method for the initial steps, and switching to BFGS method when the force convergence is smaller than [relax_cg_thr](#relax_cg_thr).
- sd: using the steepest descent (SD) algorithm.
- fire: the Fast Inertial Relaxation Engine method (FIRE), a kind of molecular-dynamics-based relaxation algorithm, is implemented in the molecular dynamics (MD) module. The algorithm can be used by setting [calculation](#calculation) to `md` and [md_type](#md_type) to `fire`. Also ionic velocities should be set in this case. See [fire](../md.md#fire) for more details.
4 changes: 2 additions & 2 deletions docs/advanced/opt.md
Original file line number Diff line number Diff line change
@@ -24,9 +24,9 @@ The [BFGS method](https://en.wikipedia.org/wiki/Broyden%E2%80%93Fletcher%E2%80%9

In ABACUS, we implemented the BFGS method for doing fixed-cell structural relaxation.

### BFGS_TRAD method
We have alse implemented an alternative BFGS method, which can be called by using the keyword 'bfgs_trad'.

The BFGS_TRAD method is an algorithm implemented in ABACUS, referencing the BFGS method from ASE. The previous BFGS method in ABACUS did not perform well for some tests and the BFGS_TRAD method now produces results that are consistant with the BFGS method in ASE. In cases where the previous BFGS method could not converge within a limited number of steps, the BFGS_TRAD method can successfully converge.
The bfgs_trad method is a quasi-Newton method that substitute an approximate matrix B for the Hessian matrix. The optimization direction is determined by the inverse of B, therefore, only the inverse of B is iteratively updated and no time-consuming operations such as matrix inversion are involved.

### SD method