TRIQS / triqs_0.x

DEPRECATED -- This is the repository of the older versions of TRIQS
Other
11 stars 9 forks source link

Greens functions n CTQMC solver #112

Closed aichhorn closed 11 years ago

aichhorn commented 11 years ago

When constructing a CTQMC solver as in the test script single_site_bethe.py, one gets the following behavior of the the GF's:

S: pytriqs.solvers.ctqmc_hyb.ctqmc_solver.Solver object at 0x190b450 S.Sigma: Green Function Sigma composed of 2 blocks : pytriqs.base.gf.local.gf_imfreq.GfImFreq object at 0x1bb9200 pytriqs.base.gf.local.gf_imfreq.GfImFreq object at 0x1bbda40

S.Sigma['up']: pytriqs.base.gf.local.gf_imfreq.GfImFreq object at 0x1bb9200

This is NOT what should be the output for a Greens function as described in the documentation. What is the problem here? If I take the example from the doc:

from pytriqs.base.gf_local import * g1 = GfImFreq(indices = ['eg1','eg2'], beta = 50, n_matsubara = 1000, name = "egBlock") g2 = GfImFreq(indices = ['t2g1','t2g2','t2g3'], beta = 50, n_matsubara = 1000, name = "t2gBlock") G = BlockGf(name_list = ('eg','t2g'), block_list = (g1,g2), make_copies = False)

then the output is: G: Green Function G composed of 2 blocks at inverse temperature beta = 50.0: G_eg G_t2g

So where is the difference?

Another issue: G.beta gives back 50 as it should be, S.Sigma.beta crashes: Traceback (most recent call last): File "", line 1, in File "/afs/itp.tugraz.at/user/aichhorn/scratch_00/Compilation/TRIQS/pytriqs/base/gf/local/block_gf.py", line 140, in beta return self._first().beta AttributeError: 'GfImFreq' object has no attribute 'beta'

mferrero commented 11 years ago

OK, the behavior of the repr is as before. Concerning the beta, I have to think. Right now, for a GfImFreq g, you can have it through the mesh

g.mesh.beta

I have to see if we want to keep g.beta too.