Skip to content

Commit d6e73eb

Browse files
committed
feat: add orbital mapping constants for ABACUS, DeePTB, and OPENMX
Add orbital number mappings and transformation matrices for ABACUS, DeePTB, and OPENMX DFT codes. These constants define the magnetic quantum number ordering and provide conversion matrices between different code conventions, enabling proper orbital basis transformations.
1 parent 75c66b5 commit d6e73eb

1 file changed

Lines changed: 33 additions & 1 deletion

File tree

dftio/constants.py

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,24 @@
1212
norb_dict = {'s':1,'e':2,'p':3,'q':4,'d':5,'j':6,'f':7,'o':8,'g':9,'h':11, "i":15, "k":21, "l": 25, "m": 35}
1313
norb_dict_r = {1:'s', 2:'e', 3:'p', 4:'q', 5:'d', 6:'j', 7:'f', 8:'o', 9:'g', 11:'h', 15:"i", 21:"k", 25:"l", 35:"m"}
1414

15+
ABACUS_orbital_number_m = {
16+
"s": [0],
17+
"p": [0, 1, -1],
18+
"d": [0, 1, -1, 2, -2],
19+
"f": [0, 1, -1, 2, -2, 3, -3],
20+
"g": [0, 1, -1, 2, -2, 3, -3, 4, -4],
21+
"h": [0, 1, -1, 2, -2, 3, -3, 4, -4, 5, -5]
22+
}
23+
24+
DeePTB_orbital_number_m = {
25+
"s": [0],
26+
"p": [-1, 0, 1],
27+
"d": [-2, -1, 0, 1, 2],
28+
"f": [-3, -2, -1, 0, 1, 2, 3],
29+
"g": [-4, -3, -2, -1, 0, 1, 2, 3, 4],
30+
"h": [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]
31+
}
32+
1533
ABACUS2DFTIO = {
1634
0: np.eye(1, dtype=np.float32),
1735
1: np.eye(3, dtype=np.float32)[[2, 0, 1]],
@@ -57,4 +75,18 @@
5775
SIESTA2DFTIO[2][[1, 3]] *= -1
5876
SIESTA2DFTIO[3][[0, 6, 2, 4]] *= -1
5977
SIESTA2DFTIO[4][[1, 7, 3, 5]] *= -1
60-
SIESTA2DFTIO[5][[0, 10, 8, 2, 6, 4]] *= -1
78+
SIESTA2DFTIO[5][[0, 10, 8, 2, 6, 4]] *= -1
79+
80+
OPENMX_orbital_number_m = {
81+
"s": [0],
82+
"p": [1, -1, 0],
83+
"d": [0, 2, -2, 1, -1],
84+
"f": [0, 1, -1, 2, -2, 3, -3]
85+
}
86+
87+
OPENMX2DeePTB = {
88+
0: np.eye(1, dtype=np.float32),
89+
1: np.eye(3, dtype=np.float32)[[1, 2, 0]],
90+
2: np.eye(5, dtype=np.float32)[[2, 4, 0, 3, 1]],
91+
3: np.eye(7, dtype=np.float32)[[6, 4, 2, 0, 1, 3, 5]]
92+
}

0 commit comments

Comments
 (0)