mirror of
https://github.com/triqs/dft_tools
synced 2024-11-18 12:03:50 +01:00
unit test for the Fermi energy in the wannier90 converter
This commit is contained in:
parent
aa8c631c27
commit
37e0cb83d4
8
test/LaVO3-Pnma_ef.inp
Normal file
8
test/LaVO3-Pnma_ef.inp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
0 3 2 3
|
||||||
|
8.0
|
||||||
|
4
|
||||||
|
0 0 2 3 0 0
|
||||||
|
1 0 2 3 0 0
|
||||||
|
2 0 2 3 0 0
|
||||||
|
3 0 2 3 0 0
|
||||||
|
10.3
|
3893
test/LaVO3-Pnma_ef_hr.dat
Normal file
3893
test/LaVO3-Pnma_ef_hr.dat
Normal file
File diff suppressed because it is too large
Load Diff
25
test/test_w90_ef.py
Normal file
25
test/test_w90_ef.py
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import unittest
|
||||||
|
import numpy as np
|
||||||
|
import sys
|
||||||
|
sys.path.insert(1, '../python/converters/')
|
||||||
|
from wannier90_converter import Wannier90Converter
|
||||||
|
from triqs_dft_tools import SumkDFT
|
||||||
|
|
||||||
|
class test_w90_conv(unittest.TestCase):
|
||||||
|
|
||||||
|
def test_hopping(self):
|
||||||
|
|
||||||
|
conv1 = Wannier90Converter(seedname='LaVO3-Pnma')
|
||||||
|
conv1.convert_dft_input()
|
||||||
|
SK1 = SumkDFT(hdf_file='LaVO3-Pnma.h5')
|
||||||
|
|
||||||
|
conv2 = Wannier90Converter(seedname='LaVO3-Pnma_ef')
|
||||||
|
conv2.convert_dft_input()
|
||||||
|
SK2 = SumkDFT(hdf_file='LaVO3-Pnma_ef.h5')
|
||||||
|
|
||||||
|
for ik in range(SK1.n_k):
|
||||||
|
self.assertTrue(np.all(SK1.hopping[ik,0] - conv2.fermi_energy*np.identity(SK1.n_orbitals[ik][0]) - SK2.hopping[ik,0] < 1e-12))
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user