Comparison of finite element density functional with NWChem results for 18 molecules

Making use of the code presented in the previous work by Braun et al. (Eur Phys J B 92:230, 2019), finite element density functional calculations have been performed in Cartesian coordinates using the density functional approach for 18 mostly organic molecules, which are acetic acid, ammonia, benzene, butane, carbon-dioxide, ethane, ethanol, fluorine gas, iso-butane, methane, methanol, nitrogen gas, pentane, propane, urea, and water. The resulting total energies and densities were compared with those obtained using the Gaussian basis set package NWChem (Valiev et al. in Comput Phys Commun 181:1477, 2010) for a number of basis sets. We found very good agreement for the total energies and densities of the considered molecules using the two different approaches. This further highlights the success and usefulness of the finite element approach.


Introduction
The development of efficient methods to calculate the properties of molecules has been an ongoing task in computational physics since the 1970's. Compared to ''traditional'' methods the use of finite elements as basis set in molecular calculations has been a more recent development. In a pioneering paper [3] from the early 90's the eigenvalues of the S-states of the helium atom were calculated using the method of finite elements in two dimensions.
In another study [4], the method of finite elements was combined with the close coupling approach. About ten years ago the method of finite elements was combined with the so-called cusp factor approach to treat the hydrogen molecular ion [5,6]. Finally the results of a finite element Hartree Fock Code were published in [7,8]. In a recent paper [1], a molecular finite element code employing the cusp factor has been presented and results for 5 small molecules given. The results showed that the introduction of this cusp correction in the finite element density functional calculation resulted in improved densities and total energies. Thus the advantage of the finite element method is that it is able to satisfy the cusp condition at the origin, which the NWHCEM code can not.
In the present contribution we evaluated additional 18 molecules using the finite element density functional method and compared the results with NWChem density functional calculations. The agreement is very good both for energies and densities.

Input information
In the current study atomic units were used, where energies are measured in Rydberg ¼ 13:61 eV and distances in a 0 ¼ 5:29 Â 10 À11 m. The geometries used for these calculations were obtained from the CCCBDB database [9]. In some cases the geometries were results of density functional calculations while in the remaining cases they were the results of measurements.
Calculations for the following 18 molecules listed below were performed:

Method and details of calculation
The density functional approach was applied to the nonrelativistic Hamiltonian for an even number of electrons. In order to mitigate the singular Coulomb potential at the nuclear locations a cusp factor was applied to the orbitals. The resulting Schrödinger-like equations were solved with the method of finite elements using the Python framework FeNics [10] and the open source meshing software gmsh [11]. Further details are given in [1].The polynomial order of the FEM calculation was p ¼ 2 and the radius of the spherical domain was x max ¼ 12. The density functional defined by combining the Slater exchange [12] and the Perdew and Wang correlation [13] was used.
For all calculations a density grid G ¼ ½x 0 ; The density values on the grid in a fixed order are thus vectors of dimension 201 3 . The density vectors obtained using the FEM and NWChem codes are denoted by u 1 and u 2 and the normalized vectors are defined by We use the following functions of the two vectors: The angle is a dimensionless quantity while the RMS density difference has dimensions of the density.

Results and discussion
For each molecule the following quantities were calculated using the NWChem and finite element codes:  Table 1 the FEM energies for S ¼ 2 and NWChem energies for the cc-pvqz basis set are given. The relative energy differences are smaller than 10 À3 . For some of the molecules the FEM energies are lower while for some others the NWCHem energies are lower. In Table 2 we show the angles and RMS density differences between the NWChem and FEM densities. All values of a are smaller than 0.6 degree, which demonstrates a rather good agreement between the densities. As another approach to compare the densities, we consider their values at the nuclear coordinates obtained using the FEM and NWChem codes. For the molecules with at most six nuclei, these densities and their differences are given in Table 3. In all cases the FEM densities at the nuclei are larger than the NWChem densities. Finally in Table 4 the CPU times for the FEM and NWChem codes. Not unexpectedly the NWChem code is a lot faster compared with the FEM code. This is attributed to the number of degrees of freedom for the FEM approach, which is much larger than for the NWChem approach.

Conclusions
In this work, the results of finite element density functional calculations for 18 different molecules using the code introduced in [1] have been reported. The total energies are very close to those obtained using the NWChem implementation of density functional theory with the cc-pvqz basis set. The densities also are in rather good agreement. At the nuclei all FEM densities are larger than the NWChem densities. Thus the field of molecular computational physics has been enriched by providing an additional method that fulfills the cusp conditions at the nuclei.It also helps to validate results using other codes by estimating the accuracy of densities, in particular at the nuclei. Future plans include improving the convergence of the FEM calculations.
Funding Open access funding provided by University of South Africa.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecom mons.org/licenses/by/4.0/.
Data Availibility statement All data generated or analysed during this study are included in this published article.