calculate_surface_charge_density

mdcraft.analysis.profile.calculate_surface_charge_density(bins: ndarray[float], charge_density_profile: ndarray[float], dielectric: float = None, *, L: float = None, dV: float | ndarray[float] = None, reduced: bool = False) float | ndarray[float][source]

Calculates the surface charge density \(\sigma_q\) using the charge density profile \(\rho_q(z)\).

The surface charge density is given by

\[\sigma_q=\frac{1}{L}\left( \varepsilon_0\varepsilon_\mathrm{r}\Delta V -\int_0^L z\rho_q(z)\,\mathrm{d}z\right)\]

where \(\varepsilon_0\) and \(\varepsilon_\mathrm{r}\) are the vacuum and relative permittivities, respectively, \(\Delta V\) is the potential difference, and \(L\) is the system dimension.

The first (static) term accounts for the applied potential across the dielectric medium, while the second (polarization) term accounts for the distribution of charged species.

Parameters:
binsarray-like

Histogram bin centers \(z\) for the charge density profile in charge_density_profile.

Shape: \((N_\mathrm{bins},)\).

Reference unit: \(\mathrm{Å}\).

charge_density_profilearray-like

Charge density profile \(\rho_q(z)\).

Shape: \((N_\mathrm{bins},)\) or \((N_\mathrm{frames},\,N_\mathrm{bins})\).

Reference unit: \(\mathrm{e/Å}^{-3}\).

dielectricfloat, optional

Relative permittivity or static dielectric constant \(\varepsilon_\mathrm{r}\). Required if dV is provided.

Lfloat, keyword-only, optional

System size \(L\) in the dimension that bins and charge_density_profile were calculated in. If not specified, it is determined using the first and last values in bins, assuming that the bin centers are uniformly spaced.

Reference unit: \(\mathrm{Å}\).

dVfloat or array-like, keyword-only, optional

Potential difference \(\Delta V\) across the system dimension specified in axis. If not provided, only the polarizable part (second term) of the surface charge density is calculated.

Shape: Scalar or \((N_\mathrm{frames},)\).

Reference unit: \(\mathrm{V}\).

reducedbool, keyword-only, default: False

Specifies whether the data is in reduced units.

Returns:
surface_charge_densitynumpy.ndarray

Surface charge density \(\sigma_q\).

Shape: Scalar or \((N_\mathrm{frames},)\).

Reference unit: \(\mathrm{e/Å}^2\).