Symmetrization

void diverge_generate_symm_maps(diverge_model_t *model)
[source]

generates symmetry mappings needed to perform the tasks below. For certain models, the positions might not be given accurately enough. You can set the precision of position and orbital mapping via diverge_generate_symm_maps_set_precision().

void diverge_generate_symm_maps_set_precision(double ASSERT_POSITION_BEYOND, double ORBITAL_OVERLAP, double POS_EQUAL, double MIN_ORBITAL_WEIGHT, double BOND_EQUAL, double MATRIX_ZERO)
[source]

set the precision for symmetry map generation.

Parameters:
  • ASSERT_POSITION_BEYOND (double) – for assertion whether the beyond unit cell portion of the position mapping is violated, ~0

  • ORBITAL_OVERLAP (double) – minimal overlap of orbitals that is considered nonzero, ~0

  • POS_EQUAL (double) – finding whether obtials have same position, ~0

  • MIN_ORBITAL_WEIGHT (double) – minimal orbital weight that is considered ‘one’, ~1

  • BOND_EQUAL (double) – tu_symmstruct: find whether bonds are the same, ~0

  • MATRIX_ZERO (double) – tu_symmstruct: when is a matrix zero?, ~0

struct diverge_generate_symm_maps_precision_t
[source]

structure to gather the arguments/return values of diverge_generate_symm_maps_precision_get() and diverge_generate_symm_maps_precision_set()

double ASSERT_POSITION_BEYOND
[source]

beyond unit cell mapping of a position, ~0

double ORBITAL_OVERLAP
[source]

minimal orbital overlap that is considered nonzero, ~0

double POS_EQUAL
[source]

find whether orbitals have the same position, ~0

double MIN_ORBITAL_WEIGHT
[source]

minimal orbital weight that is considered one, ~1

double BOND_EQUAL
[source]

find whether bonds are the same, ~0 (tu_symmstruct)

double MATRIX_ZERO
[source]

when is a matrix actually zero?, ~0 (tu_symmstruct)

diverge_generate_symm_maps_precision_t diverge_generate_symm_maps_precision_get(void)
[source]

get the current symmetry map precision settings

void diverge_generate_symm_maps_precision_set(diverge_generate_symm_maps_precision_t p)
[source]

same as diverge_generate_symm_maps_set_precision(), but using the structure diverge_generate_symm_maps_precision_t

double diverge_symmetrize_2pt_coarse(diverge_model_t *model, complex128_t *buf, complex128_t *aux)
[source]

symmetrizes coarse mesh 2pt function stored in buf. returns maximum difference between symmetrized and un-symmetrized buffer

Parameters:
  • model (diverge_model_t) – the divERGe model

  • buf (complex128_t*) – buffer to symmetrize, length (nk, nb, nb) with nb = n_orb * n_spin

  • aux (complex128_t*) – auxiliary buffer that may be either NULL or of the same size as buf

double diverge_symmetrize_2pt_fine(diverge_model_t *model, complex128_t *buf, complex128_t *aux)
[source]

symmetrizes fine mesh 2pt function stored in buf. returns maximum difference between symmetrized and un-symmetrized buffer

Parameters:
  • model (diverge_model_t) – the divERGe model

  • buf (complex128_t*) – buffer to symmetrize, length (nkf, nb, nb) with nb = n_orb * n_spin

  • aux (complex128_t*) – auxiliary buffer that may be either NULL or of the same size as buf

double diverge_symmetrize_greens(diverge_model_t *model, gf_complex_t *buf, gf_complex_t *aux)
[source]

symmetrizes 2pt function of type gf_complex_t on a fine mesh (as the Green’s function). returns maximum difference between symmetrized and un-symmetrized buffer.

Parameters:
  • model (diverge_model_t) – the divERGe model

  • buf (gf_complex_t*) – buffer to symmetrize, length (nkf, nb, nb) with nb = n_orb * n_spin

  • aux (gf_complex_t*) – auxiliary buffer that may be either NULL or of the same size as buf

double diverge_symmetrize_mom_coarse(diverge_model_t *model, double *buf, index_t sub, double *aux)
[source]

symmetrizes coarse mesh momentum space function (no orbital/spin indices) stored in buf. returns maximum difference between symmetrized and un-symmetrized buffer

Parameters:
  • model (diverge_model_t*) – the divERGe model

  • buf (double*) – buffer of size (nk, sub)

  • sub (index_t) – number of internal indices (e.g. bands). all indices belonging to the sub dimension are symmetrized

  • aux (double*) – auxiliary buffer that may be either NULL or of the same size as buf

double diverge_symmetrize_mom_fine(diverge_model_t *model, double *buf, index_t sub, double *aux)
[source]

symmetrizes fine mesh momentum space function (no orbital/spin indices) stored in buf. returns maximum difference between symmetrized and un-symmetrized buffer

Parameters:
  • model (diverge_model_t*) – the divERGe model

  • buf (double*) – buffer of size (nkf, sub)

  • sub (index_t) – number of internal indices (e.g. bands). all indices belonging to the sub dimension are symmetrized

  • aux (double*) – auxiliary buffer that may be either NULL or of the same size as buf

rs_hopping_t *diverge_symmetrize_hoppings(diverge_model_t *model, rs_hopping_t *hop, index_t *n_hop, double hoplim)
[source]

symmetrizes hopping parameters of a divERGe model. Operates on the momentum mesh associated to the model.

Note

In case hop == NULL, this function operates on the internal hopping parameter array diverge_model_t.hop. If the model’s internals struct isn’t initialized, we generate it automagically and delete it again thereafter. For safe operation, we advise to not rely on this feature.

Parameters:
  • model (diverge_model_t*) – the divERGe model which needs to have common internals set (using diverge_model_internals_common()) and nonzero number of symmetries/allocated orbital symmetries (diverge_model_t.n_sym, diverge_model_t.orb_symmetries).

  • hop (rs_hopping_t*) – hopping parameters to symmetrize. Reallocates (via realloc) and returns the new memory. If hop == NULL, the function operates on the internal hopping parameters, ignores n_hop, and swaps out the old pointer to the realloced one.

  • n_hop (index_t*) – pointer to the length of the hop array. If n_hop == NULL operate on the model’s hopping parameters and ignore n_hop and hop.

  • hoplim (double) – absolute value up to which include hopping parameters in the symmetrized hoppings

Returns:

rs_hopping_t array that is the realloced version of the input, On exit and if != NULL, *n_hop is set to the new number of hopping parameters. Otherwise, all relevant information is updated in the model.