gem.lattice.Lattice.__init__

Lattice.__init__(ek_list: ndarray, wk_list: ndarray = None, verbose=0, use_mpi=True, comm=None)[source]

Initialize the Lattice class with the given parameters.

Parameters:
  • ek_list – ndarray. List of one-body electronic Hamiltonian terms.

  • wk_list – ndarray, optional. Weights for each ek value (default: uniform weights).

  • verbose – int, optional. Level of verbosity (default: 0).

  • use_mpi – bool, optional. Distribute the k-point sums over the ranks of comm (default: True). Ignored when mpi4py is absent.

  • comm – mpi4py communicator, optional. Defaults to MPI.COMM_WORLD. Pass a sub-communicator to nest the k-point splitting inside another level of parallelism.

MPI. Every sum over k in this class runs over the contiguous k-points (splitted at construction) owned by this rank and is closed by allreduce. All ranks exit with the same global result. That matters for fit_mu_quasiparticle(), whose bisection must take the same branch everywhere.