Spectral quadrature for the first principles study of crystal defects: Application to magnesium
Abstract
We present an accurate and efficient finite-difference formulation and parallel implementation of Kohn-Sham Density (Operator) Functional Theory (DFT) for non periodic systems embedded in a bulk environment. Specifically, employing non-local pseudopotentials, local reformulation of electrostatics, and truncation of the spatial Kohn-Sham Hamiltonian, and the Linear Scaling Spectral Quadrature method to solve for the pointwise electronic fields in real-space and the non-local component of the atomic force, we develop a parallel finite difference framework suitable for distributed memory computing architectures to simulate non-periodic systems embedded in a bulk environment. Choosing examples from magnesium-aluminum alloys, we first demonstrate the convergence of energies and forces with respect to spectral quadrature polynomial order, and the width of the spatially truncated Hamiltonian. Next, we demonstrate the parallel scaling of our framework, and show that the computation time and memory scale linearly with respect to the number of atoms. Next, we use the developed framework to simulate isolated point defects and their interactions in magnesium-aluminum alloys. Our findings conclude that the binding energies of divacancies, Al solute-vacancy and two Al solute atoms are anisotropic and are dependent on cell size. Furthermore, the binding is favorable in all three cases.
Swarnava Ghosha and Kaushik Bhattacharyab
a National Center for Computational Sciences, Oak Ridge National Laboratory, Oak Ridge, TN 37830
b Division of Engineering and Applied Science, California Institute of Technology, Pasadena, CA 91125
Keywords: Spectral quadrature, Linear-Scaling, Density Functional Theory, Defects, Magnesium
1 Introduction
Crystal defects, even when present in small concentrations are crucial in determining macroscopic properties of materials. Vacancies, present in parts per million are fundamental to creep, spall and radiation aging. Dislocations, whose density is as small as per atomic row, are the primary carriers of plasticity in metals, solutes present in parts per hundred are responsible for strengthening by interacting with the motion of dislocations, further solutes can aggregate to nucleate a precipitate.
First principles calculations based on Kohn-Sham density functional theory (DFT)[21, 27] have become central to computational materials research, thereby providing fundamental insights into materials properties and behavior. The success of DFT can be attributed to its excellent predictive power with low accuracy to cost ratio compared to other wavefunction based electronic structure methods [8, 6, 56]. In spite of its success and widespread use, the efficient solution of Kohn-Sham equations is still computationally daunting, thereby restricting the range of physical systems that can be investigated. In particular, crystal defects have been particularly challenging because they lead to long-range interactions, the reason why they influence mechanical behavior at small concentrations.
These challenges have led to the development of a number of linear-scaling DFT methods. However, many of them assume exponential decay of the off-diagonal components of the density matrix , and truncate them to a finite width. However, while this is reasonable for insulators (since it requires the existence of a band-gap), questions about accuracy remains in the case of metals. An alternative linear-scaling approach – the linear scaling spectral Gauss quadratures (LSSGQ) – was introduced by Suryanarayana, Bhattacharya and Ortiz [53]. The key idea is to write the density matrix as a (Reimann-Stieltjes) integral over the spectrum (energy states) of the linearized Hamiltonian and then to approximate it using quadratures. In particular, Gauss quadratures allows one to use the Lanczos algorithm to evaluate the diagonal components of the density matrix at effort at each spatial point leading to a linear scaling algorithm when one has local pseudopotentials. Further, the local aspect allows one to introduce variable resolution where fine resolution is maintained where necessary and sub-grid sampling is used in regions of uniform deformation [53, 40, 41]. However, it is computationally difficult to compute off-diagonal components of the density matrix using Gauss quadratures, and this makes LSSGQ difficult to extend to nonlocal pseudopotentials.
Suryanarayana [52] subsequently showed that LSSGQ may be considered a generalization of the Fermi operator expansion (FOE) method using Lagrange polynomials. This work also proves error estimates for FOE using a polynomial basis, and showed that Gauss quadratures were the most efficient. It also shows that purification methods using Chebyshev polynomials is equivalent to the use of Clenshaw-Curtis quadratures. This understanding has led to a series of efficient algorithms using spectral quadratures [43, 55] and applications to first-principles molecular dynamics [55, 64, 48].
The first goal of this work is to retain the efficiency of LSSGQ, but also extend it to nonlocal pseudopotentials. We do so by using LSSGQ for computing the electronic states with atomic positions and Clenshaw-Curtis quadratures for computing the nonlocal contribution of the forces on the atom. We also introduce a domain decomposition that enables parallel implementation.
The second goal of this work is to use this algorithm to study defects in magnesium. Magnesium is abundantly available on the earth’s crust, the lightest among all commonly used structural metals, and has among the highest strength to weight ratio [23, 35, 39]. Aluminum is a commonly used alloying element, and the relative strength of AZ class of magnesium alloys can be attributed to the hexagonal closed-packed (HCP) structure of the magnesium matrix and the phase Mg17Al12 precipitates with body-centred cubic structure (space group ) [35, 23, 39, 33].
We study isolated vacancy and isolated substitutional aluminum solute in a magnesium lattice along with defect pairs – vacany pairs, solute-vacancy and solute pairs. These pairs play an important role in determining the mechanical behavior and processing of magnesium and its alloys. Vacancy clusters can give rise to prismatic dislocation loops[41, 13] or serve as nuclei for voids which in turn are important for spall [32, 18, 12]. Such clusters can only form if vacancies in fact can bind. Similarly, aluminum has limited solubility in magnesium and the resulting Mg17Al12 precipitates play a critical role in strengthening magnesium alloys [39, 23, 33, 34, 14]. This in turn requires both the diffusion of aluminum in a magnesium lattice and an accumulation of aluminum. The diffusion is greatly aided by the formation of solute-vacancy pairs while the accumulation of aluminum is aided by the binding of aluminum solutes. Finally, vacancy diffusion is important for dislocation climb, a critical mechanism in creep, and the formation of solute-vacancy pairs are again important. Previous DFT studies have shown a solute vacancy binding energy that is significantly smaller than that experimentally observed, and non-binding of Al solute pairs raising questions about the mechanism of formation of Al-rich precipitates. We show that the study of these defects require large computational cells of the type afforded by our algorithm, and suggests that previous contradictory results may have been artifacts of small computational cells.
2 Methodology
2.1 Density Operator Formulation of Kohn Sham Density Functional Theory
We consider a cuboidal domain with atoms and valence electrons. Let be the positions of the nuclei with valence charges , respectively. The free energy of this system in Kohn-Sham Density Functional Theory (DFT) [21, 27] and expressed in terms of density operator [36, 61] is
(1) |
where is the density operator, denotes the trace of an operator, := is the electron density. The first term in (1) is the kinetic energy of non-interacting electrons and is the exchange correlation energy in the local density approximation (LDA). Specifically we use the Perdew-Wang parameterization [38] of the correlation energy calculated by Ceperley-Alder [9]. The third term, , is the contribution of the non-local pseudopotential to the free energy. is the non-local pseudopotential operator given by
where is the contribution to the non-local pseudopotential operator from the atom, and the summation over is over all nuclei whose supports of the non-local projectors overlap with domain . The fourth term is the electrostatic energy which is expressed within the local reformulation framework [54, 37, 15] as
(2) |
where denotes the electrostatic potential, represents the total pseudocharge density of the nuclei and is the self energy of the nuclei
(3) |
where is the pseudocharge density of the nucleus generating the potential (the summation over is over all nuclei in whose pseudocharge densities overlap with ). The final term in (1) is the electronic entropy arising from the partial occupancies of the electronic states at a finite electronic temperature with
(4) |
and the identity operator.
The ground state in DFT obtained by minimizing the functional over all atomic positions and all density operators associated with electrons. It is convenient to nest this minimization problem by first calculating the electronic ground state:
(5) |
and then relaxing over all atomic configurations
(6) |
The Euler-Lagrange equation to the variational problem (5) is a nonlinear fixed-point problem:
(7) |
where is the electronic smearing, the Fermi energy is the Lagrange multiplier employed to enforce the constraint on the number of electrons, and the Hamiltonian is
(8) |
with the exchange-correlation potential and the solution of the Poisson equation
(9) |
subject to appropriate boundary conditions. Note that is local (diagonal operator) and hence its action on a function is given by . The action of the non-local pseudopotential operator is given by
(10) |
After evaluating the electronic ground state, the free energy is calculated using the functional:
(11) | |||||
where is the band structure energy. The atomic force on the atom is calculated using the expression
(12) |
where the first term is local (recall that depends only on the local or diagonal components of the density operator) while the second term is non-local and requires the off-diagonal terms of the density operator.
2.2 Linear Scaling Spectral Quadrature
We follow the Spectral Quadrature (SQ) method [40, 41, 53, 52, 43, 55] for solving the DFT problem. The key idea is to ground state quantities as (Reimann-Stieltjes) integrals over the spectrum of the Hamiltonian. Given the Fermi level and the Hamiltonian , we can use (7) to write
(13) |
for any function where is the spectrum of , and is the spectral measure of contracted with . We use the spectral theorem [46] to obtain the second equality. We can now use quadratures to approximate the integral. In this work we use Gauss quadratures to find the electronic ground state and Clenshaw-Curtis quadratures to find the force on an atom.
Spectral Gauss quadrature
We follow the linear scaling spectral Gauss quadrature (LSSGQ) method of Suryanarayana, Bhattacharya and Ortiz [53] that exploits the structure of Gauss quadratures to evaluate the electronic ground state. In Gauss quadratures, we approximate any function in terms of Lagrange polynomials as
(14) |
where is the degree of the expansion and are the spectral nodes. We can use this expansion to approximate the integral of the function over the spectrum of ,
(15) |
where the spectral weight denotes the integral .
Now, consider a discretization of the computational domain using a regular finite difference grid with points, and let be a set of orthonormal basis functions associated with this discretization such that is compactly supported near the grid point. We can then approximate the integrals that make up the electronic ground state (cf. (11)) as
(16) |
where
(17) | |||||
(18) | |||||
(19) |
is the Fermi-Dirac function
(20) |
and is the pointwise contribution to the electronic entropy
(21) |
In Gauss quadrature, the weights are fixed apriori, and the spectral nodes are treated as unknowns. An efficient way of evaluating the spectral weights and nodes at any grid point is by employing the Lanczos iteration
(22) |
where , , and is computed such that . We denote the Jacobi matrix as
(23) |
The nodes are calculated as the eigenvalues of , and the weights are the squares of the first elements of the normalized eigenvectors of .
The key observations of LSSGQ are that (i) the number of quadrature points is independent of system size and (ii) the vectors remains zero except for a small region around the grid point during Lanczos iteration (2.2). Therefore, the evaluation of the spectral nodes at each grid point is as is the evaluation of all the electronic quantities of interest (cf. (11) and (16)). This enables us to evaluate the electronic ground state at linear cost.
We further observe that this limited support of the vectors enables the restriction of the Hamiltonian to an appropriate subspace of the real-space computational domain . This enables us to use domain decomposition in our numerical implementation discussed in Section. 3.
Spectral Clenshaw-Curtis quadrature
While the Gauss quadrature provides a very efficient approach to evaluating the electronic ground state since it depends only on the diagonal terms of the density matrix, it is unable to evaluate quantities like the contribution of the non-local pseudopotential to the atomic force that depends on the off-diagonal components. Therefore, we use the spectral Clenshaw-Curtis quadrature [52, 43, 55].
The Hamiltonian is first scaled and shifted such that its spectrum lies in the interval
(24) |
where , , and , are the maximum and minimum eigenvalues of , respectively. Given any function , we can rewrite (13) using the scaled and shifted Hamiltonian :
(25) |
where and are the scaled Fermi energy and the scaled electronic temperature respectively. In the Clenshaw-Curtis variant of the spectral quadrature, any function is expanded in terms of Chebyshev polynomials as:
(26) |
where is the degree of the expansion, are the spectral nodes which are fixed in Clenshaw-Curtis quadrature. The non-local component of the atomic force [43, 55] as
(27) | |||||
where are constants
(28) |
and are functions which are determined by the three term recurrence relation for Chebyshev polynomials:
(29) | |||||
Once again, the number of quadratures is independent of the system size and therefore this evaluation scales linearly.
3 Numerical Implementation
Fig. 1 shows the flowchart of the scheme employed to solve the DFT problem. The non-linear fixed point problem (Eqn. 7) is solved using the self-Consistent field (SCF) iteration. Briefly, given a charge density and electrostatic potential, we construct a linearized Hamiltonian which is used to compute the spectral weights nodes using Lanczos iteration from which the updated electronic states including an updated charge density and electrostatic potential are determined; the process iterates till convergence. Once the electronic ground state is established, the atomic relaxation for the overall ground state (Eqn. 6) is achieved using the Non-Linear Conjugate Gradient (NLCG) method [49].
We discuss further details of the key components of the implementation below. In this paper, we are interested in isolated defects. Therefore, we consider a computational domain that is embedded in an infinite perfect crystal. The method can be extended to other situations including periodic boundary conditions and isolated clusters surrounded by vacuum.

