3
0
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:
Olivier Parcollet 2017-04-05 20:58:01 +02:00
parent d25bd40560
commit d7d720141e
11 changed files with 17 additions and 17 deletions

View File

@ -1,6 +1,6 @@
# Version number of the application
set (DFT_TOOLS_VERSION "1.4")
set (DFT_TOOLS_RELEASE "1.4.0")
set (DFT_TOOLS_VERSION "1.5")
set (DFT_TOOLS_RELEASE "1.5.0")
# Append triqs installed files to the cmake load path
list(APPEND CMAKE_MODULE_PATH ${TRIQS_PATH}/share/triqs/cmake)

View File

@ -1,6 +1,6 @@
import copy
import numpy as np
from pytriqs.gf.local import GfImFreq, BlockGf
from pytriqs.gf import GfImFreq, BlockGf
from ast import literal_eval
from warnings import warn

View File

@ -23,7 +23,7 @@
from types import *
#from pytriqs.applications.dft.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
import pytriqs.utility.mpi as mpi
from itertools import izip

View File

@ -1,6 +1,6 @@
import numpy as np
from pytriqs.gf.local import *
from pytriqs.gf import *
#from sumk_dft import SumkDFT
from sumk_dft_tools import SumkDFTTools
from converters.vasp_converter import VaspConverter

View File

@ -23,7 +23,7 @@
from types import *
import numpy
import pytriqs.utility.dichotomy as dichotomy
from pytriqs.gf.local import *
from pytriqs.gf import *
import pytriqs.utility.mpi as mpi
from pytriqs.archive 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!"
# 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:
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 icrsh in range(self.n_corr_shells)]
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:
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)

View File

@ -21,7 +21,7 @@
import sys
from types import *
import numpy
from pytriqs.gf.local import *
from pytriqs.gf import *
import pytriqs.utility.mpi as mpi
from symmetry import *
from sumk_dft import SumkDFT
@ -767,8 +767,8 @@ class SumkDFTTools(SumkDFT):
self.Sigma_imp_w[icrsh] = BlockGf(
name_list=spn, block_list=glist(), make_copies=False)
for i, g in self.Sigma_imp_w[icrsh]:
for iL in g.indices:
for iR in g.indices:
for iL in g.indices[0]:
for iR in g.indices[0]:
for iom in xrange(n_om):
g.data[iom, int(iL), int(iR)] = Sigma_save[
i].data[ioffset + iom, int(iL), int(iR)]

View File

@ -23,7 +23,7 @@
import copy
import numpy
from types import *
from pytriqs.gf.local import *
from pytriqs.gf import *
from pytriqs.archive import *
import pytriqs.utility.mpi as mpi

View File

@ -1,6 +1,6 @@
from pytriqs.applications.dft.sumk_dft import *
from pytriqs.applications.dft.converters import Wien2kConverter
from pytriqs.gf.local import *
from pytriqs.gf import *
from pytriqs.archive import *
import pytriqs.utility.mpi as mpi
import numpy

View File

@ -1,6 +1,6 @@
from pytriqs.applications.dft.sumk_dft import *
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.applications.dft import BlockStructure

View File

@ -20,8 +20,8 @@
################################################################################
from pytriqs.archive import *
from pytriqs.gf.local import *
from pytriqs.gf.local.tools import *
from pytriqs.gf import *
from pytriqs.gf.tools import *
from pytriqs.applications.dft.sumk_dft_tools import *
from pytriqs.utility.comparison_tests import *
import numpy as np

View File

@ -20,7 +20,7 @@
################################################################################
from pytriqs.archive import *
from pytriqs.gf.local import *
from pytriqs.gf import *
from pytriqs.applications.dft.sumk_dft import *
from pytriqs.applications.dft.converters.wien2k_converter import *
from pytriqs.operators.util import set_operator_structure