Skip to content

Implement Custom External Electric Fields & Electrostatic Embedding #19

@TKanX

Description

@TKanX

Description:

Implement a flexible system for applying external electric fields to the charge equilibration process. This feature allows the solver to account for environmental electrostatics—such as protein pockets (via point charges) or applied fields (via uniform vectors)—effectively modifying the effective electronegativity of atoms. This enables "QEq/MM" hybrid calculations, solving convergence issues for large systems by treating the environment as a fixed external potential while maintaining rigorous STO shielding for close-range interactions.

Tasks:

  • Core Data Structures

    • Define ExternalAtom struct (position, charge, atomic_number).
    • Define ExternalField struct (point_charges, uniform_field).
    • Implement builder pattern for ergonomic API usage.
  • Physics Engine

    • Implement calculate_external_potential logic.
    • Integrate STO shielding lookup for external atoms (using internal Parameters for radii).
    • Implement uniform field potential calculation ($V = -\vec{E} \cdot \vec{r}$).
  • Solver Integration

    • Extend QEqSolver with solve_with_field method.
    • Modify the RHS vector construction to include external potential terms ($D_i = -(\chi_i^0 + V_i^{ext})$).
    • Ensure matrix dimensions remain invariant (performance optimization).

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions