Tight-binding Hamiltonian file format

See template, template2.

This file should be readable by ReadRecord command, so the file structure is as follows (ordering of entries and empty lines are ignored):

# comment lines

SG=P21/c symmetry group recognized by SymmetryGroup command

orbs=[[1,3],[2,4]] optionally orbits of all sites (can be regenerated)

M=Matrix(3,3,[ matrix of translation vectors as columns
 a,0,cx,
 0,b,0,
 0,0,c])

P=Matrix(3,ns,[ matrix of ns site positions in lattice coordinates as columns
 2/3,1/3,x3,...
 1/3,2/3,y3,...
 0,0,z3,...])

geoparams=[ table of geometrical parameter sets, missing parameters are considered as zero
"cryst-b_PBE-D3paw600" ==[ a=7.708771, b=20.410479, cx=+0.743021, c=25.106085, x=0.735272, y=-0.497682, z=-0.018511],
"cryst-bx_PBE-D3paw600"==[ a=8.565262, b=20.081321, cx=-0.490141, c=25.555564, x=0.709776, y=-0.490029, z=-0.024840],
...
NULL]

params=[ table of Hamiltonian parameter sets, missing parameters are considered as zero
 # optional description
"identifier" ==[ E0=-3.778, e1=-1.111, e2=2.222, t1=-2.887, t2=0.218, t3=-0.239, t3b=0.004, t4=0.046, t4b=-0.015, t5=0.001, t5c=-0.029, t5b=0.004],
 # optional description 2
id2          ==list(equation), E0 is optional onsite energy offset
...
NULL]

H=[ translationally unique matrix elements of the Hamiltonian (preferably fully unfolded by symmetry)
(s0, s, t1, t2, t3)==H8, s0 is site index in the unit cell,
( 1, 2, -1, -2, 0 )==H3, [s,t1,t2,t3] denotes second site to which the matrix element is assigned,
( 1, 1, -3, -2, 0 )==H6, and t1,t2,t3 are integers encoding that site s is translated to other cell
( 1, 2,  0,  0, 0 )==t12,
( 1, 2,  1, -1, 0 )==t12aj,
( 1, 2,  2, -1, 0 )==t12aaj,
( 2, 1, -2,  1, 0 )==t12aaj,
( 2, 1, -1,  1, 0 )==t12aj,
( 2, 1,  0,  0, 0 )==t12,
...
NULL]