mirror of
https://github.com/triqs/dft_tools
synced 2024-12-21 11:53:41 +01:00
Port to new Python interface for Gf
- Minor changes - tests are ok
This commit is contained in:
parent
d25bd40560
commit
d7d720141e
@ -1,6 +1,6 @@
|
|||||||
# Version number of the application
|
# Version number of the application
|
||||||
set (DFT_TOOLS_VERSION "1.4")
|
set (DFT_TOOLS_VERSION "1.5")
|
||||||
set (DFT_TOOLS_RELEASE "1.4.0")
|
set (DFT_TOOLS_RELEASE "1.5.0")
|
||||||
|
|
||||||
# Append triqs installed files to the cmake load path
|
# Append triqs installed files to the cmake load path
|
||||||
list(APPEND CMAKE_MODULE_PATH ${TRIQS_PATH}/share/triqs/cmake)
|
list(APPEND CMAKE_MODULE_PATH ${TRIQS_PATH}/share/triqs/cmake)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import copy
|
import copy
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from pytriqs.gf.local import GfImFreq, BlockGf
|
from pytriqs.gf import GfImFreq, BlockGf
|
||||||
from ast import literal_eval
|
from ast import literal_eval
|
||||||
from warnings import warn
|
from warnings import warn
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
from types import *
|
from types import *
|
||||||
#from pytriqs.applications.dft.U_matrix import *
|
#from pytriqs.applications.dft.U_matrix import *
|
||||||
from U_matrix import *
|
from U_matrix import *
|
||||||
from pytriqs.gf.local import *
|
from pytriqs.gf import *
|
||||||
#from hubbard_I import gf_hi_fullu, sigma_atomic_fullu
|
#from hubbard_I import gf_hi_fullu, sigma_atomic_fullu
|
||||||
import pytriqs.utility.mpi as mpi
|
import pytriqs.utility.mpi as mpi
|
||||||
from itertools import izip
|
from itertools import izip
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from pytriqs.gf.local import *
|
from pytriqs.gf import *
|
||||||
#from sumk_dft import SumkDFT
|
#from sumk_dft import SumkDFT
|
||||||
from sumk_dft_tools import SumkDFTTools
|
from sumk_dft_tools import SumkDFTTools
|
||||||
from converters.vasp_converter import VaspConverter
|
from converters.vasp_converter import VaspConverter
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
from types import *
|
from types import *
|
||||||
import numpy
|
import numpy
|
||||||
import pytriqs.utility.dichotomy as dichotomy
|
import pytriqs.utility.dichotomy as dichotomy
|
||||||
from pytriqs.gf.local import *
|
from pytriqs.gf import *
|
||||||
import pytriqs.utility.mpi as mpi
|
import pytriqs.utility.mpi as mpi
|
||||||
from pytriqs.archive import *
|
from pytriqs.archive import *
|
||||||
from symmetry import *
|
from symmetry import *
|
||||||
@ -593,13 +593,13 @@ class SumkDFT(object):
|
|||||||
Sigma_imp) == self.n_inequiv_shells, "put_Sigma: give exactly one Sigma for each inequivalent corr. shell!"
|
Sigma_imp) == self.n_inequiv_shells, "put_Sigma: give exactly one Sigma for each inequivalent corr. shell!"
|
||||||
|
|
||||||
# init self.Sigma_imp_(i)w:
|
# init self.Sigma_imp_(i)w:
|
||||||
if all(type(gf) == GfImFreq for bname, gf in Sigma_imp[0]):
|
if all( (isinstance(gf, Gf) and isinstance (gf.mesh, MeshImFreq)) for bname, gf in Sigma_imp[0]):
|
||||||
# Imaginary frequency Sigma:
|
# Imaginary frequency Sigma:
|
||||||
self.Sigma_imp_iw = [BlockGf(name_block_generator=[(block, GfImFreq(indices=inner, mesh=Sigma_imp[0].mesh))
|
self.Sigma_imp_iw = [BlockGf(name_block_generator=[(block, GfImFreq(indices=inner, mesh=Sigma_imp[0].mesh))
|
||||||
for block, inner in self.gf_struct_sumk[icrsh]], make_copies=False)
|
for block, inner in self.gf_struct_sumk[icrsh]], make_copies=False)
|
||||||
for icrsh in range(self.n_corr_shells)]
|
for icrsh in range(self.n_corr_shells)]
|
||||||
SK_Sigma_imp = self.Sigma_imp_iw
|
SK_Sigma_imp = self.Sigma_imp_iw
|
||||||
elif all(type(gf) == GfReFreq for bname, gf in Sigma_imp[0]):
|
elif all( isinstance(gf, Gf) and isinstance (gf.mesh, MeshReFreq) for bname, gf in Sigma_imp[0]):
|
||||||
# Real frequency Sigma:
|
# Real frequency Sigma:
|
||||||
self.Sigma_imp_w = [BlockGf(name_block_generator=[(block, GfReFreq(indices=inner, mesh=Sigma_imp[0].mesh))
|
self.Sigma_imp_w = [BlockGf(name_block_generator=[(block, GfReFreq(indices=inner, mesh=Sigma_imp[0].mesh))
|
||||||
for block, inner in self.gf_struct_sumk[icrsh]], make_copies=False)
|
for block, inner in self.gf_struct_sumk[icrsh]], make_copies=False)
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
import sys
|
import sys
|
||||||
from types import *
|
from types import *
|
||||||
import numpy
|
import numpy
|
||||||
from pytriqs.gf.local import *
|
from pytriqs.gf import *
|
||||||
import pytriqs.utility.mpi as mpi
|
import pytriqs.utility.mpi as mpi
|
||||||
from symmetry import *
|
from symmetry import *
|
||||||
from sumk_dft import SumkDFT
|
from sumk_dft import SumkDFT
|
||||||
@ -767,8 +767,8 @@ class SumkDFTTools(SumkDFT):
|
|||||||
self.Sigma_imp_w[icrsh] = BlockGf(
|
self.Sigma_imp_w[icrsh] = BlockGf(
|
||||||
name_list=spn, block_list=glist(), make_copies=False)
|
name_list=spn, block_list=glist(), make_copies=False)
|
||||||
for i, g in self.Sigma_imp_w[icrsh]:
|
for i, g in self.Sigma_imp_w[icrsh]:
|
||||||
for iL in g.indices:
|
for iL in g.indices[0]:
|
||||||
for iR in g.indices:
|
for iR in g.indices[0]:
|
||||||
for iom in xrange(n_om):
|
for iom in xrange(n_om):
|
||||||
g.data[iom, int(iL), int(iR)] = Sigma_save[
|
g.data[iom, int(iL), int(iR)] = Sigma_save[
|
||||||
i].data[ioffset + iom, int(iL), int(iR)]
|
i].data[ioffset + iom, int(iL), int(iR)]
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
import copy
|
import copy
|
||||||
import numpy
|
import numpy
|
||||||
from types import *
|
from types import *
|
||||||
from pytriqs.gf.local import *
|
from pytriqs.gf import *
|
||||||
from pytriqs.archive import *
|
from pytriqs.archive import *
|
||||||
import pytriqs.utility.mpi as mpi
|
import pytriqs.utility.mpi as mpi
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from pytriqs.applications.dft.sumk_dft import *
|
from pytriqs.applications.dft.sumk_dft import *
|
||||||
from pytriqs.applications.dft.converters import Wien2kConverter
|
from pytriqs.applications.dft.converters import Wien2kConverter
|
||||||
from pytriqs.gf.local import *
|
from pytriqs.gf import *
|
||||||
from pytriqs.archive import *
|
from pytriqs.archive import *
|
||||||
import pytriqs.utility.mpi as mpi
|
import pytriqs.utility.mpi as mpi
|
||||||
import numpy
|
import numpy
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from pytriqs.applications.dft.sumk_dft import *
|
from pytriqs.applications.dft.sumk_dft import *
|
||||||
from pytriqs.utility.h5diff import h5diff
|
from pytriqs.utility.h5diff import h5diff
|
||||||
from pytriqs.gf.local import *
|
from pytriqs.gf import *
|
||||||
from pytriqs.utility.comparison_tests import assert_block_gfs_are_close
|
from pytriqs.utility.comparison_tests import assert_block_gfs_are_close
|
||||||
from pytriqs.applications.dft import BlockStructure
|
from pytriqs.applications.dft import BlockStructure
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
from pytriqs.archive import *
|
from pytriqs.archive import *
|
||||||
from pytriqs.gf.local import *
|
from pytriqs.gf import *
|
||||||
from pytriqs.gf.local.tools import *
|
from pytriqs.gf.tools import *
|
||||||
from pytriqs.applications.dft.sumk_dft_tools import *
|
from pytriqs.applications.dft.sumk_dft_tools import *
|
||||||
from pytriqs.utility.comparison_tests import *
|
from pytriqs.utility.comparison_tests import *
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
from pytriqs.archive import *
|
from pytriqs.archive import *
|
||||||
from pytriqs.gf.local import *
|
from pytriqs.gf import *
|
||||||
from pytriqs.applications.dft.sumk_dft import *
|
from pytriqs.applications.dft.sumk_dft import *
|
||||||
from pytriqs.applications.dft.converters.wien2k_converter import *
|
from pytriqs.applications.dft.converters.wien2k_converter import *
|
||||||
from pytriqs.operators.util import set_operator_structure
|
from pytriqs.operators.util import set_operator_structure
|
||||||
|
Loading…
Reference in New Issue
Block a user