Skip to main content

Module esp

Module esp 

Source
Expand description

Electrostatic potential (ESP) on 3D grids + Gaussian .cube format I/O.

ESP at point r: Φ(r) = Σ_A Z_A / |r - R_A| − Σ_{μν} P_{μν} ∫ φ_μ(r’) / |r - r’| φ_ν(r’) dr’

The full two-electron integral is expensive. For EHT-level ESP we use the Mulliken-charge approximation: Φ(r) ≈ Σ_A q_A / |r - R_A|

where q_A is the full nuclear charge (not just valence) minus the Mulliken electron population.

For a more refined ESP: we can sum nuclear + point-charge electron contributions: Φ(r) = Σ_A Z_nuclear / |r - R_A| − Σ_{μ} n_μ Σ_g c_g ∫ g(r’) / |r-r’| dr’

We use the Mulliken approach for speed, which is standard for semi-empirical methods.

Structs§

CubeFile
Gaussian .cube file (for I/O).
EspGrid
ESP grid result.

Functions§

compute_esp_grid
Compute ESP on a 3D grid using Mulliken-charge approximation.
compute_esp_grid_parallel
Compute ESP on a 3D grid using rayon parallelism.
esp_color_map
Map an ESP value to an RGB color.
esp_grid_to_colors
Map an entire ESP grid to RGB colors.
export_cube
Export ESP grid as a Gaussian .cube file.
read_cube
Read a Gaussian .cube file.