JDFTx  1.7.0
Lattice geometry


file  LatticeUtils.h
 Miscellaneous utilities relating to properties of Bravais Lattices.


class  GridInfo
 Simulation grid descriptor. More...
struct  Supercell
 Supercell corresponding to a given k-point mesh. More...
class  PeriodicLookup< T >
class  WignerSeitz
 Wigner-Seitz construction for a 3D lattice (and 2D lattice with orthogonal 3rd direction) More...


matrix3 reduceLatticeVectors (const matrix3<> &R, matrix3< int > *transmission=0, matrix3< int > *invTransmission=0)
std::vector< matrix3< int > > getSymmetries (const matrix3<> &R, vector3< bool > isTruncated=vector3< bool >(false, false, false), matrix3<> *Rreduced=0, matrix3< int > *transmission=0, matrix3< int > *invTransmission=0)
std::map< vector3< int >, class matrixgetCellMap (const matrix3<> &R, const matrix3<> &Rsup, const vector3< bool > &isTruncated, const std::vector< vector3<>> &x1, const std::vector< vector3<>> &x2, double rSmooth, string fname=string())
void writeCellMap (const std::map< vector3< int >, class matrix > &iCellMap, const matrix3<> &R, string fname)
 Write cell map to file.
std::vector< vector3<> > readArrayVec3 (string fname)
 Read an array of vector3<> from a plain text file, useful for reading in cellMap files.
vector3 getCoord (const vector3<> &pos)


double symmThreshold
 Relative threshold for symmetry detection.
double symmThresholdSq

Detailed Description

Function Documentation

◆ getCellMap()

std::map<vector3<int>, class matrix> getCellMap ( const matrix3<> &  R,
const matrix3<> &  Rsup,
const vector3< bool > &  isTruncated,
const std::vector< vector3<>> &  x1,
const std::vector< vector3<>> &  x2,
double  rSmooth,
string  fname = string() 

Get a list of unit cells in a supercell, with padding at the boundaries to maintain a Wigner-Seitz supercell range (smoothed by rSmooth) for all pairs of lattice coordinates between arrays x1 and x2. Returns a list of cell positions in lattice coordinates, along with the weights for matrix elements connecting each pair from x1 and x2 (which will add to 1 over each set of equivalent cells) Optionally write the cell map to a file, if fname is non-null

◆ getSymmetries()

std::vector<matrix3<int> > getSymmetries ( const matrix3<> &  R,
vector3< bool >  isTruncated = vector3< bool >(false, false, false),
matrix3<> *  Rreduced = 0,
matrix3< int > *  transmission = 0,
matrix3< int > *  invTransmission = 0 

Find the symmetries of a Bravais lattice, where some of the lattice directions may optionally be truncated. Optionally retrieve the reduced lattice vectors and transmission matrices which are computed as an intermediate step in determining symmetries.

◆ reduceLatticeVectors()

matrix3 reduceLatticeVectors ( const matrix3<> &  R,
matrix3< int > *  transmission = 0,
matrix3< int > *  invTransmission = 0 

Given a set of lattice vectors in the columns of R, return the minimal lattice vectors (shortest linear combinations) and optionally retrieve the integer transmission matrix (Rreduced = R * transmission) and its inverse.