Skip to content

E10: Constant Potential Method (CPM)

Module: sci_form::experimental::cpmFeature flag: experimental-cpm


Overview

Extends charge and electronic property calculations by coupling the molecule to a "virtual electrode" at electrochemical potential μ. Charges fluctuate to equilibrate with the electrode, enabling simulation of quantum capacitance, charge response to potential, and electrochemical energy surfaces.


Theory

Grand Potential

The grand potential functional couples electronic energy with the electrode potential:

Ω({qi},μ)=Eelec({qi})μiqi

Minimizing with respect to charges {qi} yields the equilibrium charge distribution at potential μ.

Charge Equilibration at Fixed μ

The SCF iteration solves:

qi(n+1)=μχijiJijqj(n)ηi

with damped update (50/50 mixing) and Coulomb interaction:

Jij=14.3996εrij(kcal/mol per e²)

Electrochemical Energy Surface

Scanning μ produces the charge response curve Q(μ) and capacitance:

C(μ)=Qμ

computed via finite differences over the μ scan.


API

rust
use sci_form::experimental::cpm::*;

// CPM charges at a given potential
let config = CpmConfig {
    mu_ev: -4.44,           // SHE reference (eV)
    dielectric: 78.5,       // water
    max_iter: 100,
    charge_tol: 1e-6,
};
let result = compute_cpm_charges(&elements, &positions, &config);
// result.charges: Vec<f64>
// result.total_charge: f64
// result.grand_potential: f64
// result.converged: bool
// result.iterations: usize

// Electrochemical surface scan
let surface = compute_cpm_surface(&elements, &positions, mu_min, mu_max, n_points, dielectric);
// surface.mu_values: Vec<f64>
// surface.total_charge: Vec<f64>
// surface.free_energy: Vec<f64>
// surface.capacitance: Vec<f64>

Potential Scale

Referenceμ (eV)
SHE (Standard Hydrogen Electrode)4.44
+1 V vs SHE3.44
-1 V vs SHE5.44
Typical scan range[5.5,3.5]

Applications

  • Quantum capacitance of molecular electrodes
  • Redox potential estimation: E0=ΔΩ/nF
  • Conformer ranking under electrochemical bias
  • Charge response analysis for molecular electronics

Tests

bash
cargo test --features experimental-cpm --test regression -- test_cpm

8 integration tests covering: charge equilibration convergence, total charge response to potential, monotonic charge-potential relationship, grand potential computation, capacitance positivity, electrochemical surface scanning, solvent dielectric effects, and multi-element systems.

Released under the MIT License.