Commit d2c1401c authored by Christoph Groth's avatar Christoph Groth
Browse files

add lattice.cubic

parent 24980e4c
......@@ -20,6 +20,7 @@ Library of lattices
chain
square
cubic
triangular
honeycomb
kagome
......@@ -7,7 +7,7 @@
# http://kwant-project.org/authors.
__all__ = ['TranslationalSymmetry', 'general', 'Polyatomic', 'Monatomic',
'chain', 'square', 'triangular', 'honeycomb', 'kagome']
'chain', 'square', 'cubic', 'triangular', 'honeycomb', 'kagome']
from math import sqrt
from itertools import product
......@@ -745,6 +745,12 @@ def square(a=1, name='', norbs=None):
return Monatomic(((a, 0), (0, a)), name=name, norbs=norbs)
def cubic(a=1, name='', norbs=None):
"""Make a cubic lattice."""
return Monatomic(((a, 0, 0), (0, a, 0), (0, 0, a)),
name=name, norbs=norbs)
tri = ta.array(((1, 0), (0.5, 0.5 * sqrt(3))))
def triangular(a=1, name='', norbs=None):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment