# Software

Codes developed in the Carter group are available through github repositories: https://github.com/EACcodes

#### Princeton orbital-free electronic structure software (PROFESS)

#### Bulk-derived local pseudopotential (BLPS) generator

https://github.com/EACcodes/BLPSGenerator under the GPL-3.0 license

#### Globally optimized local pseudopotential (goLPS) generation

https://github.com/EACcodes/goLPS under the CC BY-ND 4.0 license

#### TigerCI

https://github.com/EACcodes/TigerCI under the GPL-2.0 license.

#### VASP density functional embedding theory (DFET)

https://github.com/EACcodes/VASPEmbedding under the Mozilla Public License Version 2.0 (access to VASP ver. 5.3.3 is required)

#### ABINIT DFET

https://github.com/EACcodes/AbinitEmbedding under the GPL-3.0 license (access to ABINIT ver. 7 required)

#### Embedding integral generator

https://github.com/EACcodes/EmbeddingIntegralGenerator under the Mozilla Public License Version 2.0

#### Density matrix functional embedding theory (DMFET) in NWCHEM

https://github.com/EACcodes/DMFET-public (requires access to NWCHEM ver. 6.5)

#### Ab Initio DFT+U determination

https://github.com/EACcodes/AIDFT-U(currently implemented in GAMESS)

Descriptions of the softwares are provided below.

##### PROFESS (PRINCETON ORBITAL-FREE ELECTRONIC STRUCTURE SOFTWARE)

You may download PROFESS 3.0 from the Computer Physics Communications Program Library. Previous versions of PROFESS (1.0 and 2.0) are also available for download.

#### Goal:

Provide a quasi-linear scaling orbital-free density functional theory (OFDFT) implementation to simulate condensed matter and molecules. The current versions use the electron density as the sole variable. By calculating the total energy and its potential (the functional derivative with respect to the density), the total energy is minimized while conserving the total electron number to find the ground state.

#### Implementation (in the newest version: PROFESS 3.0): ^{1,2,3}

- In-house-developed FORTRAN package based on plane waves. FFT via the fftw3 library is extensively used to evaluate energies and potentials.
- Parallelization is implemented through domain decomposition using MPI.
- A number of kinetic density energy functionals (KEDFs), including Thomas-Fermi, von-Weizsäcker (vW), Want-Teter (WT),
^{4}Wang-Govind-Carter (WGC),^{5,6}CAT,^{7}Huang-Carter (HC),^{8}density-decomposition,^{9}WGC-decomposition,^{10}Enhanced-vW-WGC,^{11}*etc.*, are implemented. - Local density approximation (LDA) with Perdew and Zunger as exchange,
^{12}Cepeley and Alder as correlation,^{13}and generalized gradient approximation (GGA) with Perdew-Burke-Ernzerhof (PBE)^{14}exchange-correlation functionals are available. Spin polarized calculations are supported. Note that the spin polarized PBE functional is implemented through the Libxc library (version 2.0.1). - The electron density minimization,
^{15}using the square root of electron density as the variable, is implemented via modified truncated-Newton, conjugate gradient (CG) or Limited Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) methods^{16}to efficiently find the ground state, while conserving the electron number. The L-BFGS method shows better stability and efficiency for spin-polarized and vacuum systems. - CG and other methods are available to optimize ion positions. Specific ions can be fixed during the optimization as requested.
- Algorithms are also implemented for cell lattice optimization.
- Molecular dynamics methods with three ensembles
^{17}are implemented and tested:^{18}the microcanonical NVE (constant number of particles N, constant volume V, and constant energy E), the canonical NVT (constant number of particles N, constant volume V, and constant temperature T) with the Nosé-Hoover thermostat,^{19,20}and the isothermal-isobaric NPT (constant number of particles N, constant pressure P, and constant temperature T) with the Parinello-Rahman thermostat.^{21} - An option to set the initial density as a superposition of atomic densities is added.
- Local pseudopotentials (LPSs) must be used. A variety of these LPSs can be found on the Carter group website.

#### References:

- G. Ho, V. L. Lignères, and E. A. Carter, “Introducing PROFESS: A new program for orbital-free density functional theory calculations,”
*Comput. Phys. Commun.*,**179**, 839 (2008). doi: 10.1016/j.cpc.2008.07.002 - L. Hung, C. Huang, I. Shin, G. Ho, V. L. Ligneres, and E. A. Carter, “Introducing PROFESS 2.0: A parallelized, fully linear scaling program for orbital-free density functional theory calculations,”
*Comput. Phys. Comm.*,**181**, 2208 (2010). - M. Chen, J. Xia, C. Huang, J. M. Dieterich, L. Hung, I. Shin, and E. A. Carter, “Introducing PROFESS 3.0: An advanced program for orbital-free density functional theory molecular dynamics simulations,”
*Comp. Phys. Comm.*,**190**, 228 (2015). doi: 10.1016/j.cpc.2014.12.021 - L. Wang and M. P. Teter, “Kinetic-energy functional of the electron density,”
*Phys. Rev. B*,**45**, 13196 (1992). doi: 10.1103/PhysRevB.45.13196 - Y. A. Wang, N. Govind, and E. A. Carter, “Orbital-free kinetic-energy density functionals with a density-dependent kernel,”
*Phys. Rev. B*,**60**, 16350 (1999). doi: 10.1103/PhysRevB.60.16350 - Y. A. Wang, N. Govind, and E. A. Carter, “Erratum: Orbital-free kinetic-energy density functionals with a density-dependent kernel,”
*Phys. Rev. B*,**64**, 089903-1 (2001). doi: 10.1103/PhysRevB.64.089903 - D. García-Aldea and J. E. Alvarellos, “Kinetic-energy density functionals with nonlocal terms with the structure of the Thomas-Fermi functional,”
*Phys. Rev. A*,**76**, 052504 (2007). doi: 10.1103/PhysRevA.76.052504 - C. Huang and E. A. Carter, “Nonlocal orbital-free kinetic energy density functional for semiconductors,”
*Phys. Rev. B*,**81**, 045206 (2010). doi: 10.1103/PhysRevB.81.045206 - C. Huang and E. A. Carter, “Toward an orbital-free density functional theory of transition metals based on an electron density decomposition,”
*Phys. Rev. B*,**85**, 045126 (2012). doi: 10.1103/PhysRevB.85.045126 - J. Xia and E. A. Carter, “Density-decomposed orbital-free density functional theory for covalently bonded molecules and materials,”
*Phys. Rev. B*,**86**, 235109 (2012). doi: 10.1103/PhysRevB.86.235109 - J. P. Perdew and A.Zunger, “Self-interaction correction to density-functional approximations for many-electron systems,”
*Phys. Rev. B*,**23**, 5048 (1981). doi: 10.1103/PhysRevB.23.5048 - I. Shin and E. A. Carter, “Enhanced von Weizsäcker Wang-Govind-Carter kinetic energy density functional for aemiconductors,”
*J. Chem. Phys.*,**140**, 18A531 (2014). doi: 10.1063/1.4869867 - M. Ceperley and B. J. Alder, “Ground State of the Electron Gas by a Stochastic Method,”
*Phys. Rev. Lett.*,**45**, 566 (1980). doi: 10.1103/PhysRevLett.45.566 - J. P. Perdew, K. Burke, and M. Ernzerhof, “Generalized Gradient Approximation Made Simple,”
*Phys. Rev. Lett.*,**77**, 3865 (1996). doi: 10.1103/PhysRevLett.77.3865 - L. Hung, C. Huang, and E. A. Carter, “Preconditioners and Electron Density Optimization in Orbital-Free Density Functional Theory,”
*Comm. Comp. Phys.*,**12**, 135 (2012). doi: 10.4208/cicp.190111.090911a - D. C. Liu and J. Nocedal, “On the limited memory BFGS method for large scale optimization,”
*Math. Program.*,**45**, 503 (1989). doi: 10.1007/BF01589116 - G. J. Martyna, M. E. Tuckerman, D. J. Tobias, and M. L. Klein, “Explicit reversible integrators for extended systems dynamics,”
*Mol. Phys.*,**87**, 1117 (1995). doi: 10.1080/00268979600100761 - M. Chen, L. Hung, C. Huang, J. Xia, and E. A. Carter, “The melting point of lithium: an orbital-free first-principles molecular dynamics study,”
*Mol. Phys.*,**111**, 3448 (2013). doi: 10.1080/00268976.2013.828379 - S. Nose, “A unified formulation of the constant temperature molecular dynamics methods,”
*J. Chem. Phys.*,**81**, 511 (1984). doi: 10.1063/1.447334 - W. G. Hoover, “Canonical dynamics: Equilibrium phase-space distributions,”
*Phys. Rev. A*,**31**, 1695 (1985). doi: 10.1103/PhysRevA.31.1695 - M. Parrinello and A. Rahman, “Crystal Structure and Pair Potentials: A Molecular-Dynamics Study,”
*Phys. Rev. Lett.***45**, 1196 (1980). doi: 10.1103/PhysRevLett.45.1196

##### EMBEDDED CORRELATED WAVEFUNCTION THEORY

#### Goal:

Provide an improved description of electron exchange and correlation in a local region of condensed matter via an embedded cluster method.^{1,2,3} In current applications, we are focusing on molecule/metal surface interactions, such as dissociative adsorption of dioxygen on aluminum,^{4 }or plasmon-induced dissociation of dihydrogen on gold.^{5 }The cluster of atoms close to the molecule is treated with correlated wavefunction methods, while the background atoms are described by periodic density functional theory. A DFT-based embedding potential describes the effect of the background atoms on the cluster. We implement interfaces to read in the embedding potential in both MOLCAS and GAMESS (see **Implementation** below). The embedding potential may be calculated on the DFT level using our ABINIT-EMBED program package, with a fully self-consistent interaction between the DFT and the CW subsystems using our POTENTIAL-FUNCTIONAL-EMBEDDING approach,^{6 }or by the CW codes themselves. A new algorithm was also developed to accurately compute the modified one-electron integrals using all-electron basis sets; and this algorithm has been implemented in both MOLCAS and Gamess.^{7}

#### Implementation in MOLCAS:

- Construct the embedding potential from orbital-free DFT.
**SEWARD**module: read in embedding potential and apply as an external potential to the cluster.**RASSCF**module: optimize the cluster molecular orbitals in the presence of the embedding potential.**GUGA/MOTRA/MRCI**modules: get an embedded MRSDCI wavefunction.- Use the embedded wavefunction to find the embedding total energy.

#### Implementation in GAMESS:

- Construct the embedding potential from orbital-free DFT
**-OR-**Read in the embedding potential (as constructed by MOLCAS-EMBED or ABINIT-EMBED). - Calculate the resulting one-electron integral terms in parallel.
- Include these one-electron integrals in all subsequent GAMESS calculations.
- Use the embedded wavefunction to find the embedding total energy.

#### References

- P. Huang and E.A. Carter, “Self-consistent embedding theory for locally correlated configuration interaction wave functions in condensed matter,”
*J. Chem. Phys.*,**125**, 084102 (2006). doi: 10.1063/1.2336428 - S. Sharifzadeh, P. Huang, and E. A. Carter, “All-electron embedded correlated wavefunction theory for condensed matter electronic structure,”
*Chem. Phys. Lett.*,**470**, 347 (2009). doi: 10.1016/j.cplett.2009.01.072 - C. Huang, M. Pavone, and E. A. Carter, “Quantum mechanical embedding theory based on a unique embedding potential,”
*J. Chem. Phys.*,**134**, 154110 (2011). doi: 10.1063/1.3577516 - F. Libisch, C. Huang, P. Liao, M. Pavone, and E. A. Carter, “Origin of the Energy Barrier to Chemical Reactions of O
_{2}on Al(111): Evidence for Charge Transfer, Not Spin Selection,”*Phys. Rev. Lett.*,**109**, 198303 (2012). doi: 10.1103/PhysRevLett.109.198303 - S. Mukherjee, F. Libisch, N. Large, O. Neumann, L. V. Brown, J. Cheng, J. B. Lassiter, E. A. Carter, P. Nordlander, and N. J. Halas, “Hot Electrons Do the Impossible: Plasmon-Induced Dissociation of H
_{2}on Au,”*Nano Letters*,**13**, 240 (2013). doi: 10.1021/nl303940z - C. Huang and E. A. Carter, “Potential-functional embedding theory for molecules and materials”
*J. Chem. Phys.*,**135**, 194104 (2011). doi: 10.1063/1.3659293 - K. Yu, F. Libisch, and E. A. Carter, “Implementation of density functional embedding theory within the projector-augmented-wave method and applications to semiconductor defect states,”
*J. Chem. Phys.*,**143**, 102806 (2015). doi: 10.1063/1.4922260

##### ABINIT-EMBED

#### Goal:

Provide a DFT implementation to calculate embedding potentials using plane-wave basis sets. A correct treatment of the interaction of, e.g., gas molecules with metal surfaces requires both accurate treatment of exchange and correlation at the adsorption site as well as a correct description of the extended metal surface. To this end, a system of interest is partitioned into a cluster and a surrounding environment. An embedding potential *V* is used to mediate their interaction: we calculate such a global embedding potential by iteratively improving V based on the residual difference of the summed subsystem densities to a given reference density (obtained by standard DFT calculations on the entire system). The converged potential can then be used in subsequent high-level calculations of the cluster (see below).

#### Implementation in Abinit:

- Two parallel codes calculate electronic ground state densities of cluster and environment as a function of a global embedding potential (use V=0 as a starting guess).
- The densities are added, compared to the reference density, and an improved embedding potential is calculated.
- This procedure is iterated until convergence is reached.

#### References:

C. Huang, M. Pavone, and E. A. Carter, “Quantum mechanical embedding theory based on a unique embedding potential,” *J. Chem. Phys.*, **134**, 154110 (2011). doi: 10.1063/1.3577516

F. Libisch, C. Huang, P. Liao, M. Pavone, and E. A. Carter, “Origin of the Energy Barrier to Chemical Reactions of O_{2} on Al(111): Evidence for Charge Transfer, Not Spin Selection,” *Phys. Rev. Lett.*, **109**, 198303 (2012). doi: 10.1103/PhysRevLett.109.198303

S. Mukherjee, F. Libisch, N. Large, O. Neumann, L. V. Brown, J. Cheng, J. B. Lassiter, E. A. Carter, P. Nordlander, and N. J. Halas, “Hot Electrons Do the Impossible: Plasmon-Induced Dissociation of H_{2} on Au,” *Nano Letters*, **13**, 240 (2013). doi: 10.1021/nl303940z

##### POTENTIAL-FUNCTIONAL EMBEDDING

#### Goal:

Provide a versatile embedding framework to self-consistently combine different levels of theory in one calculation. We aim for the description of an arbitrarily partitioned complicated system, where each subsystem might be treated by a different level of theory. Their interaction is mediated by a self-consistently determined global embedding potential. To this end, our code calls the appropriate subsystem codes (see embedding software described above) to generate ground state densities of the embedded subsystems. These densities are gathered by the controlling code and used to improve the global embedding potential until self-consistency is reached. This allows for a self-constant interaction between the cluster (treated with correlated wavefunction techniques) and the surrounding environment (treated with, e.g., DFT).

#### Implementation:

- For the current embedding potential, call independent codes for each subsystem to calculate the corresponding ground state density (use V=0 as a starting guess).
- Calculate the total density, and the corresponding potentials (to obtain a good kinetic potential for the total density, perform an OEP calculation).
- Obtain the gradient of the total energy with respect to the embedding potential
*V*and use it to improve V. - Iterate the above sequence until convergence is reached.

