mirror of
https://github.com/triqs/dft_tools
synced 2024-12-21 11:53:41 +01:00
Changes to tests
This commit is contained in:
parent
8e08a58a81
commit
2ff1905ce0
@ -1,7 +1,7 @@
|
||||
# load triqs helper to set up tests
|
||||
find_package(TriqsTest)
|
||||
|
||||
FILE(COPY SrVO3.h5 SrVO3.ctqmcout SrVO3.symqmc SrVO3.sympar SrVO3.parproj hamiltonian.hk DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
FILE(COPY SrVO3.h5 SrVO3.ctqmcout SrVO3.symqmc SrVO3.sympar SrVO3.parproj hk_convert_hamiltonian.hk DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
triqs_add_test_hdf(wien2k_convert " -p 1.e-6" )
|
||||
triqs_add_test_hdf(hk_convert " -p 1.e-6" )
|
||||
triqs_add_test_hdf(sumklda_basic " -d 1.e-6" )
|
||||
|
BIN
test/SrVO3.h5
BIN
test/SrVO3.h5
Binary file not shown.
Binary file not shown.
@ -1,4 +1,3 @@
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# TRIQS: a Toolbox for Research in Interacting Quantum Systems
|
||||
@ -22,29 +21,16 @@
|
||||
|
||||
from pytriqs.archive import *
|
||||
import numpy
|
||||
from pytriqs.applications.dft.U_matrix import Umatrix
|
||||
from pytriqs.applications.dft.U_matrix import *
|
||||
|
||||
U = Umatrix(U_interact = 2.0, J_hund = 0.5, l=2)
|
||||
|
||||
T = numpy.zeros([5,5],numpy.complex_)
|
||||
sqtwo = 1.0/numpy.sqrt(2.0)
|
||||
T[0,0] = 1j*sqtwo
|
||||
T[0,4] = -1j*sqtwo
|
||||
T[1,1] = -1j*sqtwo
|
||||
T[1,3] = -1j*sqtwo
|
||||
T[2,2] = 1.0
|
||||
T[3,1] = -sqtwo
|
||||
T[3,3] = sqtwo
|
||||
T[4,0] = sqtwo
|
||||
T[4,4] = sqtwo
|
||||
|
||||
U(T=T)
|
||||
|
||||
U.reduce_matrix()
|
||||
U_sph = U_matrix(l=2, U_int=2.0, J_hund=0.5)
|
||||
U_cubic = transform_U_matrix(U_sph,spherical_to_cubic(l=2))
|
||||
U,Up = reduce_4index_to_2index(U_cubic)
|
||||
|
||||
ar = HDFArchive('U_mat.output.h5')
|
||||
ar['U'] = U.U
|
||||
ar['Up'] = U.Up
|
||||
ar['Ufull'] = U.Ufull
|
||||
del ar
|
||||
ar['Ufull_sph'] = U_sph
|
||||
ar['Ufull_cubic'] = U_cubic
|
||||
ar['U'] = U
|
||||
ar['Up'] = Up
|
||||
|
||||
del ar
|
||||
|
Binary file not shown.
@ -24,6 +24,6 @@
|
||||
from pytriqs.applications.dft.converters import *
|
||||
from pytriqs.archive import *
|
||||
|
||||
Converter = HkConverter(hk_file='hamiltonian.hk',hdf_file='hk_convert.output.h5')
|
||||
Converter = HkConverter(hk_file='hk_convert_hamiltonian.hk',hdf_file='hk_convert.output.h5')
|
||||
|
||||
Converter.convert_dmft_input()
|
||||
|
Binary file not shown.
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# TRIQS: a Toolbox for Research in Interacting Quantum Systems
|
||||
@ -24,36 +22,31 @@
|
||||
from pytriqs.archive import *
|
||||
from pytriqs.applications.dft.sumk_lda import *
|
||||
from pytriqs.applications.dft.converters.wien2k_converter import *
|
||||
from pytriqs.applications.dft.solver_multiband import *
|
||||
from pytriqs.applications.dft.U_matrix import *
|
||||
from pytriqs.applications.impurity_solvers.cthyb import *
|
||||
|
||||
#=====================================================
|
||||
#Basic input parameters:
|
||||
LDAFilename = 'SrVO3'
|
||||
# Basic input parameters
|
||||
U = 4.0
|
||||
J = 0.6
|
||||
Beta = 40
|
||||
DC_type = 1 # DC type: 0 FLL, 1 Held, 2 AMF
|
||||
useBlocs = True # use bloc structure from LDA input
|
||||
useMatrix = False # True: Slater parameters, False: Kanamori parameters U+2J, U, U-J
|
||||
use_spinflip = False # use the full rotational invariant interaction?
|
||||
#=====================================================
|
||||
|
||||
#U=U-2*J
|
||||
|
||||
HDFfilename = LDAFilename+'.h5'
|
||||
beta = 40
|
||||
|
||||
# Init the SumK class
|
||||
SK=SumkLDA(hdf_file='SrVO3.h5',use_lda_blocks=True)
|
||||
|
||||
|
||||
Norb = SK.corr_shells[0][3]
|
||||
num_orbitals = SK.corr_shells[0][3]
|
||||
l = SK.corr_shells[0][2]
|
||||
spin_names = ["up","down"]
|
||||
orb_names = ["%s"%i for i in range(num_orbitals)]
|
||||
orb_hybridized = False
|
||||
|
||||
# Construct U matrix for density-density calculations
|
||||
Umat, Upmat = U_matrix_kanamori(n_orb=num_orbitals, U_int=U, J_hund=J)
|
||||
|
||||
from pytriqs.applications.dft.solver_multiband import *
|
||||
L = LocalProblem(spin_names, orb_names, orb_hybridized, h_loc_type="density", U=Umat, Uprime=Upmat, H_dump="srvo3_Gloc_H.txt" )
|
||||
S = Solver(beta=beta, gf_struct=L.gf_struct)
|
||||
|
||||
S=SolverMultiBand(beta=Beta,n_orb=Norb,gf_struct=SK.gf_struct_solver[0],map=SK.map[0])
|
||||
|
||||
SK.put_Sigma([S.Sigma])
|
||||
SK.put_Sigma([S.Sigma_iw])
|
||||
Gloc=SK.extract_G_loc()
|
||||
|
||||
ar = HDFArchive('srvo3_Gloc.output.h5','w')
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user