openmopac/mopac

External point charges

Closed this issue · 4 comments

Is your feature request related to a problem? Please describe.
I'm looking for a way to add point charges to a system.

Describe the solution you'd like
I would like an option to specify the charge and coordinates of external point charges. Something similar to Orca's %pointcharges, Psi4's QMMM.addChargeAngstrom() or xtb's $embedding.

Describe alternatives you've considered
I looked at the FIELD keyword but that adds a uniform electric field. I also looked at the QMMM keyword, and it seems this needs a quantity φ(i) of the effective potential at each QM atom, rather than the charge and coordinates of the external point charges creating the potential.

I'm not sure if it is possible to produce the same effect using QMMM - would calculating sum of q_i / r_ij for each atom i and all point charges j do what the equivalent Orca / Psi4 / xtb options do?

MOPAC's QM/MM interface using the QMMM keyword is not completely equivalent to a QM calculation with a set of external point charges. MOPAC's interface only allows you to adjust the value of the external potential seen by each atom, but it does not allow you to specify derivative information of the external potential at each atom. In effect, MOPAC is modeling a strictly monopole/monopole interaction between MM charges and the partial charges on the QM atoms, thus the present interface is only compatible with QM/MM methods that restrict the electrostatic interactions between QM and MM regions to a monopole/monopole form. Also, if you want consistent forces, then you have to calculate the QM/MM contribution yourself because this also requires derivative information. I don't know the full history of this feature, but the present QM/MM interface in MOPAC was either requested or contributed by people actively performing QM/MM simulations, so they decided for some reason that it was best to do things this way.

If you really want point charges, then MOPAC allows you to add "sparkles" to the list of atoms, which correspond to certain elements and ligands that are approximated as classical point charges. Unfortunately, these are only allowed to take on specific integer and half-integer charge values at the moment. It would be useful to specify sparkles with an adjustable partial charge, which should be straightforward to implement with MOPAC's existing system of atom labeling. I will consider this to be a feature request and look into implementing it at some point early next year.

@godotalgorithm Thanks! I thought the existing QMMM keyword might work like that but I wasn't sure. I can see how for distant charges ignoring the derivative would be a good approximation, but for very close charges it would be less good (ie the atoms immediately outside the QM region).

Adjustable charge sparkles sounds good. Let me know when there is stuff to test, I can compare Mopac with Orca with both running PM3.

P.S. Would there need to be some damping parameter like what xtb calls "chemical hardness" for when the orbitals overlap with the point charge?

Yes, MOPAC's model of sparkles is a 2-parameter model - the charge of the sparkle and an effective ionic radius (i.e. chemical hardness). Both MOPAC and xTB appear to set this radius using a Klopman-Ohno model form for the Coulomb interaction, but I'm not sure if all the details are exactly the same.