#### References:

C. Huang and E. A. Carter, “Potential-functional embedding theory for molecules and materials,” *J. Chem. Phys.*, **135**, 194104 (2011). doi: 10.1063/1.3659293

##### OPTIMIZED EFFECTIVE POTENTIALS

#### Goal:

In conventional formulations of Kohn-Sham density functional theory (KSDFT), the exchange-correlation functional acts on the total electron density. However, while KSDFT is, in principle, exact, we do not know the correct form of the true exchange correlation functional. Currently used approximations perform poorly for charge transfer processes, highly correlated materials, or dispersion forces. However, much more accurate exchange-correlation functionals acting on the KS orbitals (instead of the density) can be formulated. While such functionals cannot be incorporated into KSDFT, the Hohenberg-Kohn theorem guarantees that a unique ground state density and a unique effective potential exists. To find this density requires a so-called optimized effective potential formalism. The most direct approach requires calculating of the KS Green’s function, which is both very costly and numerically unstable. Instead, we directly minimize the energy E as a functional of the effective potential V, min E[V]. To do this effectively requires an expression for the gradient dE/dV. We have developed an efficient one-dimensional finite difference approach to determine this gradient.^{1 }The resulting formalism is implemented in the abinit software package.

#### Implementation:

- Solve KS equations for current trial V.
- Calculate shifted trial potential V’ required for gradient.
- Solve KS equations for V’.
- Calculate gradient dE/dV as function of KS orbitals of V and V’.
- Using gradient, do minimization of E[V] to find ground state by, e.g., LBFGS minimization.
- Plane-wave implementation based on the ABINIT software package.

#### References

1. C. Huang, and E. A. Carter, “Direct minimization of the optimized effective problem based on efficient finite differences,” *Phys. Rev. B*, **84**, 165122 (2011). doi: 10.1103/PhysRevB.84.165122

##### TIGERCI: REDUCED SCALING MRSDCI/MRACPF

#### Goal:

A small prefactor, linear scaling MRSDCI/MRACPF algorithm.

Multireference approaches to electron correlation are necessary for studying bond-breaking, diradicals and transition metals. Multireference singles and doubles configuration interaction (MRSDCI) provides a straightforward multireference treatment. However, a conventional MRSDCI code scales as O(N^{6}), which severely limits the size of molecule that can be investigated. Applying local truncation schemes can lead to a massive reduction in computational cost.^{1-5} By employing local truncation schemes together with integral screening, a O(N) local MRSDCI (LMRSDCI) is possible.^{6}

Further reduction in computational cost can be achieved by Cholesky decomposing (CD) the two-electron integrals.^{7} The CD-LMRSDCI method scales on O(N^{3}) with a much smaller prefactor than LMRSDCI. The O(N^{3}) scaling can be reduced to O(N) using an atomic centered CD approach.^{8}Both of these methods have been expanded to include both *a posteriori *(Davidson type corrections) and *a priori (*multireference average coupled-paid functional MRACPF) size extensivity corrections.^{9}

#### Implementation

The CD-LMRSDCI algorithm has been implemented in the TigerCI (formerly BrewinCI) code, a plugin to the MOLCAS quantum chemistry package. MOLCAS is used to produce the integrals and orbitals and TigerCI performs the CD-LMRSDCI calculation.

- MOLCAS produces the one- and two-electron integrals in the SEWARD module.
- The one particle orbitals are produced in the SCF (single reference) or RASSCF (multireference) module.
- The orbitals are localized in the LOCALISATION module.
- TigerCI performs the CD-LMRSDCI/CD-LMRACPF calculations based on the symmetric group graphical approach (SGGA).
^{10}

Coming soon: TIGERCI in GAMESS.

**References:**

- S. Saebo and P. Pulay, “Fourth‐order Møller–Plessett perturbation theory in the local correlation treatment. I. Method,”
*J. Chem. Phys.*,**86**, 914 (1987). doi: 10.1063/1.452293 - S. Saebo and P. Pulay, “Local Treatment of Electron Correlation,”
*Ann. Rev. Phys.,***44**, 213 (1993). doi: 10.1146/annurev.pc.44.100193.001241 - D. Walter and E. A. Carter, “Multi-reference weak pairs local configuration interaction: efficient calculations of bond breaking,”
*Chem. Phys. Lett.,***346**, 177 (2001). doi: 10.1016/S0009-2614(01)00966-6 - D. Walter, A. Venkatnathan, and E. A. Carter, “Local correlation in the virtual Space in multireference singles and doubles configuration interaction,”
*J. Chem. Phys*.,**118**, 8127 (2003). doi: 10.1063/1.1565314 - A. Venkatnathan, A. B. Szilva, D. Walter, R. J. Gdanitz, and E. A. Carter, “Size extensive modification of local multireference configuration interaction,”
*J. Chem. Phys.,***120**, 1693 (2004). doi: 10.1063/1.1635796 - T. S. Chwee, A. B. Szilva, R. Lindh, and E. A. Carter, “Linear scaling multireference singles and doubles configuration interaction,”
*J. Chem. Phys.,***128**, 224106 (2008). doi: 10.1063/1.2937443 - T. S. Chwee and E. A. Carter, “Cholesky decomposition within local multireference singles and doubles configuration interaction,”
*J. Chem. Phys.*,**132**, 074104 (2010). doi: 10.1063/1.3315419 - T. S. Chwee and E. A. Carter, “Density fitting of two-electron integrals in local multireference single and double excitation configuration interaction calculations,”
*Molecular Physics*,**108**, 2519 (2010). doi: 10.1080/00268976.2010.508052 - D. B. Krisiloff and E. A. Carter, “Approximately size extensive local multireference singles and doubles configuration interaction,”
*Phys. Chem. Chem. Phys.*,**14**, 7710 (2012). doi: 10.1039/c2cp23757a - W. Duch and J. Karwowski, “Symmetric group approach to configuration interaction methods,”
*Comput. Phys. Rep.,***2**, 93 (1985). doi: 10.1016/0167-7977(85)90001-2

##### GAMESS – AIDFT+U (AB INITIO DFT+U)

#### Goal:

Evaluate *ab initio* the Coulomb and exchange parameters for DFT+U calculations. DFT+U theory is based on DFT, but the intra-atomic Coulomb and exchange interactions of localized valence electrons are effectively treated at the Hartree-Fock level of theory. DFT+U theory can correct the self-interaction errors in DFT, given the average Coulomb (*U*) and exchange (*J*) interactions of these localized valence electrons as input. To obtain these two parameters, previously researchers either empirically fitted them or performed constrained DFT calculations. We recently proposed instead to evaluate the *U* and *J* using unrestricted Hartree-Fock calculations on electrostatically embedded clusters.

#### Implementation in GAMESS:

The method used to evaluate these parameters is based on unrestricted Hartree-Fock calculations. A few subroutines were modified to get GAMESS to calculate U and J.

The modifications to each subroutine are: *gamess.src :* check input files and variables; *prppop.src :*get Mulliken populations for calculating U and J;

*int2a.src: *calculate the onsite two-electron integrals in the basis of the atomic orbitals;

*rhfuhf.src:* extensive modifications to calculate U and J;

*scflib.src:* calculate the Coulomb and exchange integrals through building the Fock matrix with direct SCF methods.

#### References:

N. J. Mosey and E. A. Carter, “*Ab initio* evaluation of Coulomb and exchange parameters for DFT+U calculations,” *Phys. Rev. B*, **76**, 155123 (2007). doi: 10.1103/PhysRevB.76.155123

N. J. Mosey, P. Liao, and E. A. Carter, “Rotationally invariant *ab initio* evaluation of Coulomb and exchange parameters for DFT + U calculations,” *J. Chem. Phys.*, **129**, 014103 (2008). doi: 10.1063/1.2943142