Configuration

Generate charge and dipole configurations, especially convenient for high-symmetric configurations. The generated matrix (in ‘netcdf’ format) stores the information regarding dipole/charge on each site.

class configuration.Charge_config(n1, n2, nz, lattice)[source]

Charge_config inherits from the ‘Supercell’ class.

Args:

n1,n2,n3 are the number of repeated unitcells along the three directions of the ‘lattice’.

lattice specifies the Bravais lattice of a unit cell.

generate_high_symmetry(p=1, k=(0, 0, 0))[source]

The distribution of charge is set according to this k value and the charge magnitude.

Parameters:
  • p – represents the magnitude of charge.
  • k – k = (kx,ky,kz): represents the high symmetry points in the reciprocal space.
write_alloy_matrix(fn)[source]

Write the out put to a ‘netcdf’ file named ‘fn’.

class configuration.Dipole_config(n1, n2, nz, lattice)[source]

Similar to ‘Charge config’.

generate_high_symmetry(p=(1, 1, 1), k_px=(0, 0, 0), k_py=(0, 0, 0), k_pz=(0, 0, 0))[source]
Parameters:
  • p – p=(px,py,pz) represents the magnitude of dpoles.
  • k_px – k_px = (kx,ky,kz) represents a high symmetry points in the reciprocal space and specifies how the value of px on each site.
  • k_py – Similar to k_px.
  • k_pz – Similar to k_px.