ectoolkits.analysis.dielectric_constant module#

ectoolkits.analysis.dielectric_constant.get_dielectric_constant(dielectric_susceptibility)[source]#
ectoolkits.analysis.dielectric_constant.get_dielectric_constant_profile(rho_1, rho_2, Delta_macro_Efield, Delta_macro_polarization, axis)[source]#
ectoolkits.analysis.dielectric_constant.get_dielectric_susceptibility(micro_polarization, micro_electric_field)[source]#
ectoolkits.analysis.dielectric_constant.get_induced_charge(rho_cube_1: Cp2kCube, rho_cube_2: Cp2kCube, axis: str = 'z')[source]#

Compute the induced charge density between two systems. Induced charge density is defined as rho_cube_2 - rho_cube_1.

Parameters:
  • rho_cube_1 (Cp2kCube) – The first charge density cube.

  • rho_cube_2 (Cp2kCube) – The second charge density cube.

  • axis (str, optional) – The axis along which to compute the average charge density, by default ‘z’.

Returns:

The coordinates and the induced charge density array.

Return type:

Tuple[np.ndarray, np.ndarray]

ectoolkits.analysis.dielectric_constant.get_integrated_array(x, y)[source]#
ectoolkits.analysis.dielectric_constant.get_micro_electric_field(x: ndarray[Any, dtype[float64]], rho: ndarray[Any, dtype[float64]], Delta_macro_Efield: float) ndarray[Any, dtype[float64]][source]#

Calculate the micro electric field from the charge density and the macroscopic electric field difference.

Parameters:
  • x (numpy.ndarray) – The grid points where the charge density is defined.

  • rho (numpy.ndarray) – The charge density in atomic units.

  • Delta_macro_Efield (float) – The macroscopic electric field difference between two systems in atomic units.

Returns:

The micro electric field in atomic units.

Return type:

numpy.ndarray

Notes

The micro electric field is calculated as follows: 1. Calculate the integrand as pi * 4 * rho. 2. Integrate the integrand over the grid points x to obtain the micro electric field. 3. Determine a constant such that the mean of the micro electric field matches the macroscopic electric field difference. 4. Add the constant to the micro electric field.

The units of the input and output arrays are atomic units (au).

ectoolkits.analysis.dielectric_constant.get_micro_polarization(x: ndarray[Any, dtype[float64]], rho: ndarray[Any, dtype[float64]], Delta_macro_polarization: float) ndarray[Any, dtype[float64]][source]#

Calculate the micro polarization from the induced charge density and the macroscopic polarization difference.

Parameters:
  • x (numpy.ndarray) – The grid points where the charge density is defined.

  • rho (numpy.ndarray) – The induced charge density in atomic units.

  • Delta_macro_polarization (float) – The macroscopic polarization difference between two systems in atomic units.

Returns:

The micro polarization in atomic units.

Return type:

numpy.ndarray

Notes

The micro polarization is calculated as follows: 1. Calculate the integrand as -rho. 2. Integrate the integrand over the grid points x to obtain the micro polarization. 3. Determine a constant such that the mean of the micro polarization matches the macroscopic polarization difference. 4. Add the constant to the micro polarization.

The units of the input and output arrays are atomic units (au).