Utility

src.utility.calc_madelung_cc(mat, alloy_fn)[source]
Args:
  • ‘mat’ is the charge-charge interaction matrix.
  • ‘alloy_fn’ specifies the distribution of charges.

Calculate the Madelung constant due to the charge-charge interaction.

src.utility.calc_madelung_cd(mat, alloy_fn, alloy_hn, alloy)[source]
Args:
  • ‘mat’ is the charge-dipole interaction matrix.
  • ‘alloy_fn’ is the charge configuration.
  • ‘alloy_hn’ is the dipole configuration.
  • ‘alloy’ file contains the information to map index between 3D and 1D for easy use in this funciton.
src.utility.calc_madelung_dd(mat, alloy_fn)[source]
Args:
  • ‘mat’ is the dipole-dipole interaction matrix.
  • ‘alloy_fn’ specifies the dipole configuration.

Calculate the “Madelung constant” due to the dipole-dipole interaction.