Triangular Lattice

Discussing the best way to implement feature X
Post Reply
bart
Posts: 26
Joined: 23 Jan 2019, 09:35

Triangular Lattice

Post by bart »

It would be useful to have an implementation for a triangular lattice integrated into the main code (tenpy.models.lattice), since it comes up so frequently. Many thanks :)
User avatar
Johannes
Site Admin
Posts: 457
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: Triangular Lattice

Post by Johannes »

Agreed.
The Triangular lattice is basically just a simple square lattice with one of the basis vectors rotated by 30 degrees towards the other. I'd suggest to use

Python: Select all

basis = np.array([[0.5 *np.sqrt(3), 0.5], # first basis vector
                  [0., 1.]]) # second basis vector: y-direction
If you quickly write down the (next-)(next-)nearest neighbors, I'll copy over the code from the tenpy.models.lattice.Square lattice and make the figure.
bart
Posts: 26
Joined: 23 Jan 2019, 09:35

Re: Triangular Lattice

Post by bart »

Using this basis, for a point at the origin:

There are 6 NN at a distance 1.
There are 6 nNN at a distance sqrt(3).
There are 6 nnNN at a distance 2.

Code: Select all

NN = {1/2 {Sqrt[3], 1}, {0, 1}, -(1/2) {Sqrt[3], 1}, -{0, 1}, 1/2 {Sqrt[3], -1}, 1/2 {-Sqrt[3], 1}};
nNN = {{Sqrt[3], 0}, {-Sqrt[3], 0}, 1/2 {Sqrt[3], 3}, -(1/2) {Sqrt[3], 3}, 1/2 {-Sqrt[3], 3}, 1/2 {Sqrt[3], -3}};
nnNN = {{0, 2}, {0, -2}, {Sqrt[3], 1}, -{Sqrt[3], 1}, {-Sqrt[3], 1}, {Sqrt[3], -1}};
Checked with Mathematica. Many thanks :)
User avatar
Johannes
Site Admin
Posts: 457
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: Triangular Lattice

Post by Johannes »

Implemented ;)
bart
Posts: 26
Joined: 23 Jan 2019, 09:35

Re: Triangular Lattice

Post by bart »

Thank you very much! :D
Post Reply