-
Notifications
You must be signed in to change notification settings - Fork 1
QMol_DFT_SCF_Anderson
Anderson's mising scheme for DFT ground-state calculations.
Use QMol_DFT_SCF_Anderson
to solve DFT self-consistent field (SCF) nonlinear eigen-state problem
where QMol_DFT_SCF_Anderson
uses an Anderson's mixing scheme [Anderson 1965] in SCF iterations, as described in [Johnson 1988], for either the one-body density or the Kohn-Sham potential. QMol_DFT_SCF_Anderson
is a handle class.
The QMol_DFT_SCF_Anderson
class defines the following public get-access properties; each can be changed using the set
method:
Convergence tolerance [ nonnegative scalar (default 1e-10) ]
Maximum number of SCF iterations [ nonnegative integer (default 100) ]
Mixing coefficient [ 0 to 1 scalar (default 0.5) ]
- Too large
mixing
coefficient may render the SCF unstable and prevent convergence. - Too small
mixing
coefficient makes the SCF convergence slower. - Optimal
mixing
coefficient is system dependent and should be adapted accordingly.
What to mix in the SCF iterations [ density (default) | potential ]
-
density
mixes the one-body density whilepotential
mixes the Kohn-Sham potential. In both cases, only the explicit part of the potential is being mixed in the SCF iterations and any implicit exchange-correlation functional is not being mixed.
Convergence criterion [ 'density' (default) | 'eigenvalues' ]
- With the
'density'
criterion, the result is considered converged when the${\mathcal{L}}^2$ norm difference in the one-body density between two consecutive SCF iterations is smaller thantolerance*mixing
. - With the
'eigenvalues'
criterion, the result is considered converged when the sum in the absolute-value difference between the DFT Hamiltonian operator eigenvalues between two consecutive SCF iterations is smaller thantolerance*mixing
.
Whether to display the SCF iteration progress [ true (default) | false ]
To facilitate simulations, QMol_DFT_SCF_Anderson
defines a handful of additional transient properties. These cannot be edited with the set
method.
Whether the DFT-model object is properly initialized. This is used throughout the QMol-grid package to check that the DFT-model object holds meaningful information and is ready for use.
Create an Anderson's mixing scheme object with empty class properties.
obj = QMol_DFT_SCF_Anderson;
Create an Anderson's mixing scheme object with the name
properties set to the specified value
. Several name-value
pairs can be specified consecutively. Suitable name
is any of Anderson's mixing and is case insensitive.
obj = QMol_DFT_SCF_Anderson(name1,value1);
obj = QMol_DFT_SCF_Anderson(name1,value1,name2,value2,___);
Update the name
properties of an Anderson's mixing scheme object to the specified value
. Several name-value
pairs can be specified consecutively. Suitable name
is any of Anderson's mixing and is case insensitive.
obj.set(name1,value1);
obj.set(name1,value1,name2,value2,___);
This is the common name-value pair assignment method used throughout the QMol-grid package. The set
method also reset
the class. After running, the set
property updates the isInitialized
flag to a false
value.
Reset the object by deleting/re-initializing all run-time properties of the class and updating the isInitialized
flag to false
.
obj.reset;
- This is the common
reset
method available to all classes throughout the QMol-grid package.
Clear all class properties
obj.clear;
Clear a specific set of the class properties. Suitable name
is any of Anderson's mixing and is case insensitive.
obj.clear(name1,name2,___);
This is the common clear
method available to all classes throughout the QMol-grid package. The clear
method also reset
the class.
Initialize a QMol_DFT_SCF_Anderson
object and set the isInitialized
flag to true
.
obj.initialize;
Display the run-time documentation for the specific configuration of a QMol_DFT_SCF_Anderson
object, wich must have been initialize
d beforehand.
ref = obj.showDocumentation;
- The output
ref
is a cell vector containing the list of references to be included in the bibliography.
Compute the solution of the SCF problem of Eq. (1) with
obj.solveSCF(DFT);
-
DFT
is the DFT-model handle object, i.e.,QMol_DFT_spinPol
orQMol_DFT_spinRes
, that describes the DFT Hamiltonian operator of Eq. (1). - To avoid any mismatch in internal properties,
solveSCF
firstreset
the object and (re)initializes theDFT
before performing the SCF iterations. - The first step of the SCF iterations uses linear mixing (with the
mixing
coefficient); the following iterations use Anderson's mixing. - For grid-based DFT models, the SCF iterations use the
QMol_DFT_eigs
eigen-state solver with default properties; for basis set models, it uses theQMol_DFT_eig_basis
solver (again with default properties). - The result Kohn-Sham orbitals are stored in the input
DFT
object (inDFT.orbital
).
Specify the eigen-state solver to use in the SCF iterations with
obj.solveSCF(DFT,ES);
- This enables non-default properties for the eigen-state solver object
ES
.
Specify the initial condition to start the SCF iterations with
obj.solveSCF(DFT,[],IC); % Default eigen-state solver
obj.solveSCF(DFT,ES,IC); % supplied eigen-state solver
-
IC = []
(or omitted) starts the SCF iterations from scratch, from the equivalent of the eigen-states of the external potential only (no Hartree or exchange-correlation contribution). This is the default and most general option but my result in slow (or failed) convergence. -
IC = 'DFT'
starts the SCF iterations from the one-body density from the input DFT object (DFT.getDensity
). -
IC = rho
, whererho
is a compatible one-body density object, starts SCF iterations from the supplied one-body density (the total charge inrho
may not match theDFT
total charge, in which case the input density is rescaled to the proper total charge). -
IC = Vks
, whereVks
is a compatible Kohn-Sham potential object, starts SCF iterations from the supplied Kohn-Sham potential. - The type of initial condition may not match the
mixingMode
. For instance, one my supply a starting one-body density while mixing the Kohn-Sham potential in the SCF iterations.
Examples of SCF calculations for spin-polarized and spin-restricted DFT models can be found in the QMol_DFT_spinPol
and QMol_DFT_spinRes
documentation pages, respectively.
Run the test suite for the class in normal or summary mode respectively with
QMol_test.test('DFT_SCF_Anderson');
QMol_test.test('-summary','DFT_SCF_Anderson');
[Anderson 1965] D.G. Anderson, "Iterative procedures for nonlinear integral equations," Journal of the ACM 12, 547 (1965).
[Johnson 1988] D. D. Johnson, "Modified Broyden''s method for accelerating convergence in self-consistent calculations," Physical Review B 38, 12807 (1988).
-
QMol_DFT_SCF_Anderson
was introduced in version 01.00.
This wiki is a copy of the documentation provided with the QMol-grid package (accessible in MATLAB documentation, via the "Supplemental Software" section).
Copyright © 2024, Francois Mauger, all right reserved.
Density-functional theory (DFT)
QMol_DFT_density
QMol_DFT_eigs
QMol_DFT_eig_basis
QMol_DFT_orbital
QMol_DFT_orbital_basis
QMol_DFT_profiler
QMol_DFT_SCF_Anderson
QMol_DFT_spinPol
QMol_DFT_spinRes
QMol_DFT_Vc_LDA_soft
QMol_DFT_Vext
QMol_DFT_Vh_conv
QMol_DFT_Vh_fft
QMol_DFT_Vks
QMol_DFT_Vks_basis
QMol_DFT_Vks_grad
QMol_DFT_Vx_LDA_exp
QMol_DFT_Vx_LDA_soft
QMol_DFT_Vx_XX_conv
QMol_DFT_Vx_XX_fft
Tutorials
- Tutorial 1: Schrödinger-equation ground state
- Tutorial 2: Schrödinger-equation input and output
- Tutorial 3: Time-dependent Schrödinger equation
- Tutorial 4: Time-dependent Schrödinger-equation input and output
- Tutorial 5: Density-functional theory ground state
- Tutorial 6: Time-dependent density-functional theory
- Tutorial 7: Time-dependent density-functional theory input and output