Skip to content

feat(openmm): Add electrostatic/charge support #114

@ericchansen

Description

@ericchansen

Problem

The OpenMM engine hardcodes all particle charges to 0.0. In the HARMONIC path, NonbondedForce.addParticle(0.0, sigma, epsilon) explicitly sets charge=0. In the MM3 path, CustomNonbondedForce has no charge parameter at all.

The ForceField model has no concept of partial charges — there is no ChargeParam or per-atom charge field. The AMBER frcmod loader doesn't parse charges either (charges typically come from the prmtop/mol2 file, not frcmod).

Impact

  • Electrostatic interactions contribute significantly to conformational energies, hydrogen bonding, and solvation
  • For small organic molecules, electrostatics can be 30-50% of the total nonbonded energy
  • Force field fitting without electrostatics produces parameters that implicitly absorb electrostatic effects into vdW terms, leading to poor transferability
  • Users coming from AMBER/CHARMM expect electrostatics to be present

Expected Behavior

  • ForceField or Q2MMMolecule should store per-atom partial charges
  • Charges could come from: AMBER prmtop files, mol2 files, AM1-BCC calculation, or user specification
  • NonbondedForce in HARMONIC mode should use actual charges with Coulomb interactions
  • MM3 mode should support MM3's charge model (bond dipoles or partial charges)
  • 1-4 electrostatic scaling (AMBER scee=1.2) should be applied

Scope Consideration

This is a larger feature than the other gaps because it requires:

  1. A charge storage mechanism (per-atom, not per-parameter-type)
  2. A charge source (parser, calculator, or user input)
  3. Proper 1-4 electrostatic scaling
  4. Possibly a dielectric constant option

It may make sense to implement this in phases — first read-only charges from prmtop, then optimizable charges.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend-specific (OpenMM, Tinker, JAX, etc.)enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions