I wanted to apply a field gradient on my molecule and study some associated property. I'm able use MM point charges w.r.t a QM/MM scheme of doing things to produce a field gradient. But I was wondering if any open-source (or free) quantum chemistry codes have this an a part of its source code. There are commercial codes like Gaussian 16, MOLPRO.. etc. with this capability.


  • 1
    $\begingroup$ Does it have to be open source, or can it just be free? $\endgroup$ Commented Mar 2 at 9:14
  • $\begingroup$ @isolatedmatrix yes it can be free! I've changed the question $\endgroup$
    – Atom
    Commented Mar 2 at 17:51
  • $\begingroup$ You can let me know when there's one day remaining for the bounty, if you don't get an answer by then. $\endgroup$ Commented Mar 5 at 3:07
  • 1
    $\begingroup$ @Ihavenofreetimeanymore Thanks! I'll ping you when its time $\endgroup$
    – Atom
    Commented Mar 6 at 15:41
  • $\begingroup$ @Ihavenofreetimeanymore Hi, the bounty I've put in expires in a day $\endgroup$
    – Atom
    Commented Mar 10 at 14:19

2 Answers 2



Inhomogenous external fields in OpenMolcas

If you would like to do quantum chemistry calculations, such as RHF-CCSD(T), for a molecule with an inhomogenous external field, E(x,y,z), then the FFPT (finite field perturbation theory) module of OpenMolcas may help.

  • The DIPO keyword will allow you to use a homogenous external field perturbation.
  • Other keywords such as QUAD (for calculating quadrupole moments or quadrupole polarizabilities) will allow you to use an inhomogenous electric field.
  • There is also the EFGR keyword which is for adding an "electric field gradient" perturbation operator.
  • The GLOBL keyword allows users to use a more general perturbation description.

There is also the ESPF (electro-static potential fitted) method which:

"adds contributions to the one-electron Hamiltonian for computing the interaction between the charge distribution in Molcas and any external electrostatic potential, field, and field derivatives."

More about OpenMolcas in general

You mentioned Gaussian 16 and MOLPRO when listing commercial software in your question post, and you mentioned GPAW and PySCF when listing Python-based software in this comment. MOLCAS has been a commercial code for almost 40 years, and it costed about as much as GAUSSIAN and MOLPRO, and offered a similar level of "commercial-grade reliability" as those programs (especially compared to the slower Python-based software such as PySCF and GPAW), but a few years ago the vast majority of it was made free and . You can still buy a commercial license if you want to use one of the features that did not become open source (for example, if the authors of that part of the code base are no longer alive or contactable, and therefore cannot give permission for open-sourcing their lines of code).

OpenMolcas is the highest-voted answer to: What is a good replacement for Gaussian? (ORCA has a net score of 25 and 1 downvote, but OpenMolcas has a net score of 24 and 0 downvotes, although some of this might have been more because of the quality of the answers rather than the software itself, but I think OpenMolcas does deserve to be chosen over ORCA in many cases because ORCA is not open source: it might be free when you apply for access and get your application approved after you give away information, create a login username and password, and permanently get recorded in a database of users, but you cannot modify ORCA like you can modify OpenMolcas). OpenMolcas also has a net score that is 11 higher than ORCA for the answer to: Is there a free package with robust CASSCF functionality? (but again, these are only net scores on MMSE, and with only a few dozen voters on that thread, many who probably have never used either of those computer programs, it's still too early to not look at the net scores with a grain of salt).

OpenMolcas also comes readily packaged for Fedora (and on other platforms, you can just download it from GitLab, much more easily than ORCA, CFOUR, MRCC or other similar programs that might be "free" but not open source), and it was mentioned in answers and comment on this thread which is related to your question: Quantum chemistry in external electrostatic field?. ORCA hides its integrals in a binary format, whereas OpenMOLCAS is compatable with the readable FCIDUMP format, which allows OpenMolcas to interface with dozens of other programs, and I described it as "likely the fastest and most general program for calculating electron-repulsion integrals" (although PySCF may have caught up shortly after this thread: Is this bug reproducible in PySCF? Oxygen SCF with aug-cc-pV8Z fails). This thread might also interest you: Comparing GAMESS, OpenMOLCAS and Psi4 and since you mentioned GPAW, also this one: Why use PySCF/OpenMolcas instead of VASP/QuantumESPRESSO.


A quantum chemistry software that is free, I recommend: ORCA. Among its functionalities, it include QM/MM calculations. These calculations can be modeled with the inclusion of a external field, the suggested way is as follows:

Regarding the external field, I found from a previous question.

Actually there is an undocumented feature for this purpose:

   efield X-field-strength-in-a.u. , Y-field-strength-in-a.u. , Z-field-strength-in-a.u.

I have used it to compare dipole moments obtained via numeric and analytic differentiation and it worked fine. But do be careful as undocumented features do not officially exist (although in this case it might have just been overlooked in the manual)

  • 1
    $\begingroup$ As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. $\endgroup$
    – Community Bot
    Commented Mar 5 at 21:19
  • $\begingroup$ Hi! Thanks for the answer. But this is not what I'm looking for. I wanted to apply a "field gradient" and not a field. My condition could be satisfied if there are free codes capable of applying a linearly varying field. Maybe of the form $E(r_i) \alpha r_i$. I could do this in python based codes like GPAW, PySCF. But are there any other? I believe the orca statement applies a constant field. Hence the field gradient would be 0. $\endgroup$
    – Atom
    Commented Mar 6 at 15:40
  • $\begingroup$ @Atom I have received this answer from ORCA's forum: You can get what you want by What comes to my mind is to use ORCA's compound feature. I'm not sure what you want to use it for, but you could compound to iterate over a range of electric field strengths. You then have a list of energies for varying field strengths that you can use for post processing. orcaforum.kofo.mpg.de/viewtopic.php?f=8&t=11125 $\endgroup$ Commented Mar 7 at 9:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .