There has been an undocumented keyword for adding a homogeneous electric field in ORCA:
%scf
EField 0.1, 0.0, 0.0 # x, y, z components (in au) of the electric field
end
Although the keyword is in the %scf block, it applies the electric field to all other methods (post-HF methods, multireference methods, TDDFT, etc.) as well, except the XTB and force field methods.
This keyword was designed to be used internally for finite difference dipole moment/polarizability calculations, where ORCA spawns child processes that add a small electric field to the Hamiltonian and calculate the electronic energy under that electric field. However, it was NOT designed to be used for e.g. geometry optimization, frequency analysis and MD under a finite electric field, since:
(1) The implementation in ORCA 5.0.4 (and all earlier versions) is lacking the analytic gradient contribution due to the geometric derivative of the dipole moment integrals. While the numerical gradient is correct, unfortunately the program does not automatically switch from analytic to numerical gradient when the user specifies an electric field.
(2) The gauge origin of the electric field is hard-coded as the center of nuclear charge. Therefore, the molecule "carries" the electric field with itself, in the sense that if the molecule moves, the gauge origin also moves. The molecule's energy will thus not change when it translates through the electric field, even if the molecule is charged. However, most experimental settings have the electric field fixed in the lab frame, in which case charged molecules obviously do accelerate in an electric field. The gauge origin problem also shows up when one compares the energies of different geometries (including comparing the energy of the complex of two molecules with those of the separate molecules), since structural changes may change the center of nuclear charge and yield an extra contribution to the energy change. Thus, a reaction may have very different reaction energies in an electric field, depending on whether the gauge origin is the center of nuclear charge or a fixed point.
(3) The code does not allow the molecule to rotate, while in an electric field the molecule would usually rotate to align its dipole moment with the electric field.
By using !NumGrad, one can bypass problem (1), but not problems (2) and (3).
Therefore, in ORCA 5.0.4 and earlier versions, the following types of calculations give correct results:
(1) Energy changes due to the electric field (however note the caveats due to the gauge origin being the center of nuclear charge, as mentioned above).
(2) Finite difference (or equivalently speaking, numerical) dipole moment. The result is given with the center of nuclear charge as the gauge origin and this cannot be changed. When the molecule is charge neutral, the gauge origin doesn't matter, but otherwise it does.
(3) Finite difference (both seminumerical and fully numerical) polarizability.
(4) The wavefunction under the electric field at a fixed geometry. This includes but is not limited to studies of orbital deformations, density deformations, bond order changes, electrostatic potential changes etc. under an electric field, provided that the structure was not allowed to relax in the electric field.
(5) Geometry optimization under an electric field, where the user has explicitly specified !NumGrad and the reproduction of the global translational/rotational motion of the molecule is not an issue.
(6) Calculations where the electric field is simulated by point charges in the MM region, rather than provided by the EField keyword. The QM/MM machinery allows the QM region to translate and rotate globally with respect to the MM region, so translations/rotations of the molecule should be properly accounted for.
The following types of calculations give wrong results:
(1) Geometry optimization under an electric field, where the user has not explicitly specified !NumGrad.
(2) Geometry optimization under an electric field, where the user wants the molecule to be able to rotate.
(3) Frequency analysis, IRC, MD etc. under an electric field, where the breaking of rotational symmetry due to the electric field generally plays an important role.
In the next release of ORCA (which will hopefully happen soon) we will have a more complete implementation of the electric field contributions. The analytic gradient will be correct, the gauge origin of the electric field can be chosen by the user (and can be different from the %elprop origin), and the translational/rotational symmetry breaking of the electric field will be properly treated.
Since the EField keyword was not documented in the first place, the above issues probably do not count as "bugs" - that's why we are not putting this post in the Bugs board of this forum. However, we are aware that many users are using this undocumented feature, and we hope that this post may help the users prevent wrong results from being published. If you already obtained some wrong results, please refer to the above checklists to see whether they can be corrected by adding !NumGrad; if no, please wait until the next ORCA release.