Docs: suggesting smaller mixing parameters for non converging spin-polarized calculations#7589
Docs: suggesting smaller mixing parameters for non converging spin-polarized calculations#7589Cstandardlib wants to merge 2 commits into
Conversation
…scf hard to converge.
There was a problem hiding this comment.
Pull request overview
Updates ABACUS input-parameter documentation (and the corresponding built-in help text) to advise smaller/paired mixing parameters for hard-to-converge spin-polarized SCF calculations, in response to issue #7125.
Changes:
- Extend
mixing_betahelp text to recommend reducingmixing_betaandmixing_beta_magtogether for difficult spin-polarized SCF. - Extend
mixing_beta_maghelp text with the same paired-reduction guidance. - Update
docs/parameters.yamlmixing sections accordingly (but also includes multiple unrelated documentation changes beyond the stated PR scope).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 11 comments.
| File | Description |
|---|---|
| source/source_io/module_parameter/read_input_item_elec_stru.cpp | Updates built-in parameter descriptions for mixing_beta and mixing_beta_mag. |
| docs/parameters.yaml | Updates parameter docs for mixing guidance and includes several additional documentation edits across other parameters. |
| * 0.1 or less: if convergence of SCF calculation is difficult to reach, please try 0 < mixing_beta < 0.1. | ||
|
|
||
| Note: For low-dimensional large systems, the setup of mixing_beta=0.1, mixing_ndim=20, and mixing_gg0=1.0 usually works well.)"; | ||
| Note: For low-dimensional large systems, the setup of mixing_beta=0.1, mixing_ndim=20, and mixing_gg0=1.0 usually works well. | ||
|
|
||
| For spin-polarized calculations (nspin=2 or nspin=4) that are difficult to converge, try reducing both mixing_beta and mixing_beta_mag simultaneously, e.g., mixing_beta=0.1 and mixing_beta_mag=0.1 or lower.)"; |
| item.description = R"(Mixing parameter of magnetic density. | ||
|
|
||
| If SCF convergence is difficult with spin polarization (nspin=2 or nspin=4), try reducing both mixing_beta and mixing_beta_mag simultaneously, e.g., mixing_beta=0.1 and mixing_beta_mag=0.1 or lower.)"; | ||
|
|
| type: Real | ||
| description: | | ||
| It's the density threshold for electronic iteration. It represents the charge density error between two sequential densities from electronic iterations. This criterion is always enabled. If `scf_ene_thr` is set, the total-energy criterion (`scf_ene_thr`) is evaluated conditionally after the charge-density criterion (`scf_thr`) is satisfied, and not on the first iteration. For local-orbital calculations, 1e-6 is usually accurate enough. | ||
| It's the density threshold for electronic iteration. It represents the charge density error between two sequential densities from electronic iterations. Usually for local orbitals, usually 1e-6 may be accurate enough. |
| * nhc: Nose-Hoover chain, see md_tfreq and md_tchain in detail. | ||
| * anderson: Anderson thermostat, see md_nraise in detail. | ||
| * berendsen: Berendsen thermostat, see md_nraise in detail. | ||
| * rescaling: velocity Rescaling method 1, see md_tolerance in detail. | ||
| * rescale_v: velocity Rescaling method 2, see md_nraise in detail. |
| type: Boolean | ||
| description: | | ||
| Whether to print Hamiltonian matrices H(R) in npz format. The output files are named output_HR0.npz, output_HR1.npz, and so on according to spin channel. This feature requires ABACUS to be built with CNPY. | ||
| Whether to print Hamiltonian matrices H(R) in npz format. This feature does not work for gamma-only calculations. |
| availability: sc_mag_switch is true | ||
| - name: sc_scan_lambda_start | ||
| category: Spin-Constrained DFT | ||
| type: Float |
| availability: sc_lambda_strategy is linear_scan | ||
| - name: sc_scan_lambda_end | ||
| category: Spin-Constrained DFT | ||
| type: Float |
| - name: assume_isolated | ||
| category: System variables | ||
| type: String | ||
| description: | | ||
| Used to perform a calculation assuming an isolated system in a 3D supercell. | ||
|
|
||
| Available options are: | ||
| * none: regular periodic calculation without isolated-system correction. | ||
| * makov-payne, m-p, mp: compute the Makov-Payne correction to the total energy and estimate a corrected vacuum level for eigenvalue alignment. This option is available only for cubic lattices (latname = sc, fcc, or bcc). | ||
|
|
||
| Theory: G. Makov and M. C. Payne, Phys. Rev. B 51, 4014 (1995). | ||
| default_value: none | ||
| unit: "" | ||
| availability: "" |
|
Some PRs are making changes to docs without following the instructions after v3.9.0.24, so the documentation lags behind the source code. For example, #7384, #7354, #7280 update docs or add new params but did NOT update |
|
My practices for mixing_beta tuning: 0.4 -> 0.1 -> 0.025 is a general way |
Linked Issue
Fix #7125
What's changed?
mixing_beta&mixing_beta_magto suggest smaller parameter values for scf hard to converge, as in BUG: USPP hard to converge and yields incorrect magnetic moments #7125.