Re: Hamiltonian matrix file ( No.1 ) 
 Date: 2019/03/03 12:25
 Name: PoHao <chang.pohao@gmail.com>
 Hi Maedeh,
I assume you are using the interface for developers. If your system is collinear or unpolarized. To get some idea, you can replace in the code
printf("glbal index=%i local index=%i (grobal=%i, Rn=%i)\n", ct_AN,h_AN,Gh_AN,Rn); */ with
printf("%i %i %i %i %i %i %i \n ", ct_AN, Gh_AN,atv_ijk[Rn][1],atv_ijk[Rn][2],atv_ijk[Rn][3],TNO1,TNO2);
and adjust for your own convenience.
The series of number printed out then, for example 2 5 1 1 2 4 9, will correspond to a matrix block between the 2nd element and "the 5th element in [1 1 2] cell" and there are 4 orbitals for the 2nd element and 9 orbitals for the 5th element so the block will be a 4 x 9 matrix.
the function I added in addition to the original statement atv_ijk[Rn][1],atv_ijk[Rn][2],atv_ijk[Rn][3] converts Rn to [n m l]
The idea is that each block corresponds to the hopping term between i and jsite. The first number corresponds to isite run from 1 to whatever number of atoms you have in your unitcell. However the 2nd number corresponds to jsite have to cover all the sites, including neighboring unitcell, that have overlap with all the sites in your [0 0 0]. Therefore, how many jsites you have depends on the radius cutoff you have in your atom species specification (ex. C6.0s2p2 ).
In the case of spin
If it's collinear then spin=0 and =1 correspond to upup and downdown.
In case of noncollinear, if I remember correctly, spin=3 and spin=4 correspond to Re updown and Im updown. (This part you should double check)
As Hamiltonain is Hermitian, it doesn't make sense to store updown and downup.

Re: Hamiltonian matrix file ( No.2 ) 
 Date: 2019/03/05 20:15
 Name: Maedeh
 Dear PoHao
Hi
Thank you very much for your explanation and helpful information. It is much more clear now. I will work out a couple of examples to see if I fully understand the labels.
Best regards Maedeh

