mirror of
https://github.com/triqs/dft_tools
synced 2025-01-05 10:59:34 +01:00
fixed tests to work with dev version of triqs
This commit is contained in:
parent
9b22859553
commit
342aa363d9
@ -3,7 +3,7 @@ from triqs.utility.h5diff import h5diff, compare, failures
|
|||||||
from triqs.gf import *
|
from triqs.gf import *
|
||||||
from triqs.utility.comparison_tests import assert_block_gfs_are_close
|
from triqs.utility.comparison_tests import assert_block_gfs_are_close
|
||||||
from scipy.linalg import expm
|
from scipy.linalg import expm
|
||||||
from triqs_dft_tools.block_structure import BlockStructure
|
from triqs_dft_tools.block_structure import BlockStructure, gf_struct_flatten
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
|
||||||
@ -176,7 +176,9 @@ cmp(m2,
|
|||||||
full = BlockStructure.full_structure(
|
full = BlockStructure.full_structure(
|
||||||
[{'up_0': [0, 1], 'up_1': [0], 'down_1': [0], 'down_0': [0, 1]}], None)
|
[{'up_0': [0, 1], 'up_1': [0], 'down_1': [0], 'down_0': [0, 1]}], None)
|
||||||
|
|
||||||
G_sumk = BlockGf(mesh=G1.mesh, gf_struct=original_bs.gf_struct_sumk[0])
|
print(original_bs.gf_struct_sumk[0])
|
||||||
|
print(gf_struct_flatten(original_bs.gf_struct_sumk[0]))
|
||||||
|
G_sumk = BlockGf(mesh=G1.mesh, gf_struct=gf_struct_flatten(original_bs.gf_struct_sumk[0]))
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
G_sumk['up'][i, i] << SemiCircular(1 if i < 2 else 2)
|
G_sumk['up'][i, i] << SemiCircular(1 if i < 2 else 2)
|
||||||
G_sumk['down'][i, i] << SemiCircular(4 if i < 2 else 3)
|
G_sumk['down'][i, i] << SemiCircular(4 if i < 2 else 3)
|
||||||
|
@ -36,12 +36,11 @@ SK=SumkDFT(hdf_file='SrVO3.ref.h5',use_dft_blocks=True)
|
|||||||
num_orbitals = SK.corr_shells[0]['dim']
|
num_orbitals = SK.corr_shells[0]['dim']
|
||||||
l = SK.corr_shells[0]['l']
|
l = SK.corr_shells[0]['l']
|
||||||
spin_names = ['down','up']
|
spin_names = ['down','up']
|
||||||
orb_names = ['%s'%i for i in range(num_orbitals)]
|
|
||||||
orb_hybridized = False
|
orb_hybridized = False
|
||||||
|
|
||||||
gf_struct = set_operator_structure(spin_names,orb_names,orb_hybridized)
|
gf_struct = set_operator_structure(spin_names,num_orbitals,orb_hybridized)
|
||||||
glist = [ GfImFreq(indices=inner,beta=beta) for block,inner in gf_struct]
|
glist = [ GfImFreq(target_shape=(bl_size,bl_size),beta=beta) for bl, bl_size in gf_struct]
|
||||||
Sigma_iw = BlockGf(name_list = [block for block,inner in gf_struct], block_list = glist, make_copies = False)
|
Sigma_iw = BlockGf(name_list = [bl for bl, bl_size in gf_struct], block_list = glist, make_copies = False)
|
||||||
|
|
||||||
SK.set_Sigma([Sigma_iw])
|
SK.set_Sigma([Sigma_iw])
|
||||||
Gloc = SK.extract_G_loc()
|
Gloc = SK.extract_G_loc()
|
||||||
|
Loading…
Reference in New Issue
Block a user