Supercell

Construct the supercell.

class supercell.Supercell(n1, n2, n3, lattice)[source]
Args:

n1,n2,n3 are the number of repeated unitcells along the three directions of the ‘lattice’.

lattice specifies the Bravais lattice of a unit cell.

Note

This version is not compitable with previous ones as

  • All the index starts from 0.
  • Arrays (e.g. lattice and reci lattice) are row majored.

The reason is to use Pybind11 that binds to C++ instead of Fortran.

rec_lat()[source]

Calculates reciprocal lattice vectors.

The convention follows “Solid state physics” by Lu Dong, Jiang Ping … Eq. (2.2.2)

set_supercell()[source]

Multiply the n1,n2,n3 to the unitcell vectors to form the superlattice.

volcell()[source]

Volume of the supercell.