User:Tamcd00dle/sandbox
Original author(s) | Chao Yang, Juan C. Meza |
---|---|
Developer(s) | Lawrence Berkeley National Laboratory |
Website | KSSOLV |
KSSOLV is a MATLAB toolbox[1] for solving a class of nonlinear eigenvalue problems known as the Kohn-Sham equations[2]. Developed by Chao Yang and Juan C. Meza from the Lawrence Berkeley National Laboratory, KSSOLV is designed using the objected oriented programming features available in MATLAB. It allows users to assemble an atomistic system and facilitates development and comparison of new numerical methods for solving the Kohn-Sham equations.
Background Information
[edit]Solving the Kohn-Sham equations is a problem that arises from electronic structure calculation, used to study the microscopic quantum mechanical properties of molecules, solids and other nanoscale materials. Through the density functional theory (DFT) formalism, the many-body Schrödinger equation can be reduced to a set of single-electron equations with fewer degrees of freedom.
The Kohn-Sham equations have the form
where is the number of electrons in the system,
() is a set of single electron wavefunctions that are mutually orthonormal, is the total electron charge defined by
and
are the smallest eigenvalues of , a linear operator that depends on . The operator is known as the Kohn-Sham Hamiltonian and defined by
where is the Laplacian operator, and are known as the ionic and exchange-correlation potentials respectively[2], and denotes the convolution operator.
The Kohn-Sham equations are the the Euler-Lagrange equations for the total energy minimization problem
where
is the exchange-correlation energy[2].
The Kohn-Sham equations are different from the standard linear eigenvalue problem in that the matrix operators are functions of the eigenvectors to be computed. Due to this nonlinear coupling between the matrix operator and its eigenvector, the Kohn-Sham equations are more difficult to solve. Currently, the most widely used numerical method for solving the this type of problem is the Self Consistent Field (SCF) iteration[3][4]. An alternative approach is designed to minimize the total energy directly. Both methods have been implemented in KSSOLV to allow users to compute the solution to the Kohn-Sham equations associated with various molecules and solids.
Several classes are created in KSSOLV to define both physical objects such as atoms and molecules and mathematical entities such as wavefunctions and Hamiltonians. These classes are defined in a hierarchical fashion so that a molecule object can be constructed from atom objects.
Setup
[edit]KSSOLV is built around the MATLAB language. The environmental variable KSSOLVPATH should be defined prior to running KSSOLV.
Test Problems
[edit]KSSOLV contains a number of test problems designed for experimentation:
setup file name | nocc | Description |
c2h6_setup.m | 7 | an ethane molecule |
co2_setup.m | 8 | a carbon dioxide molecule |
h2o_setup.m | 4 | a water molecule |
hnco_setup.m | 8 | an isocyanic acid molecule |
qdot_setup.m | 8 | a 8-electron quantum dot confined by an external potential |
si2h4_setup.m | 6 | a planar singlet silylene molecule |
sibulk_setup.m | 6 | a silicon bulk system |
sih4_setup.m | 4 | a silane molecule |
ptnio_setup.m | 43 | a Pt2Ni6O molecule |
Molecular Systems
[edit]A molecular system is defined by creating an Molecule object, using
mol = Molecule ();
Properties of this object are specified using the set method associated with the object. For example,
mol = set(mol, 'atomlist', alist);
Atoms can be specified by their chemical symbols or atomic numbers; for example, the silicon atom can be defined by
a = Atom('Si')
or
a = Atom(14);
The position of each atom in the atom list is specified by an na × 3 array; the ith row of this array gives the coordinates of the ith atom in the atom list. The unit of the coordinates should be in Bohr (1 Bohr = 0.5291772083 Angstrom).
Alternatively, the relative position of each atom in a unit (super)cell (of a periodic lattice) can first be specified by three lattice vectors c1, c2, and c3. If the relative displacement of the atom along ci is denoted by , then the absolute coordinates of the atom correspond to the three components of the row vector
,
where .
The 3 × 3 matrix C defines a unit supercell in KSSOLV. It can be used to set the 'supercell' attribute of a Molecule object. For example,
mol = set(mol,'supercell',10*eye(3));
sets the unit supercell of mol to a 10×10×10 cube.
In order to discretize the Kohn-Sham equations with an appropriate number of planewave basis functions, a kinetic energy cutoff Ecut must be specified through
mol = set(mol,’ecut’,cutoff_value);
where cutoff value is a user-supplied number in the unit of Rydberg (Ryd).
The Silane molecule might be set up as follows:
%
% 1. construct atoms
%
a1 = Atom('Si');
a2 = Atom('H');
alist = [a1; a2; a2; a2; a2];
%
% 2. set up primitive cell (Bravais lattice)
%
C = 10*eye(3);
%
% 3. define the coordinates the atoms
%
coefs = [
0.0 0.0 0.0
0.161 0.161 0.161
-0.161 -0.161 0.161
0.161 -0.161 -0.161
-0.161 0.161 -0.161
];
xyzmat = coefs*C';
%
% 4. Configure the molecule
%
mol = Molecule();
mol = set(mol,'Blattice',C);
mol = set(mol,'atomlist',alist);
mol = set(mol,'xyzlist' ,xyzmat);
mol = set(mol,'ecut', 25); % kinetic energy cut off
mol = set(mol,'name','SiH4');
Solving the Kohn-Sham Equations
[edit]Once an Molecule object is properly set up, computing the electron wavefunctions associated with the minimum total energy of the molecular system can be performed in KSSOLV by calling one of the available functions.
function | Description |
scf.m | Self consistent field iteration |
chebyscf.m | Chebyshev filtered self consistent field iteration |
dcm.m | direct constrained minimization (DCM)[5] |
trdcm.m | direct constrained minimization with flexible trust region parameters[5] |
trdcm1.m | direct constrained minimization with a fixed trust region parameter[5] |
Visualization
[edit]The electron charge density, total potential and single particle wavefunctions can be visualized using either the MATLAB’s isosurface rendering function isosurface or the volume rendering function written by Joe Conti (see External Links), which is also included in KSSOLV.
![]() |
![]() |
The computed charge density of a silane molecule. | A volume rendering of the computed charge density of a silane molecule. |
References
[edit]- ^ C. Yang, J. C. Meza, B. Lee, and L-W. Wang. KSSOLV: A MATLAB toolbox for solving the Khon-Sham equations. ACM Trans. Math. Soft., to appear, 2009.
- ^ a b c W. Kohn and L. J. Sham. Self-consistent equations including exchange and correlation effects. Phys. Rev., 140., (4A): A1133-A11388, 1965.
- ^ C. Yang, J. C. Meza, and L. W. Wang. A trust region direct constrained minimization algorithm for the Kohn-Sham equation. SIAM J. Sci. Comp., 29(5):1854-1875, 2007.
- ^ P. Pulay. Convergence acceleration of iterative sequences: The case of SCF iteration. Chemical Physics Letters, 73(2):393-398, 1980.
- ^ a b c C. Yang, J. C. Meza, and L. W. Wang. A constrained optimization algorithm for total energy minimization in electronic structure calculation. Journal of Computational Physics, 217:709-721, 2005.
Further Reading
[edit]- D. G. Anderson. Iterative procedures for nonlinear integral equations. J. Assoc. Comput. Mach., 12:547, 1965.
- T. A. Arias, M. C. Payne, and J. D. Joannopoulos. Ab initio molecular dynamics: Analytically continued energy functionals and insights into iterative solutions. Phys. Rev. Lett., 69:1077-1080, 1992.
- N. W. Ashcroft and N. D. Mermin. Solid State Physics. Brooks Cole, Pacific Grove, CA,1976.
- Felix Bloch. Uber die Quantenmechanik der Elektronen in Kristallgittern. ? Z. Physik, 52:555-600, 1928.
- P. J. Davis. Circulant Matrices. Wiley, New York, 1979.
- P. P. Ewald. Die Berchnung optischer und elektrostatischer Gitterpotentiale. Ann. Phys., 64:253-287, 1921.
- V. Eyert. A comparison study on methods for convergence acceleration of iterative vector sequences. J. Comp. Phys., 124:271-285, 1996.
- H. R. Fang and Y. Saad. Two classes of multisecant methods for nonlinear acceleration. Numerical Linear Algebra and Its Applications, to appear, 2009.
- M. J. Gillan. Calculation of the vacancy formation in aluminum. J. Phys. Condens. Matter, 1:689-711, 1989.
- J. Ihm, A. Zunger, and M. L. Cohen. Momentum-space formalism for the total energy of solids. J. Phys. C: Solid State Physics, 12:4409-4422, 1979.
- G. P. Kerker. Efficient iteration scheme for self-consistent pseudopotential calculations. Phys Rev. B, 23:3082-3084, 1981.
- L. Kleinman and D. M. Bylander. Efficacious form for model pseudopotentials. Phys. Rev. Lett., 48:1425, 1982.
- A. Knyazev. Toward the optimal preconditioned eigensolver: Locally optimal block preconditioned conjugate gradient method. SIAM J. Sci. Comput., 22(2):517-541, 2001.
- G. Kresse and J. Furthm?uller. Efficiency of ab initio total energy calculations for metals and semiconductors using a plane-wave basis set. Computational Materials Science, 6:15-50, 1996.
- L. Marks and R. Luke. Robust mixing for ab initio quantum mechanical calculations. Phys. Rev. B, 78:075114-1-12, 2008.
- H. Nyquist. Certain topics in telegraph transmission theory. Trans. AIEE, 47:617-644,1928.
- M. C. Payne, M. P. Teter, D. C. Allen, T. A. Arias, and J. D. Joannopoulos. Iterative minimization techniques for ab initio total energy calculation: molecular dynamics and conjugate gradients. Reviews of Modern Physics, 64(4):1045-1097, 1992.
- J. C. Phillips. Energy-band interpolation scheme based on a pseudopotential. Phys. Rev.,112(3):685-695, 1958.
- J. C. Phillips and L. Kleinman. New method for calculating wave functions in crystals and molecules. Phys. Rev., 116(2):287-294, 1958.
- W. E. Pickett. Pseudopotential methods in condensed matter applications. Computer Physics Report, 9:115-197, 1989.
- D. Raczkowski, A. Canning, and L. W. Wang. Thomas-Fermi charge mixing for obtaining self-consistency in density functional calculations. Physical Review B, 64:121101-1-4, 2001.
- W. Ritz. Ueber eine neue methode zur l?osung gewisser variations problem der mathematischen physik. J. Reine Angew. Math, 135:1-61, 1908.
- M. P. Teter, M. C. Payne, and D. C. Allan. Solution of Schr?odinger's equation for large systems. Physical Review B, 40(18):12255-12263, 1989.
- N. Troullier and J. L. Martins. Efficient pseudopotentials for plane-wave calculations. Phys. Rev. B, 43:1993-2005, 1991.
- C. Van Loan. Computational Frameworks for the Fast Fourier Transform. SIAM, Philadelphia, PA, 1987.
- J. VandeVondele and Jurg Hutter. An efficient orbital transformation method for electronic structure calculations. Journal of Chem. Phys., 118:4365-4369, 2003.
- T. Van Voorhis and M. Head-Gordon. A geometric approach to direct minimization. Molecular Physics, 100(11):1713-1721, 2002.
- M. T. Yin and M. L. Cohen. Theory of ab initio pseudopotential calculations. Phys. Rev. B, 25(12):7403-7412, 1982.