Cheq: Charge Equilibration for Molecular Dynamics banner

Cheq: Charge Equilibration for Molecular Dynamics

1 devlogs
15h 11m 23s

A high-performance, pure Rust library for calculating dynamic partial atomic charges using the Charge Equilibration (QEq) method, applicable to any molecular system.

Cheq implements the robust and general Charge Equilibration (QEq) method proposed by Rappé and Goddard (1991) to predict the self-consistent, geometry-dependent partial charges of atoms in a molecular system.

Unlike fixed-charge force fields, QEq allows atomic charges to dynamically respond to changes in molecular geometry and external fields, which is essential for accurate molecular dynamics (MD) simulations, particularly for systems like ceramics, polymers, and biological molecules where charge transfer is significant.

The method relies solely on atomic properties (electronegativity, hardness, and radius) and the molecular geometry to achieve charge neutrality.

Demo Repository

Loading README...

Tony Kan

Shipped this project!

Hours: 15.19
Cookies: 🍪 229
Multiplier: 15.07 cookies/hr

Based on quantum mechanical dynamic charge calculations, this accurately calculates the electric field and charge distribution polarization of drug-protein ligand binding pockets, which is used in drug simulations.

Tony Kan

Summary:

Introduces a major new feature to the cheq library: the ability to perform charge equilibration in the presence of an external electrostatic potential. This enables hybrid QEq/MM simulations, where a quantum-mechanically treated region (the QEq system) polarizes in response to a classical environment (the external field). The implementation supports contributions from both discrete point charges and a uniform electric field, which are incorporated into the QEq equations by modifying the effective electronegativity of each atom.

Changes:

  • Implemented ExternalPotential and PointCharge Data Structures:

    • Created a new PointCharge struct to represent a fixed charge in the classical environment (e.g., an atom from a protein).
    • Developed a flexible ExternalPotential struct to aggregate contributions from multiple PointCharges and/or a uniform_field.
    • Provided a builder-style API for ExternalPotential (with_point_charges, with_uniform_field) for ergonomic construction.
  • Introduced a New solve_in_field Solver Method:

    • Added a new public method, QEqSolver::solve_in_field, which accepts an ExternalPotential as an argument.
    • The method computes the external potential V_ext at each QEq atom’s position, using the same STO/GTO shielded Coulomb formalism for consistency with internal interactions.
    • The external potential is then added to the electronegativity term in the QEq linear system (χ_i* = χ_i + V_ext_i), effectively polarizing the QEq system.
  • Parallelized External Potential Calculation:

    • The calculation of the external potential, which can be computationally intensive for large environments, is parallelized using rayon for optimal performance.
Attachment
1

Comments

milo1004
milo1004 about 1 month ago

Nice addition to Cheq. Supporting external electrostatic potentials (point charges and uniform fields) enables hybrid QEq/MM-style setups and makes charge equilibration more physically realistic.