Angle Value Calculator
Most physically relevant twist configurations are irrational, so typing a rounded angle directly into code is usually unstable and hard to reproduce.
This calculator instead returns exact integer tuples ll1, ll2, ul1, ul2 that define the commensurate match between the lower and upper layers. Those integers can be used directly in MoirePy and provide deterministic geometry reconstruction.
Internally, both layers are truncated inside a chosen radius and overlap candidates are filtered using the Angle Calculation Process.
Each result row gives:
- angle in degrees and radians
- integer tuple (
ll1,ll2,ul1,ul2) - estimated supercell size (
cells)
Some Guidelines
A radius must be specified to define the extent of the circular region centred at the origin. This value is used to truncate both the upper and lower lattices. Larger radius Includes more lattice points, potentially giving more precise calculations and revealing smaller angles, but increases computation time. Smaller radius Produces faster results, yet may detect only larger angle values.
Currently supported systems:
- Both layers 60\(^\circ\) (Triangular, Hexagonal and Kagome lattices)
- Both layers 90\(^\circ\) (Square lattice)
-
Custom mode (experimental)
Possible problems
- Erroneous or nonsensical output
- Unresponsiveness or infinite loops
- Unexpected program behaviourProceed only if you believe the results yielded by the Angle Calculation Process are correct and meaningful for your custom lattice vectors.
Larger Value of points per cell More points per cell in the lattice means larger hamiltonian matrix, which can lead to longer computation times and higher memory usage. Especially if planning to invert the hamiltonian matrix and find eigenvalues and eigenvectors later.
Number of Points has been calculated assuming only one point per unit cell. If you are using lattices which have multiple points per unit cell like hexagonal (2) or kagome (3), multiply this value by the number of points per unit cell in your lattice to get the actual number of points in the Moiré lattice.
Precision has NO effect on the calculation. It only affects the output format of the results. (In the calculation, we stick to integer values to avoid floating point errors).
Calculator
Note
The last column (cells) reports the total number of small cells in the moiré supercell including both upper and lower layers.
If your lattice has multiple basis points per unit cell, scale accordingly:
- Hexagonal (2 basis points):
actual_points = cells * 2 - Kagome (3 basis points):
actual_points = cells * 3
You can right click (or long-touch) to copy rows as python code.
| angle (deg) | angle (rad) | ll1 | ll2 | ul1 | ul2 | cells |
|---|