Discretization
Let be a cuboidal computational domain aligned with the coordinate axis, and let it be discretized using a regular grid so that the grid spacing is in the coordinate where . We index the grid points with and let be the set of all grid points. We discretize the gradient and Laplace operators using finite differences on this grid [17, 16].
Hamiltonian at each grid point
In each iteration of SCF, we need to determine the spectral nodes and weights at each grid point. As evident from (2.2) and (29), this requires the calculation of the action of Hamiltonian on vectors . These vectors are compactly supported around a ball centered at the grid point. Therefore, it is sufficient to work with the Hamiltonian projected on to a smaller subspace around the grid point. Specifically, we work with a cuboidal region of side and centered at the grid point which we call region of influence. This is shown schematically in Fig. 2a. The controllable parameter depends on the order of the quadrature which in turn depends on material properties and electronic smearing temperature [43, 55].
For grid points close to the edge of , the nodal Hamiltonian can extend beyond the computational domain for grid points which are near the boundary of . However, since we consider problems where our computational domain is embedded in an infinite crystal, we have to compute the Hamiltonian on an extended region of size , and centered at the origin. The values of the Hamiltonian associated with the annular is obtained using precomputed electronic fields ( and ) for the perfect crystal.
Domain decomposition
We use domain decomposition for parallel implementation. The computational domain is partitioned into disjoint domains, , where denotes the domain local to the processor, and is the total number of processors. The collection of grid points belonging to the processor is denoted by , where , and (null set) for . In our implementation, we use the DMDA class available through the Portable, Extensible Toolkit for Scientific Computation (PETSc) [3, 4] for mesh management. The communication between processes is handled by Message Passing Interface (MPI) libraries [19, 20].
The region of influence of an grid point owned by a process (i.e. ) may extend to the spatial regions owned by neighboring processes. In such a situation, the values of the effective potential from neighboring processes are communicated to the process using an MPI communicator. In Fig. 2b we schematically illustrate the parallel communication pattern involved for communicating the effective potential from neighboring processes. This reduces the number of MPI related calls otherwise required for matrix vector products.


Spectral weights, nodes and electronic fields
In each SCF iteration, the spectral weights and nodes are computed at every grid point from the projected Hamiltonian . Overall, this is computationally the most expensive part of the method. However, the computation is local and with no MPI related calls. Further, we do not explicitly store the matrices, and their multiplication with a vector is performed in a matrix-free manner. These lead to excellent parallel efficiency.
Once the spectral weights and spectral nodes are computed at all the grid points for all the processes , we first solve the following equation for the Fermi energy :
(30) |
We utilize Brent’s algorithm [7] for this purpose. The summation across the polynomial degree and the grid point is performed locally in each processes, and the summation across the processes is performed with one global MPI communication call.
Electrostatic and effective potential
Once the electron density is calculated at the grid points, we calculate the total electrostatic potential at the grid points by solving the Poisson equation (9) on subject to Dirichlet boundary conditions obtained from the perfect crystal outside using the generalized minimal residual algorithm (GMRES) [47]. Once the electrostatic potential is calculated at every grid point , we calculate the effective potential at every grid point
(31) |
where is the exchange correlation potential.
The convergence of the SCF iteration is accelerated by employing mixing schemes. In every SCF iteration, we mix the effective potential , where we have the option of employing Anderson mixing [2], Pulay mixing scheme [44] and its periodic [5] and restarted [42] variants.
We check the convergence of SCF iteration by calculating the normalized error in the effective potential.
Free energy
The free energy is computed once the SCF iteration has converged using a discrete version of Eqn. 11
(32) |
where is the contribution of the exchange correlation energy at the grid point, and is the discrete representation of the self energy (3):
(33) |
In evaluating them, the sum over the grid points are carried out locally on each MPI process followed by a global sum across all the MPI processes .
Atomic forces
The final step is the computation of the atomic forces (Eqn. 12). This has two parts, the contributions of the local pseudopotential and the non-local pseudopotentials. The contribution of the local pseudopotential to the atomic force is calculated as
(34) |
where is the gradient operator in the discrete setting. The summation over the the grid points is local to every process, followed by one summation over the MPI processes.
The non-local contribution to the atomic force is calculated by employing the Clenshaw-Curtis quadrature described in Section 2.2. At each grid point , we calculate the discrete Chebyshev vectors using the iterative scheme (29), and the Clenshaw-Curtis quadrature weights using (28) with the discrete nodal Hamiltonian . The non-local force is given by
(35) |
The calculation of the atomic forces scales linearly with the number of atoms.
4 Convergence and Performance
We set the electronic temperature to be = 0.03333 Ha, and use Troullier-Martins non-local pseudopotentials [57]. These yield lattice parameters of = 6.043 Bohr, = 9.848 Bohr and ratio of 1.629 for hexagonal closed packed (HCP) magnesium, and =19.58 Bohr for body centered cubic (BCC) Mg17Al12. These agree with the previously reported values of the lattice constants: =5.972 Bohr, =1.61 (DFT) [10], =6.066 Bohr, =1.623 (experiment)[26, 28] for Mg, and the equilibrium lattice constant of the Mg17Al12 or MgAl phase is = 19.96 Bohr (DFT) [11], and = 19.653 Bohr (experiment) [63] for Mg17Al12.
Convergence of spectral quadrature


We first verify the convergence with respect to spectral quadrature. We take the same degree for both the Gauss and the Clenshaw-Curtis quadrature. We study HCP Mg and BCC MgAl. For each of these systems, we randomly perturb the atoms from the ground state to obtain the test configuration, and use a mesh of Bohr for pure Mg and Bohr for MgAl.
Fig. 3a shows the convergence of the energy and Fig. 3b shows the convergence of atomic forces with . The error is computed with respect to the reference that is taken to be the solutions for =. The decay is not monotone because neither the free energy functional (Eqn. 1) nor the atomic forces (Eqn. 12) is variational with respect to . However, it broadly follows an exponential decay (Error ). The best fit for the various cases is shown in Table 1. The pure Mg system has a higher rate of convergence than the MgAl system. Furthermore, in both the cases, the rate of convergence in total energy and the local component of the atomic force is similar, whereas the rate of convergence in the total force, which require calculating the non-local force component is smaller by almost a factor 2. This is so because the local component of the atomic force and energy use only Gauss quadrature which depends on Lagrange polynomials whereas the non-local component of atomic forces depends on Clenshaw Curtis quadrature with Chebyshev polynomials. The former is known to be more accurate than the latter [52].
Since we require an accuracy of about and Ha/atom in our energy, we need between and for Mg, and between and for MgAl. Similarly, since we require an accuracy between and Ha/Bohr in the total force, we need between and for Mg and MgAl. These guide our further calculations.
System | Energy | Force (local) | Force (total) |
---|---|---|---|
MgAl | 0.070 | 0.075 | 0.036 |
Mg | 0.109 | 0.088 | 0.042 |
Convergence with radius of truncation


A loose upper bound of the size of Lanczos vectors in (2.2) is given by , where is the average mesh spacing, and is the finite difference order. This suggests a choice of . Using the choice of parameters used for this study, Bohr. This would make the calculations extremely expensive. However, we now show that it is not necessary by studying the error as a function of .
For the Mg and and MgAl systems, we use a Lanczos polynomial degree = and a Chebyshev polynomial degree = , and vary from to Bohr. Fig. 4a and 4b shows the error in energy and atomic force as a function of . The reference values of energy and atomic force is calculated using an = Bohr. From these figures, we observe that as increases, the error in energy and forces decrease. We once again observe generally exponential decay, though it is not monotone (also see [43]). This allows us to treat as a controllable approximation parameter.
Scaling and performance




Next, we turn to the scaling and efficiency of the formulation and parallel implementation developed in this work. We choose magnesium crystal with one aluminum solute atom, placed at the center of the computational domain. The simulation parameters used are = Bohr, = Bohr, = and = with a desired accuracy of Ha/atom in energy and Ha/Bohr in atomic force.
We first perform a strong scaling study with a atom system, varying the number of cores from to . The wall times for each SCF iteration is presented in Fig 5a. The parallel efficiency on relative to 30 cores is percent. This data is plotted in terms of speed up in Fig. 5b. Next, we perform a weak scaling study by selecting systems with sizes ranging from atoms to atoms, while increasing the number of processors from to . We choose these such that the number of atoms per MPI process is between two and three. Fig 5c shows that the variation of CPU time for one SCF iteration versus the number of atoms is linear (). Fig. 5d shows that the memory required also scales linearly with respect to the number of atoms. All of this shows excellent scaling of our algorithm. This is due in part to restricting much of the parallel communication to the MPI processes that are neighbors, and keeping the global communication to a minimum.
We note that the spectral quadrature step accounts for greater than percent of the total time in each SCF iteration. The prefactor of spectral quadrature can be significantly reduced by incorporating reduced basis methods such as Discrete Discontinious Basis Projection ([62]). Further, the number of SCF iterations to achieve a fixed target SCF error increases with system size in metallic systems due to charge sloshing [24]. The introduction of real space preconditioning schemes [50, 29] is likely to reduce this for large metallic systems.
5 Defects in magnesium
We now study isolated point defects and defect pairs in magnesium. Of particular interest are the formation energy of isolated defects and binding energy of defect pairs. Let be the energy of a crystal with solvent atoms, solute atoms and vacancies. The formation energy of a defect cluster with solute atoms and vacancies is the excess energy of the crystal with defect cluster over the those of perfect crystals of the host and solute:
(36) |
where is the energy per atom of the solute in its perfect crystalline state. Note that when we have an isolated solute and no vacancies, the formation energy is referred to as dilute impurity energy. Further, the binding energy of this cluster is
(37) |
Note that the defect is stable when the formation energy is negative, and the defect cluster has favorable binding when the binding energy is positive.
Isolated point defect




We calculate the formation energy of a monovacancy for various computational domain size from atoms to atoms, and the results are shown in Fig. 6a. We observe that the formation energy strongly depends on cell size, and converges at cell sizes of approximately atoms to eV. This is broadly in agreement with values reported in the literature: calculated values - eV using local pseudo-potential and a coarse grained approach with to billion atoms [40] and measured values of - eV [31, 22, 58, 60]. Fig. 6b shows the electron density on the basal plane in the vicinity of the vacancy. Unsurprisingly, it is depleted at the vacancy. An interesting feature is that the electron density does not display the reflection symmetry of the basal plane (e.g. about the red dashed line). This is because the three dimensional crystal breaks this symmetry at the plane at a height above and below this plane. This is emphasized by indicating the atoms on this upper and lower planes with a ‘*’ in the figure. This observation plays a role in binding.
Next we compute the dilute impurity energy of an aluminum solute atom, and this is shown in Fig. 6c. We again observe that this energy depends on the cell size and converges at a few hundred atoms. The electron density on the basal plane is shown Fig. 6d. The electron density if elevated near the Al solute and the distribution is more symmetric.
Defect pairs




NN | Experiment | Previous DFT (eV) | Previous DFT (eV) | This work (eV) |
Vacancy-vacancy | ||||
1 | 0.06a | 0.106b | 0.127 | |
2 | 0.07a | 0.096b | 0.095 | |
3 | -0.01a | 0.057b | 0.064 | |
4 | 0.01a | 0.048b | 0.033 | |
5 | 0.01a | 0.038b | 0.033 | |
6 | 0.01a | 0.034b | 0.033 | |
Vacancy-solute | ||||
1 | 0.29 [45] | 0.06c | 0.2544 | |
2 | 0.03d | 0.1948 | ||
3 | 0.2060 | |||
4 | 0.1252 | |||
5 | 0.1252 | |||
6 | 0.1252 | |||
Solute-solute | ||||
1 | -0.021e | 0.2382 | ||
2 | -0.21f | -0.018e | 0.2226 | |
3 | -0.24f | 0.024e | 0.2194 | |
4 | 0.014e | 0.1912 | ||
5 | 0.1693 | |||
6 | 0.1379 | |||
a. 96 atoms using Troullier-Martins pseudopotential [59] | ||||
b. 3456 atoms local pseudopotential [40] | ||||
c. 192 atoms using Projector Augmented Wave (PAW) pseudopotential [1] | ||||
d. 64 atoms using ultrasoft pseudopotential [51] | ||||
e. 96 atoms using Projector Augmented Wave (PAW) pseudopotential [25] | ||||
f. 64 atoms using Projector Augmented Wave (PAW) pseudopotential [30] |
We now study the interaction between a pair of point defects: vacancy-vacancy, vacancy-solute and solute-solute. Fig. 7a, shows the six possible nearest neighbor positions on a HCP lattice where one defect is placed at the site marked 0 while the other defects are placed in the sites marked through denote the first six nearest neighbor configurations.
Table 2 shows the computed binding energy (cf. (37)) for various defect pairs. Recall that a positive binding energy indicates an energetic propensity for the defects to bind. We observe that all three types of defect pairs – vacancy pair, vacancy-solute and solute-pair – have an energetic preference for binding. This is especially strong for vacancy-solute pairs and solute pairs. Further the binding energy increases with decreasing inter-defect distance in all three cases, indicating that the binding is stronger with decreasing distance. These results are consistent with the observation that voids form readily in Mg, Al has a high diffusivity in Mg and that Al-rich precipitates from readily in Mg. Our results agree quantitatively with the only case (first nearest-neighbor vacancy-solute-pair) where we are aware of experimental observation [45] – Table 2.
The table also shows that while our results agree with those of Ponga, Bhattacharya and Ortiz [40] in the case of vacany pairs, they do not agree with other prior DFT calculations. Specifically, our results predict much stronger binding compared to other results ([59] for vacancy pairs, [1, 51] for vacancy-solute, and [25, 30] for solute pairs). In fact, previous results [25, 30] for solute pairs also predict negative binding energies in some instances.
The previous calculations [59, 1, 51, 25, 30] all used relatively small computatonal cells (64-192 atoms) compared to the current results (1151 atoms). Fig. 7 shows the binding energy of various defect pairs computed for various sizes of the computational domain. We see a significant dependence of the binding energy on the size of the computational cell with convergence only at around a 1000 atoms. Further, there is no common trend. For a solute pair, small cells predict a lack of binding while large cells predict binding. The vacancy-vacancy binding energy is large for small computational domains, but decreases with domain size. For vacancy-solute, we see that the binding energy is small for small computational domains, but increases with domain size. This tells us that the disturbance in the electronic and atomistic fields decay slowly. Further, the previous studies use periodic boundary conditions which means that the defects interact if the unit cell is too small. We have verified that a periodic calculations with a 96 atom unit cell (using SPARC[16] which uses a similar finite difference formulation as the current work) reproduces the result of Uesugi et al. [59] who used the same pseudopotential.
We also note that Ponga, Bhattacharya and Ortiz [40] used a local pseudopotential. In other words, the role of the pseudopotential is less important in these defects compared to that of the slow decay.






To understand the nature of the binding and explore further the decay, we examine the difference in electron density between that of a defect pair with that of a pair of defects:
(38) |
where is the electron density in a system with a defect placed at site 0, is that with a defect at site , is that of the perfect crystal, and is that of a defect pair (we need to make the system charge neutral). These are plotted for second nearest-neighbor pair (i.e, a basal pair) in Fig. 8. We see that the core of the vacancy pair is severely depleted of electron density while the center of the solute pair has excess electron density. The vacany-solute complex increases electronic density and depletes it at the distal region of the solute. Further, we see that oscillations spread over several atomic spacings before decaying. Furthermore, we see that the electron density in the case of vacancy and solute pairs are not symmetric with respect to the axis through the defects. This is because of the influence of atoms on the basal plane just above and below the plane of observations. Together, these mean that we need large computational cells for accurately computing the binding energies to accurately account for this decay.
6 Concluding Remarks
In this work, we have developed a computational framework that combines the computational efficiency of LSSGQ and enables the use of non-local pseudopotentials. Further our implementation shows excellent strong and weak scaling. This enables the application of DFT to problems that require a large computational domain such as defects in metals. We have demonstrated the accuracy, efficiency and applicability of the framework by studying defects in magnesium. In particular, we have shown that vacancy pairs, solute-vacancy pairs and solute pairs all bind strongly. Importantly, the electron density decays slowly around these defects thereby necessitating large computational cells.
Our ongoing efforts include the development of an optimized implementation which is amenable to heterogeneous computer architectures. This is motivated from the observation that the calculation of spectral quadrature weights and nodes – the computationally dominant part of the method – is local to each process, and therefore can be accelerated on Graphics Processing Units (GPUs). The implementation of real-space preconditioning schemes [29, 50] can further reduce the number of Self Consistent Field iterations for DFT simulations of large metallic systems. Finally, the incorporation of coarse-graining strategies [40, 41] will further reduce the scaling to sublinear with the number of atoms. Furthermore an accelerated calculation of the electronic predictor in the coarse grained framework will reduce the prefactor associated with scaling. Overall, these advances will render the first principles simulations of the interactions of extended defects such as dislocations tractable.
Acknowledgements
This research was performed when S.G. held a position at the California Institute of Technology. The work was sponsored by the Army Research Laboratory and was accomplished under Cooperative Agreement Number W911NF-12-2-0022. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the Army Research Laboratory or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes notwithstanding any copyright notation herein. The computations presented here were conducted on the Caltech High Performance Cluster partially supported by a grant from the Gordon and Betty Moore Foundation, and the Extreme Science and Engineering Discovery Environment (XSEDE), which is supported by National Science Foundation grant number ACI-1548562.
References
- [1] R. Agarwal and D. R. Trinkle. Ab initio magnesium-solute transport database using exact diffusion theory. Acta Materialia, 150:339 – 350, 2018.
- [2] D. G. Anderson. Iterative procedures for nonlinear integral equations. Journal of the ACM (JACM), 12(4):547–560, 1965.
- [3] S. Balay, J. Brown, , K. Buschelman, V. Eijkhout, W. D. Gropp, D. Kaushik, M. G. Knepley, L. C. McInnes, B. F. Smith, and H. Zhang. PETSc users manual. Technical Report ANL-95/11 - Revision 3.4, Argonne National Laboratory, 2013.
- [4] S. Balay, W. D. Gropp, L. C. McInnes, and B. F. Smith. Efficient management of parallelism in object oriented numerical software libraries. In E. Arge, A. M. Bruaset, and H. P. Langtangen, editors, Modern Software Tools in Scientific Computing, pages 163–202. Birkhäuser Press, 1997.
- [5] A. S. Banerjee, P. Suryanarayana, and J. E. Pask. Periodic pulay method for robust and efficient convergence acceleration of self-consistent field iterations. Chemical Physics Letters, 647:31–35, 2016.
- [6] A. D. Becke. Perspective: Fifty years of density-functional theory in chemical physics. The Journal of chemical physics, 140(18):18A301, 2014.
- [7] R. P. Brent. An algorithm with guaranteed convergence for finding a zero of a function. The Computer Journal, 14(4):422–425, 01 1971.
- [8] K. Burke. Perspective on density functional theory. The Journal of chemical physics, 136(15):150901, 2012.
- [9] D. M. Ceperley and B. J. Alder. Ground state of the electron gas by a stochastic method. Physical review letters, 45(7):566, 1980.
- [10] M. Chou and M. L. Cohen. Ab initio study of the structural properties of magnesium. Solid State Communications, 57(10):785 – 788, 1986.
- [11] Y.-H. Duan, Y. Sun, M.-J. Peng, and Z.-Z. Guo. First principles investigation of the binary intermetallics in pb–mg–al alloy: stability, elastic properties and electronic structure. Solid State Sciences, 13(2):455–459, 2011.
- [12] V. Gavini. Role of the defect core in energetics of vacancies. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences, 465(2110):3239–3266, 2009.
- [13] V. Gavini, K. Bhattacharya, and M. Ortiz. Vacancy clustering and prismatic dislocation loop formation in aluminum. Phys. Rev. B, 76:180101, Nov 2007.
- [14] S. Ghosh and K. Bhattacharya. Influence of thermomechanical loads on the energetics of precipitation in magnesium aluminum alloys. Acta Materialia, 193:28 – 39, 2020.
- [15] S. Ghosh and P. Suryanarayana. Higher-order finite-difference formulation of periodic orbital-free density functional theory. Journal of Computational Physics, 307:634–652, 2016.
- [16] S. Ghosh and P. Suryanarayana. Sparc: Accurate and efficient finite-difference formulation and parallel implementation of density functional theory: Extended systems. Computer Physics Communications, 216:109–125, 2017.
- [17] S. Ghosh and P. Suryanarayana. Sparc: Accurate and efficient finite-difference formulation and parallel implementation of density functional theory: Isolated clusters. Computer Physics Communications, 212:189–204, 2017.
- [18] S. Ghosh and P. Suryanarayana. Electronic structure study regarding the influence of macroscopic deformations on the vacancy formation energy in aluminum. Mechanics Research Communications, 99:58–63, 2019.
- [19] W. Gropp, W. D. Gropp, E. Lusk, A. Skjellum, and A. D. F. E. E. Lusk. Using MPI: portable parallel programming with the message-passing interface, volume 1. MIT press, 1999.
- [20] W. Gropp, T. Hoefler, R. Thakur, and E. Lusk. Using advanced MPI: Modern features of the message-passing interface. MIT Press, 2014.
- [21] P. Hohenberg and W. Kohn. Inhomogeneous electron gas. Physical Review, 136(3B):B864–B871, 1964.
- [22] C. Janot, D. Malléjac, and B. George. Vacancy-formation energy and entropy in magnesium single crystals. Physical Review B, 2(8):3088, 1970.
- [23] K. U. Kainer and B. L. Mordike. Magnesium alloys and their applications. Wiley-VCH Weinheim, Germany:, 2000.
- [24] G. Kerker. Efficient iteration scheme for self-consistent pseudopotential calculations. Physical Review B, 23(6):3082, 1981.
- [25] H. Kimizuka and S. Ogata. Predicting atomic arrangement of solute clusters in dilute mg alloys. Materials Research Letters, 1(4):213–219, 2013.
- [26] C. Kittel et al. Introduction to solid state physics, volume 8. Wiley New York, 1976.
- [27] W. Kohn and L. J. Sham. Self-consistent equations including exchange and correlation effects. Physical Review, 140(4A):A1133–A1138, 1965.
- [28] W. Koster and H. Franz. Poisson’s ratio for metals and alloys. Metallurgical Reviews, 6(1):1–56, 1961.
- [29] S. Kumar, Q. Xu, and P. Suryanarayana. On preconditioning the self-consistent field iteration in real-space density functional theory. Chemical Physics Letters, page 136983, 2019.
- [30] G. Liu, J. Zhang, and Y. Dou. First-principles study of solute–solute binding in magnesium alloys. Computational Materials Science, 103:97–104, 2015.
- [31] C. Mairy, J. Hillairet, and D. Schumacher. Energie de formation et concentration d’équilibre des lacunes dans le magnésium. Acta metallurgica, 15(7):1258–1261, 1967.
- [32] M. A. Meyers and C. T. Aimone. Dynamic fracture (spalling) of metals. Progress in Materials Science, 28(1):1–96, 1983.
- [33] E. Nembach. Particle strengthening of metals and alloys. 1997.
- [34] J. F. Nie. Effects of precipitate shape and orientation on dispersion strengthening in magnesium alloys. Scripta Materialia, 48(8):1009–1015, 2003.
- [35] J.-F. Nie. Precipitation and hardening in magnesium alloys. Metallurgical and Materials Transactions A, 43(11):3891–3939, Nov 2012.
- [36] R. G. Parr and W. Yang. Density functional theory of atoms and molecules. Oxford University Press, 1:989, 1989.
- [37] J. Pask and P. Sterne. Real-space formulation of the electrostatic potential and total energy of solids. Physical Review B, 71(11):113101, 2005.
- [38] J. P. Perdew and Y. Wang. Accurate and simple analytic representation of the electron-gas correlation energy. Phys. Rev. B, 45:13244–13249, Jun 1992.
- [39] I. J. Polmear. Magnesium alloys and applications. Materials Science and Technology, 10(1):1–16, 1994.
- [40] M. Ponga, K. Bhattacharya, and M. Ortiz. A sublinear-scaling approach to density-functional-theory analysis of crystal defects. Journal of the Mechanics and Physics of Solids, 95:530 – 556, 2016.
- [41] M. Ponga, K. Bhattacharya, and M. Ortiz. Large scale ab-initio simulations of dislocations. Journal of Computational Physics, page 109249, 2020.
- [42] P. P. Pratapa and P. Suryanarayana. Restarted pulay mixing for efficient and robust acceleration of fixed-point iterations. Chemical Physics Letters, 635:69–74, 2015.
- [43] P. P. Pratapa, P. Suryanarayana, and J. E. Pask. Spectral quadrature method for accurate o (n) electronic structure calculations of metals and insulators. Computer Physics Communications, 2016.
- [44] P. Pulay. Convergence acceleration of iterative sequences. the case of scf iteration. Chemical Physics Letters, 73(2):393–398, 1980.
- [45] A. R. Rao and C. Suryanarayana. Solute-vacancy binding energies in magnesium alloys. physica status solidi (a), 45(2):K131–K133, 1978.
- [46] W. Rudin. Functional analysis, 1973.
- [47] Y. Saad and M. H. Schultz. Gmres: A generalized minimal residual algorithm for solving nonsymmetric linear systems. SIAM Journal on scientific and statistical computing, 7(3):856–869, 1986.
- [48] A. Sharma, S. Hamel, M. Bethkenhagen, J. E. Pask, and P. Suryanarayana. Real-space formulation of the stress tensor for o (n) density functional theory: Application to high temperature calculations. The Journal of Chemical Physics, 153(3):034112, 2020.
- [49] J. R. Shewchuk. An introduction to the conjugate gradient method without the agonizing pain, 1994.
- [50] Y. Shiihara, O. Kuwazuru, and N. Yoshikawa. Real-space kerker method for self-consistent calculation using non-orthogonal basis functions. Modelling and Simulation in Materials Science and Engineering, 16(3):035004, 2008.
- [51] D. Shin and C. Wolverton. First-principles study of solute–vacancy binding in magnesium. Acta Materialia, 58(2):531–540, 2010.
- [52] P. Suryanarayana. On spectral quadrature for linear-scaling density functional theory. Chemical Physics Letters, 584:182–187, 2013.
- [53] P. Suryanarayana, K. Bhattacharya, and M. Ortiz. Coarse-graining kohn-sham density functional theory. Journal of the Mechanics and Physics of Solids, 61(1):38 – 60, 2013.
- [54] P. Suryanarayana, V. Gavini, T. Blesgen, K. Bhattacharya, and M. Ortiz. Non-periodic finite-element formulation of kohn-sham density functional theory. Journal of the Mechanics and Physics of Solids, 58(2):256 – 280, 2010.
- [55] P. Suryanarayana, P. P. Pratapa, A. Sharma, and J. E. Pask. Sqdft: Spectral quadrature method for large-scale parallel o (n) kohn–sham calculations at high temperature. Computer Physics Communications, 224:288–298, 2018.
- [56] A. Szabo and N. S. Ostlund. Modern quantum chemistry: introduction to advanced electronic structure theory. Courier Corporation, 2012.
- [57] N. Troullier and J. L. Martins. Efficient pseudopotentials for plane-wave calculations. Physical review B, 43(3):1993, 1991.
- [58] P. Tzanetakis, J. Hillairet, and G. Revel. The formation energy of vacancies in aluminium and magnesium. physica status solidi (b), 75(2):433–439, 1976.
- [59] T. Uesugi, M. Kohyama, and K. Higashi. Ab initio study on divacancy binding energies in aluminum and magnesium. Physical Review B, 68(18):184103, 2003.
- [60] A. Vehanen and K. Rytsölä. Proceedings of the international school of physics, 1981.
- [61] X.-C. Wang, T. Blesgen, K. Bhattacharya, and M. Ortiz. A Variational Framework for Spectral Approximations of Kohn–Sham Density Functional Theory. Arch. Rat. Mech. Anal., 221:1035–1075, 2016.
- [62] Q. Xu, P. Suryanarayana, and J. E. Pask. Discrete discontinuous basis projection method for large-scale electronic structure calculations. The Journal of chemical physics, 149(9):094104, 2018.
- [63] M.-X. Zhang and P. M. Kelly. Edge-to-edge matching and its applications: part ii. application to mg–al, mg–y and mg–mn alloys. Acta materialia, 53(4):1085–1096, 2005.
- [64] S. Zhang, A. Lazicki, B. Militzer, L. H. Yang, K. Caspersen, J. A. Gaffney, M. W. Däne, J. E. Pask, W. R. Johnson, A. Sharma, P. Suryanarayana, D. D. Johnson, A. V. Smirnov, P. A. Sterne, D. Erskine, R. A. London, F. Coppari, D. Swift, J. Nilsen, A. J. Nelson, and H. D. Whitley. Equation of state of boron nitride combining computation, modeling, and experiment. Phys. Rev. B, 99:165103, Apr 2019.