DFT Convergence Tips
Achieving self-consistent field (SCF) convergence is often the trickiest part of running density functional theory (DFT) calculations, especially for metallic or highly correlated systems. As a regular Quantum ESPRESSO user, I've compiled below some of my favorite strategies and settings for overcoming tricky SCF convergence issues.
1. Choose a Good Initial Guess
- Setup Matters: Quantum ESPRESSO provides several ways to initialize the wavefunctions and electron density. Use
in yourstartingwfc = 'atomic' startingpot = 'atomic'
&CONTROL
or&SYSTEM
inputs to begin with atomic orbitals. - From Previous Runs: If continuing from a converged calculation, set
and ensure your oldrestart_mode = 'restart'
*.save
directories are available. - Spin Guessing: For magnetic systems, specify the
starting_magnetization
for each atomic species.
2. Tweak the Mixing Scheme
- Default is Not Always Best: The default mixing (
mixing_mode = 'plain'
,mixing_beta = 0.7
) can fail in metals or large systems. - Broyden Mixing: Try
ormixing_mode = 'local-TF'
mixing_mode = 'damp'
- Lower Mixing Beta: Reduce
mixing_beta
(try 0.3 or even 0.1) to damp oscillations in problematic cases.
Sample:
&SYSTEM
mixing_mode = 'local-TF',
mixing_beta = 0.2,
/
- Increase Mixing Step: Sometimes, setting
builds a longer memory of past density changes and helps convergence.mixing_ndim = 8
3. Check K-Points and Smearing
- Smearing Is Essential for Metals: Use a Methfessel-Paxton or Marzari-Vanderbilt smearing in
occupations
:occupations = 'smearing' smearing = 'mp' degauss = 0.02 ! Try varying degauss for best results
- Γ-Only for Insulators: For molecules, try
occupations = 'fixed'
. - K-Point Mesh: Start with a coarse mesh to get a feel for the system, then refine.
4. Adjust Electronic Minimization
- Convergence Threshold: Set a more lenient
conv_thr
at first, then tighten once convergence is achieved, e.g., from1.0e-5
to1.0e-8
. - Maximum Iterations: The default (
electron_maxstep=100
) may not suffice. Setelectron_maxstep = 200
5. Diagnose Stuck Calculations
If SCF oscillates or diverges:
- Try a different mixing scheme.
- Lower your cutoff energies (
ecutwfc
,ecutrho
) to test for stability. - Revisit your pseudopotentials; some are less stable than others.
- Check if the structure needs relaxation—distant atoms or unreasonable lattice constants can cause trouble.
6. Useful Input Snippet
Here's a snippet with convergence-aiding settings:
&SYSTEM
nosym = .true.
occupations = 'smearing'
smearing = 'mv'
degauss = 0.01
mixing_mode = 'local-TF'
mixing_beta = 0.3
mixing_ndim = 10
/
&ELECTRONS
conv_thr = 1.0e-7
electron_maxstep = 200
/
Summary Table
Problem | Strategy | Input Option |
---|---|---|
Oscillating SCF | Lower mixing_beta , different mixing_mode |
mixing_beta , mixing_mode |
Divergent SCF | Try smaller degauss , check structure |
degauss |
Metals | Use smearing, proper k-points | occupations , smearing |
Magnetic/Spin | Set starting_magnetization |
starting_magnetization |
Final Thoughts
Don't be afraid to experiment systematically—changing one variable at a time and keeping detailed logs. For persistent problems, the Quantum ESPRESSO forums and documentation are invaluable resources.
What are your go-to tricks for SCF convergence? Share in the comments below!
#QuantumEspresso #DFT #Convergence #MaterialsScience