[WIP] Add DampedExp6810 and multipole handlers / potentials#109
[WIP] Add DampedExp6810 and multipole handlers / potentials#109aehogan wants to merge 33 commits intoopenforcefield:mainfrom
Conversation
|
@SimonBoothroyd To get the explicit polarization potential working I'm going to need the electrostatic potential (dV/dr)*q from the Coulomb potential. Right now potential_energy_fn only takes as inputs the TensorSystem and its own TensorPotential. Is there an easy way I can get access to the electrostatics potential? Perhaps just the charges from that potential? The way this is structured in a .offxml / smirnoff plugins is to have both an Electrostatics and Multipole tag, when constructing an openmm system the multipole handler is loaded second, copies the charges from the nonbonded handler to the AmoebaMultipoleForce and then zeros out the nonbonded charges. |
|
ok @aehogan you'll need to rebase onto |
…if permanent electric field isn't), also a=0.39 for Amoeba
- Add polarization_type parameter with options: "direct", "mutual", "extrapolated" - Implement direct polarization solver (0 iterations, no mutual coupling) - Implement extrapolated polarization solver using OPT3 coefficients - Maintain mutual polarization as default (60 iterations, original behavior) - Add parameterized test for all three polarization types - Ensure backward compatibility with existing code 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
… multipole energy - Apply exclusion scaling factors in compute_dampedexp6810_energy to fix massive unphysical energies - Add batch processing support to compute_multipole_energy for multiple conformers - Implement 3 polarization calculation options: direct, extrapolated (OPT3), and mutual - Use proper three-component energy decomposition for direct and extrapolated types - All tests now passing with appropriate tolerances for each polarization method 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Use iScale=1.0 for induced-induced coupling (no exclusions in A matrix) - Fix Thole damping: thole5 = 1 - (1 + au3) * exp(-au3), not 1.5*au3 - Unify energy formula: -0.5 * μ · E_fixed for all polarization types - Fix extrapolation: use simple iterative updates, not conjugate gradient - Use correct OPT4 coefficients: [-0.154, 0.017, 0.658, 0.474] All 26 non-periodic multipole tests now pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix multipole axis atom resolution from SMIRKS indices to topology indices in convert_multipole (openff/nonbonded.py) - Update OpenMM converter to handle resolved indices (openmm/nonbonded.py) - Add 38 new tests for water model and ammonia: - Water dimer/trimer energy tests (all polarization types) - Water dimer force validation (autograd vs finite difference) - Single water zero-energy test - Multi-conformer batched computation - Axis resolution validation - Water cluster scaling (2, 4, 8 molecules) - Ammonia dimer/trimer energy tests - Ammonia force validation - Ammonia cluster scaling (2, 4, 6 molecules) All 94 nonbonded tests pass. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Description
Support for DampedExp6810 and Multipole from the smirnoff-plugins repository.
Status