QUMEC: software for quantum mechanics first principle calculation in 3- dimensional real space

We present software on total energy calculation by quantum mechanics first principle method with a graphic user interface (GUI). Total energy calculation in this software is based on numerical analysis of time-dependent density functional (the used numerical method is finite difference time domain). QUMEC package has been equipped by common exchange-correlation energy terms with electron spin polarization calculation. With this package, users can calculate the total energy of the free particle, bulk materials, and materials with free surfaces at the atomic scale. The package is tested by several physical subjects, i.e., the surface energy of nano-LiCoO2 and diffusion constant of lithium atoms in LiNi0.5Mn1.5O4.


Introduction
Nowadays, quantum mechanics first principle calculation has become widely practiced in materials science and materials physics, and several standard packages are available on this issue. These packages are very successful for ab initio simulation and are used by academic research groups around the world. One important issue in any software package is to be user friendly. In some packages, this part has been easily neglected and compel users to follow several timeconsuming applications manually, and this would be a source of human input errors. Another important subject is designing flexible code to cover most of the techniques used by experienced users for calculating reliable and accurate results.
Computational quantum mechanics found prominent applications both in science and engineering since the availability of the computational codes on quantum mechanics first principle calculation. This kind of analysis in the technical text is the so-called ab initio method. The key feature in the ab initio method is the estimation of the total energy of the atomic under consideration system. Details of how to perform ab initio total-energy calculations have been welldefined in many references [1][2][3][4]. Nowadays, the ab initio method is working for cutting edge technology/science [5], i.e., to design sensors [6], spintronic materials [7], electronic materials [8], materials for Li-ion batteries [9][10][11] and many more.
There are several famous techniques in the quantum mechanical calculation, namely many-body methods, pseudopotential method, and density functional theory (DFT). DFT is a prominent method to reduce the number of degrees of freedom in studying many-body electronic systems. Growth in the number of degrees of freedom will cause an increase in the handling time of the simulation. DFT elegantly defines exchange-correlation energy for electrons. Similarly, the pseudopotential method reduces degrees of freedom of model by bypassing core electron many-body effects. DFT was introduced by W. Kohn, L. J. Sham, and Pierre C. Hohenberg. The Kohn-Sham scheme of the DFT has been widely used and has become one of the mainstream in the modern first-principles calculation [12]. In every self-consistent cycle, Kohn-Sham equations should be solved to get the orbital wave function. The computation of such a method is limited up to hundreds of atoms with present computer resources [12]. The orbital-free method has been consistently investigated to reduce the mentioned difficulty. All energy terms are expressed as the functionals of electron density without using the orbital wave function. Therefore, orbital (wave function) orthogonality operation and ksampling in the Brillouin zone are avoided [12]. The advantages of the orbital-free method are not only its efficiency but its application to the multiscale embedding methods [13].
Any computational quantum mechanics is started from the Schrodinger equation (S.E.). Quantum mechanics introduces a deterministic law, the S.E., which governs the dynamics of the probability distribution of electrons [14]. The S.E. is an equation that is derived from the minimization of the total energy of the atomic system. The total energy can be written in the quantum state by equation 1, , , , , , and * are mass of the electron, pseudopotential, exchange-correlation energy, electron-electron interaction energy, ion-ion interaction energy (Madelung energy), the wave function, and the complex conjugate of the wave function, respectively. Lastly, in the minimum formalism of total energy we have (equations 2, 3 and 4), Time-dependent: Where and are quantum mechanical wavefunction and the corresponding energy. Some refinements were applied onto these equations to make them solvable, i.e., to compensate manybody approaches to the single body one (This severely decreases the degrees of freedom during computer coding), all calculations would be done by shifting from wave function (charge density) to electron density. This idea comes back to 1927 [15], resulting in the so-called Thomas-Fermi approach to electronic structure. Dirac improved on the theory by including a term describing the exchange energy [16].
After writing the total energy formula in minimum form, the next step in computational quantum mechanics is the numerical solution of the S.E. Several methods have been introduced to solve this problem. To accomplish this goal, the numerical methods for solving the S.E. should have sufficient accuracy and efficiency [17]. One of the probably simplest methods is the finite difference (F.D.) technique [18 -21]. As one of these kinds of framework, the split-step finite difference method [22,23] is the other nominate. As other examples, it is good to mention the finite difference time domain [24], adapted finite difference method [25], and the diffusion Monte Carlo (DMC) technique [26]. The several other numerical methods were used to solve the Schrödinger equation such as Runge-Kutta [27,28], Newton-Cotes method [29], variable-step method [30], Symplectic integrators [31], finite element method [32], discrete Adomian decomposition [33].
At this time, the QUMEC package performs calculation in real space by using Hartree-Fock pseudopotential for considering core-ion valance-electron interaction in real space and innerelectron valance-electron interactions and local density approach (LDA) and generalized gradient approach (GGA) for exchange-correlation energy along with considering electron spin polarization. In addition, QUMEC lets users manipulate energy terms of electron-electron electrostatic interaction by an average method. This would be helpful for fast calculation when the accuracy of the calculated results is not very high. The use of this average method is arbitrary in the QUMEC package.
In fact, the QUMEC package is part of the QUMEC project (www.qumec.org). QUMEC project is an attempt for quantum mechanics first principle calculation in engineering topics by developing software for them. QUMEC project has planned to enhance the prevalence of quantum mechanics calculations in the industry. In the light of other professional software in this field (most of them are useful for academic research and groups), it would be tough to program new software with new topics. QUMEC has a new approach to applying computational quantum mechanics, that is to say, the direct use of computational quantum mechanics in engineering topics (i.e., electronics, medical devices, and nano-mechatronics) via developing specialized software with the user-friendly interface.

