triqs::gfs::find_cell_dims

#include <triqs/gfs.hpp>

Synopsis

utility::mini_vector<int, 3> find_cell_dims (arrays::matrix<double> const & inv_n)

Compute dimensions of a parallelepiped cluster cell using the inverse of the periodization matrix

Parameters

  • inv_n inverse \(N^{-1}\) of the periodization matrix

Returns

the dimensions of the parallelepiped unit cell

for a given Bravais lattice (defined by unit vectors \({a_i}_{i=0\dots d-1}\)), the periodic boundary conditions are uniquely defined by the matrix \(N\) such that the super vectors \(\tilde{a}_i\) are given by:
\[\tilde{a}_i = \sum_j N_{ij} a_j\]

This function computes the dimensions of a parallelepipedic super unit cell (i.e corresponding to the super vectors).

Example:
If \(N_{ij}\) is diag{n_k1, n_k2, n_k3}, this returns {n_k1, n_k2, n_k3}

The algorithm used is the following: let \(C={(0,0,0)}\) for each dimension \(d=1\dots 3\) :

  • Find the lowest nonzero integer \(k_d\) such that there exists \(mathbf{x}\) in C such for all \(d_p\) in \(1\dots 3\), \(k_d mathbf{a}_d - mathbf{x}\) belongs to the superlattice.
  • Update \(C = {mathbf{x} + q mathbf{a}_d, mathbf{x}\in C, q=0\dots k_d-1}\)

return {k_d}_{k=1dots d}