abacusmodeling / abacus-develop

An electronic structure package based on either plane wave basis or numerical atomic orbitals.
GNU Lesser General Public License v3.0
156 stars 160 forks source link

Mismatch in orbital order between hamiltonian and the Orbital file #267

Closed zhang-changwei closed 1 year ago

zhang-changwei commented 1 year ago

Describe the bug

The orbital order of hamiltonian in data-sparse_SPIN0.csr arranges like:

Pz, Px, Py
Dz2, Dxz, Dyz, Dx2-y2, Dxy
Fz3, Fxz2, Fyz2, Fz(x2-y2), Fxyz, Fx(x2-3y2), Fy(3x2-y2)

While the order in Orbital file would be like:

Px, Py, Pz
D3z2-r2, Dxy, Dxz, Dx2-y2, Dyz, Dyz
F5z2-3r2, F5xz2-xr2, F5yz2-yr2, Fzx2-zy2, Fxyz, Fx3-3xy2, F3yx2-y3

Expected behavior

The orbital order of hamiltonian in data-HR-sparse_SPIN0.csr should be consistent with the order in the 'Orbital' file. As is proposed in the ISSUE#163, it would be better if abacus output Orbital file with only out_mat_hs2 flag on.

To Reproduce

Set these flags in INPUT. out_dos 1 out_mat_hs2 1

Environment

No response

Additional Context

I believe it is unnecessary to reorder the atomic orbitals when outputing mullin charges, etc. Just use the orders defined in the hamiltonian would be fine.

mohanchen commented 1 year ago

For further discussions, we will move to https://github.com/deepmodeling/abacus-develop