Utilities

class gpaw.utilities.partition.AtomPartition(comm, rank_a, name='unnamed')[source]

Represents atoms distributed on a standard grid descriptor.

gpaw.utilities.ibz2bz.ibz2bz(input_gpw: Union[pathlib.Path, str], output_gpw: Optional[Union[pathlib.Path, str]] = None) None[source]

Unfold IBZ to full BZ and write new gpw-file.

Example:

ibz2bz('abc.gpw')

This will create a ‘abc-bz.gpw’ file. Works also from the command line:

$ python3 -m gpaw.utilities.ibz2bz abc.gpw
gpaw.utilities.dipole.dipole_matrix_elements(gd: gpaw.grid_descriptor.GridDescriptor, psit_nR: List[numpy.ndarray], P_nI: numpy.ndarray, position_av: numpy.ndarray, setups: List[gpaw.setup.Setup], center: Iterable[float]) numpy.ndarray[source]

Calculate dipole matrix-elements.

gd:

Grid-descriptor.

psit_nG:

Wave functions in atomic units.

P_nI:

PAW projections.

setups:

PAW setups.

Returns matrix elements in atomic units.

gpaw.utilities.dipole.dipole_matrix_elements_from_calc(calc: gpaw.calculator.GPAW, n1: int, n2: int, center: Optional[Iterable[float]] = None) List[numpy.ndarray][source]

Calculate dipole matrix-elements (units: Å).

gpaw.utilities.ekin.ekin(dataset: gpaw.setup.Setup) Tuple[numpy.ndarray, numpy.ndarray, float][source]

Calculate PAW kinetic energy contribution as a function of G.