1 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.

2 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 \times 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:

  1. 1.

    acetic acid (CH\(_3\)COOH)

  2. 2.

    ammonia (NH\(_3\))

  3. 3.

    benzene (C\(_6\)H\(_6\))

  4. 4.

    butane (C4H10)

  5. 5.

    carbondioxide (CO2)

  6. 6.

    cyclohexane (C6H12)

  7. 7.

    ethane (C2H5)

  8. 8.

    ethanol (C2OH5)

  9. 9.

    ethylene (C2H4)

  10. 10.

    fluorine gas (F2)

  11. 11.

    isobutane (C4H10)

  12. 12.

    methane (CH4)

  13. 13.

    methanol(COH\(_4\))

  14. 14.

    nitrogen gas (N\(_2\))

  15. 15.

    pentane(C\(_5\)H\(_{12}\))

  16. 16.

    propane (C\(_3\)H\(_8\))

  17. 17.

    urea (CO(NH\(_2\))\(_2\))

  18. 18.

    water (H\(_2\)O)

3 Method and details of calculation

The density functional approach was applied to the non-relativistic 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_\textrm{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 \(\mathcal{G}=[x_0,x_1,\cdots ,x_n]^3\), with \(x_i=x_0+i h\),\(x_0=-6\) and \(h=12/N\) with \(N=200\) was used. 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 \(\textbf{u}_1\) and \(\textbf{u}_2\) and the normalized vectors are defined by \( \mathbf{w_1}=\textbf{u}_1/ \vert \textbf{u}_1 \vert \) and \( \mathbf{w_2}=\textbf{u}_2/ \vert \textbf{u}_2 \vert \,. \)

We use the following functions of the two vectors:

  1. 1.

    The angle

    $$ \alpha =\angle ( \textbf{u}_1, \textbf{u}_2)=\frac{180}{\pi }\arccos S $$

    with \(S=\textbf{w}_1\cdot \textbf{w}_2\)

  2. 2.

    The approximation \(d_{12}=h^{3/2} \vert \textbf{u}_1-\textbf{u}_2\vert \,\) for the RMS density difference defined by

    $$\left( \int (\rho _1-\rho _2)^2 d^3 r \right) ^{\frac{1}{2}}\,.$$

     

The angle is a dimensionless quantity while the RMS density difference has dimensions of the density.

4 Results and discussion

For each molecule the following quantities were calculated using the NWChem and finite element codes:

  1. 1.

    NWChem:

    1. (a)

      Total energies obtained using NWChem and the basis set cc-pvqz

    2. (b)

      Density on chosen grid

    3. (c)

      Densities at nuclear positions

  2. 2.

    FEM:

    1. 1.

      Total energies obtained using the FEM code for a discretization parameter \(S=0.2\)

    2. 2.

      Density on chosen grid.

    3. 3.

      Densities at nuclear positions

In 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 \(\alpha \) 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.

Table 1 Comparison of total finite element energies calculated for \(S=0.2\) and total NWChem energies for the cc-pvqz basis set
Table 2 Angles \(\alpha \) and differences d between FEM and NWChem densities. The basis set for NWChem was cc-pvqz and the FEM discretization parameter was \(S=0.2\)
Table 3 Densities at nuclei for selected molecules obtained using FEM and NWChem approaches
Table 4 CPU times for FEM and NWChem codes

5 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.