Total energy calculation
The total energy of an atomic system is composed of the kinetic energy of electrons, exchangecorrelation energy (electrons quantum interaction), ion-ion interaction (Madelung energy), electronelectron Coulomb interaction and pseudopotential (electrons ions interaction plus the effect of inner electrons). The overall strategy of the present model has been shown in figure 1.

Exchange-correlation energy and pseudopotential
The two important energies to calculate the total energy are the pseudopotential and exchangecorrelation energies. In QUMEC, LDA, and GGA [34] were used to calculate the exchange-correlation energy. The calculation could be implemented by spin polarization calculation in the QUMEC package as this issue is important for materials with strongly correlated electron [35].

Electrons' electrostatic interaction
This term of energy was taken into account according to equation 5.
, are charge at the point i and distance between two points. A large amount of computational time would be needed to calculate this term for a superlattice due to the presence of two correlated summations, especially in the case of a large number of numerical meshes (small size mesh). Instead of calculating the electrons' electrostatic energy at each point of the discretized model, a small number of points were selected as the main points to reduce simulation time. The energy for each of them was calculated according to their wave function, numerically. Other missed points (here named child) are appointed as the neighbors of main points and acquire the energy value of them. Each main point covers some of the neighbor points (child), and the neighbors gain the value of that main point. In figure 2, a small part of the discretized model was magnified to show the child points (yellow points) and their main point (the red point at the center of cube). This method could be effective in some cases to reduce simulation time, Due to the low value of electron-electron interaction energy in comparison to the pseudopotential.

Electrons' kinetic energy
Kinetic energy could be calculated by the kinetic energy density as a function of electron density or wavefunction. Two famous choices are (Equations 6 and 7) [36]: QUMEC uses the following equations (8 and 9) for estimating total kinetic energy (T), as well: This last approximation is expected to be accurate for very gradual potential [37].

Ion-ion electrostatic interaction (Madelung energy)
This energy is simply calculated for each atom by equation 10:

Numerical solution of Schrodinger Equation
Finite-difference time-domain (FDTD) is the numerical technique used for solving the S.E. in the QUMEC package. The key point of the FDTD method is the transformation of S.E. to imaginary time [26].

Atomic relaxation
QUMEC uses the following algorithm for finding the relaxed atomic position of atoms. The main concept of moving atoms in QUMEC is the force on atoms applied by potential around them.

QUMEC interface
Availability of any needed computing features for fast implementing an atomic model (preprocessing), simple processing with good handling of results (processing), and simple visualization of results by graphs and color figures (post-processing) is general essence of QUMEC interface. Figure 4 shows the interface of QUMEC packages. Main and highlighted features are:  Figure 5 shows the options toolbox to set details of ab initio simulation, namely spin polarization, exchange-correlation term, mesh size, energy unit, etc. This toolbox is also serving more details for advanced users on manipulating the number of valance electrons along with related pseudopotential.
(b) (a) Figure 5. Option toolbox, a) set spin condition of electrons, b) manipulating pseudopotential for each orbital for advanced users, c) panel for applying atomic relaxation automatically or manually for advanced users and d) panel for applying exchange-correlation term, mesh size, energy unit, set calculation for bulk materials (using periodic boundary condition) or free atomic cluster.

Verification
This software has been designed for users to implement ab initio simulation. QUMEC package has been used and tested in several projects. Here, we address two of them, as follows: 1. The surface energy of nano-LiCoO2: The surface energy of 112 ̅ 0 plane of nano-LiCoO2 was calculated 2443 mJ/m 2 by QUMEC package, which has good consistency with other references (by VASP: 2227 mJ/m 2 [38] and 2241 mJ/m 2 [39]).

Diffusion constant of lithium ions in LiNi0.5Mn1.5O4
The diffusion mechanism of lithium-ion has been studied by QUMEC software, and the results were published then [9 and 40]. It was simulated that in LiNi0.5Mn1.5O4 spinel with P4332 crystal structure, two diffusion paths are the possible corridors for Li-ions to diffuse. The activation energies for these possible paths were calculated 24.18 and 39.14 kJ/mol, which show the consistency with the previous report [41].

Conclusions
QUMEC package is a stable code for solving time-dependent Schrödinger Equation numerically with a user-friendly graphical interface. This graphical interface facilitates to introduce any atomic configuration and running an ab initio simulation. Users can manipulate terms of total energy by applying a convenient number of valance electrons, related pseudopotential of valance orbital (s, p, d, and f), and accelerating calculation of electrons' electrostatic interaction by an average like method. This software has been designed for implementing ab initio simulation. The simulated results by QUMEC software have been checked in several projects on topics (like activation energy of atomic diffusion and surface energy of nanoparticles). Improvement and development of QUMEC software are ongoing.