# Quantum chemistry in external electrostatic field?

Which quantum chemistry methods can be used in an external electrostatic field? Also which software supports that? I'm interested in anything from semiempirical (eg XTB) to DFT (eg ωB97, B3LYP-D3) to coupled cluster (eg DLPNO-CCSD(T)). The only starting point I have is a few mentions of Field= keyword in Gaussian and a mention of an undocumented efield keyword in the ORCA forums.

Is there a way to add a field to (eg) a calculator in ASE? Do any of the open source codes like psi4, xtb, libxc etc support this?

Also, more generally: when doing electrostatic embedding between QM and MM, certainly an electric field has to be passed from the MM to the QM system - how is this usually handled? It is probably not a single planar field or dipole, I'm guessing it must involve passing either a multipole (for the nearest MM atoms with their partial charges), or an approximation of that as a multipole with fewer virtual charge sites. In open source software that supports QM/MM with electrostatic embedding, where/how exactly is the field passed along?

Which quantum chemistry methods can be used in an external electrostatic field? Also which software supports that? I'm interested in anything from semiempirical (eg XTB) to DFT (eg ωB97, B3LYP-D3) to coupled cluster (eg DLPNO-CCSD(T)). The only starting point I have is a few mentions of Field= keyword in Gaussian and a mention of an undocumented efield keyword in the ORCA forums.

An external electrostatic field can be implemented in any method, since it's just a trivial modification of the one-electron Hamiltonian as $$\hat{H} \to \hat{H} - e\phi({\bf r})$$. Most programs, such as GAUSSIAN and ORCA that were already mentioned as well as others like Psi4, only implement static fields, $${\bf E}={\bf E}_0$$; you give the cartesian components with the necessary keyword. The electric field is the negative gradient of the potential, $${\bf E} = -\nabla \phi$$, so for a static field $$\phi({\bf r}) = \phi_0 -{\bf E}_0 \cdot {\bf r}$$.

Now, the big conceptual problem arises: the potential diverges to $$-\infty$$, meaning that no state can be really bound in such a potential. If your basis set is extended enough, there will always be artificial states far away from the system because of the divergent potential. Often, this is not a problem in practice, if the basis set does not reach far enough. Another route is given by perturbation theory, that is, you can build a Taylor series at zero field: $$E({\bf E}) = E_0 + \nabla_{\bf E} E \cdot {\bf E} + \frac 1 2 {\bf E} \cdot \nabla_{\bf E} \nabla_{\bf E} E \cdot {\bf E} + \dots$$. $$\nabla_{\bf E}$$ is just the dipole moment, $$\nabla_{\bf E} \nabla_{\bf E} E$$ is the polarizability tensor, then you have the first hyperpolarizability (rank-3 tensor), and so on.

The most important thing to note, however, is that in order to correctly describe behavior in an external field, you need to have a flexible basis set. Already reproducing the dipole moment correctly requires diffuse functions; it is a textbook example for their necessity. For instance, if I remember correctly, an augmented double-zeta basis set gives you the dipole moment of the water molecule as accurately as a non-augmented quadruple-zeta basis set, at the Hartree-Fock level. I think polarizabilities may be even more demanding to get accurately.

Electrostaic embedding is usually on the QM-side as simple point charges which add to the total hamiltonian of the nuceli+electrons. It should be just a simple coulumb interaction.

Any modern electronic structure calculation software should support aleast electrostatic embedding. Openmolcas, Orca, Dalton/LSDalton, Bagel all support electrostatic embedding, with some of them also supporting advanced embedding like polarizable density embedding.

Regarding an example implementation, COBRAMM developed at the University of Bologna in the group of Dr. Marco Garavelli allows one to conduct quite sophisticated QMMM computations like optimizations, reaction paths and non-adiabatic dynamics in comdensed phase or protein environment. The program allows a great freedom to use any QM program (Openmolcas for wavefucntion based CASSCF/CASPT2 or Gaussian or DFT/TD-DFT) and uses Amber package for the MM part.

• Are you the same user as this other vkj? If so, you could merge these accounts by contacting the CMs though this link: mattermodeling.stackexchange.com/help/merging-accounts
– Tyberius
Sep 15, 2021 at 2:16
• @vkj Thanks! It's good to know this is supposed to be supported. I've mainly used ase and open source software which can be used from within ase (eg psi4). It seems a lot of the examples deal with qm/mm, for this I just want to manually add charges. Do you know of any examples of passing extra point charges in an open source package? Sep 16, 2021 at 1:43
• I dont clearly understand the question. All the above packages support this method of passing point charges. For example im Openmolcas, if u do do it through the Xfield keyword. I see ASE has support for PSI4. There you can go the QMMM page to see how its done
– vkj
Sep 16, 2021 at 9:22

Check DFTB+ with its xtb implementation. Among DFT codes working with ASE, take a look on GPAW, where you also have an external field option.

• Welcome to the site! This answer is fairly short compared to existing ones. Would you be able to add a bit more detail (e.g. an example input with one of these programs or your experience with using external fields in a calculation).
– Tyberius
Jan 11 at 15:04