calc_cap_energy

static ThomasFermi.calc_cap_energy(N_vec, energy_matrix, approximate_charges)

Calculates the capacitance energy (in meV) of a given charge configuration.

This is given by \((N - Z) E (N - Z)^T\), where E is the energy matrix, and Z is approximate_charges.

Parameters:
  • N_vec (ndarray[float]) – The charge configuration array. A 1D array with length equal to the number of islands specifying the number of charges on each island.

  • energy_matrix (ndarray[float]) – A 2D array with shape (num_islands, num_islands) giving the energy matrix (in meV) of the capacitance model.

  • approximate_charges (ndarray[float]) – An array with length equal to the number of islands, where each entry of the array is the integral of n(x) over the corresponding island.

Returns:

The capacitance energy (in meV) of the given charge configuration.

Return type:

float