Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does ASH ensure total charge convervation during QM/MM simulation? #418

Open
Lactoria-cornuta opened this issue May 19, 2024 · 1 comment

Comments

@Lactoria-cornuta
Copy link

From my cursory look into the code I couldn't tell if it is the case.
I am talking about the situation when the sum of the MM charges of QM atoms does not equal an integer. Given that the QM region has an integer charge by definition, there would be a total charge difference between the full MM and QM/MM descriptions. This would violate the charge neutrality requirement of PME electrostatics for QM/MM simulation and is considered to be an issue for QM/MM energies (https://onlinelibrary.wiley.com/doi/10.1002/jcc.20857).
For example, in Amber the charge difference could be redistributed between the MM2 atoms (atoms bonded to MM1 atom) or between the whole MM subsystem (excluding the MM1 atom) which is the default option for running QM/MM simulations.

@RagnarB83
Copy link
Owner

So ASH currently only does electrostatic embedding (mechanical embedding is actually not fully enabled yet) and the MM charges of the QM-region are then set to zero during the calculation of the MM-energy (by OpenMM) to avoid double-counting. Any defined pointcharges of the QM-atoms are thus never actually used.

During QM/MM, if the QM-region has a zero total charge:

  • no problem, the QM-atom charges are set to zero and the total MM charge does not change.

During QM/MM, if the QM-region has non-zero total charge (e.g. -1 or +1) then you are right that this would cause a problem, since if the MM-charges of the QM-atoms have been set to zero (in order to avoid QM-MM electrostatic double-counting) then the total MM-system charge no longer sums to zero, which could cause an issue for the MM-part PME electrostatics (only if periodic electrostatics are turned on). OpenMM does deal with this automatically (outside ASH) by adding a uniform neutralizing charge distribution for non-zero charged systems. From an energetic point of view, this scenario would give a systematic shift in total MM energy and total QM/MM energy. However, the MM-energy is not that well-defined anyway and this systematic shift should have no effect when we calculate relative energies for systems with QM-regions set up in the same way (same charge). For an ionization energy (where the QM-region charge changes), one might have an issue and perhaps the MM-energy difference is not very physical then.

For the QM-part (with embedded pointcharges included and calculated by the QM-code), it would depend on how we do the calculation. Most QM-codes interfaced to ASH actually have no periodicity so the problem does not come up there (CP2K is the first one so far). On the other hand, the QM/MM energy expression is not consistent if the MM-part is periodic and the QM-part is not.
Proper periodic QM/MM MD simulations in ASH is not really possible yet.
I will take a look at the Amber paper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants