Tags: QcmPlab/DMFTtools
Tags
2.6.1 New Feature Included the procedure: TB_w90_transform(func) in TB_WANNIER90. This can be used to implement some specific transformation onto the real-space Hamiltonian H_ab(R=[Rx,Ry,Rz]), with a,b=1,...,NumWann. The procedure accepts a function as input. The function is defined on the user side to act on the Hamiltonian matrix. The function *func can be of two type (interfaces) +func(H,N), complex*8 H(N,N), integer N The Hamiltonian H_ab for each one R=1,...,Nrpts is passed to H(N,N) +func(H,N,Nr) complex*8 H(N,N,Nr), integer N, integer Nr The Hamiltonian H_ab(R) (all vector R) is passed to H(N,N,Nr) >NOTE: This procedure accomplish a different task from TB_reshape, whose goal is to re-order the degrees of freedom in rank-1,2 V(:),M(:,:) and rank-3 Hk(:,:,1:Nk)
2.6.0 Update * A minor update to TB_WANNIER interface to W90: Nlso --> Ntot internal variable: the total number of wannier orbitals including spin degeneracy Nspin --> rank-1, dimension(Ncomp) array: each element can have in principle a different value of Nspin. So far we impose all to have identical spin degeneracy (1,2). Other minor adjustements. * A new version of array and H(k) reshuffle or reordering has been implemented. Legacy routine: TB_reorder[_Hk] (functions) New routines: TB_reshuffle[_Hk] (subroutine) These procedures are used to reorder or reshuffle any rank-1,2 array of H(k)[N,N,Lk] to a desired ordering of the internal degrees of freedom according to what any solver requires. The new TB_reshuffle take as input the following arrays: (Hin, Nvec, IndexOut) +Hin = rank-1,2,3 array with [N],[N,N] or [N,N,Lk] +Nvec = [Nvec_1,...,Nvec_D] where D=degrees of freedom (2,3,...) and each Nvec_i=[N_i1,...,N_iM] indicating the value of the i-th degree of freedom for all the M-elements. E.g. D=3, M=2, two elements in the unit cell, 3 degrees of freedom (most common case) with Nvec_1=Nspins=[2,2] Nvec_2=Norbs=[3,2] Nvec_3=Nlats=[1,2] You have 2 elements (M=2) in the unit cell. The first has 1 inequivalent site, each carrying 3 orbitals with 2 spins. The second has 2 sites, each carrying 3 orbitals with 2 spins. Total count: Ntot=2*3*1 + 2*2*2 = 6+8 = sum(Nspins*Norbs*Nlats) = 14 +IndexOut = pi[1,...,D] a permutation of the D degrees of freedom that the user wants for the array on output. >We always assume that elements are the least degree of freedom< Suppose now that we have a vector V(1:Ntot) orded such that spins loop first, then orbitals, then sites Nspins,Norbs,Nlats (The two elements have orbitals d and p so we have): [d1up, d1dw, d2up,d2dw, d3up,d3dw] [p1up,p1dw,p2up,p2dw]_1 [p1up,p1dw,p2up,p2dw]_2 we want to reorder this vector so that orbitals loop first, then spins finally sites: Norbs,Nspins,Nlats If the original order [Nspins,Norbs,Nlat]==[1,2,3] the new order corresponds to a permutation [2,1,3]=IndexOut So we call call TB_reshuffle(Vec,[Nspins,Norbs,Nlats],[2,1,3]) and we obtain [d1up,d2up,d3up, d1dw,d2dw,d3dw][p1up,p2up,p1dw,p2dw][p1up,p2up,p1dw,p2dw] This procedure are more general and easier to use with respect to the legacy code.
2.5.0 MINOR VERSION, PARTIAL BREAK of BACK COMPATIBILITY. This version feature a completely updated and extended DMFT_GF DMFT_WEISS_FIELD DMFT_GFIO modules. Legacy software for DMFT_GF and DMFT_WEISS_FIELD are mantained for a grace period of time (more on this later). BACK COMPATIBILITY is anyway partially broken from the update of DMFT_GFIO. It is a small update but will raise an error upon compiling. All drivers will need to replace as follows: OLD> call dmft_print_gf_matsubara(Gmats,"Gloc",iprint=print_mode) NEW> call dmft_write_gf(Gmats,"Gloc",axis='mats',iprint=print_mode) specifying the axis in the input or passing the frequency array before this call (using the same procedure!). Read below. *DMFT_GFIO: Include method: dmft_write_gf which wraps writing procedures with input: (Func[..],str fname,chr axis='mats','real',iprint=1..5) The procedure write to file arrays of rank-2 to rank-6 with the usual shapes: rank-2 = [N,N][L] rank-4 = [Nspin,Nspin,Norb,Norb][L] (DMFT) rank-5 = [Nlat,Nspin,Nspin,Norb,Norb][L] (R-DMFT) rank-6 = [Nlat,Nlat,Nspin,Nspin,Norb,Norb][L] (CDMFT) axis is used to pick the correct frequency range. The same method wraps a procedure to *push* a user defined frequency array zeta dmft_write_gf(cmplx zeta(:)) *DMFT_GF: Include methods: (dmft_)get_gloc (dmft_)get_gk which wrap several procedures covering all the cases available in the old version. main: has input (Hk[N,N,Lk],Gloc[N,N,L],Sigma[N,N,L],axis='mats','real',...) tridiag:has input (Hk[N,N,Lk],Gloc[N,N,L],Sigma[N,N,L],axis=...,int Nsites,int Ncell) with N=Nsites*Ncell dos: has input (Ebands[N,Le],Dbands[N/1,Le],Hloc[N],Gloc[N,N,L],Sigma[N,N,L,axis=...) auxiliary interfaces allow to call (dmft_)get_gloc/gk with Gloc and Sigma of different shapes: rank-4 = [Nspin,Nspin,Norb,Norb][L] (DMFT) rank-5 = [Nlat,Nspin,Nspin,Norb,Norb][L] (R-DMFT) rank-6 = [Nlat,Nlat,Nspin,Nspin,Norb,Norb][L] (CDMFT) rank-7 = [Nineq,Nlat,Nlat,Nspin,Nspin,Norb,Norb][L] (R-CDMFT) The big change here is that the main procedure now accept rank-2 arrays which can be used more easily and allow to solve more general cases, e.g. p-d problems or multi-element unit cells where N=sum(Nlats*Norbs)*Nspin for instance. The (dmft_)get_(gloc/gk) procedures are extended to cover the superconductive case. The input variables then requires to have an extra rank with dimension 2, e.g. Gloc[2,N,N,L], Hk[2,N,N,Lk], to include normal and anomalous components. The input axis is used to pick the correct frequency range. The same method wraps a procedure to *push* a user defined frequency array zeta (dmft_)get_(gloc/gk)(cmplx zeta(:)) Example: !OLD VERSION allocate(Gmats(Nspin,Nspin,Norb,Norb,L)) allocate(Greal(Nspin,Nspin,Norb,Norb,L)) call dmft_gloc_matsubara(Hk,Gmats,zeros(Nspin,Nspin,Norb,Norb,L)) call dmft_gloc_realaxis(Hk,Greal,zeros(Nspin,Nspin,Norb,Norb,L)) call dmft_write_gf(Gmats,"Gmats",axis="mats") call dmft_write_gf(Greal,"Greal",axis="real") !NEW VERSION allocate(Giw(Nso,Nso,L)) allocate(Gwr(Nso,Nso,L)) call dmft_get_gloc(Hk,Giw,zeros(Nso,Nso,L),axis="mats") call dmft_get_gloc(Hk,Gwr,zeros(Nso,Nso,L),axis="real") call dmft_write_gf(Giw,"Giw",axis="mats") call dmft_write_gf(Gwr,"Gwr",axis="real") Note also the this updated introduced several simplifications in the code structure, limiting the number of independent procedures to 5 (normal_main,dos,tridiag; superc_main,dos), limiting the number of calls to reshape which are performed before and after execution. * DMFT_WEISS_FIELD include methods: dmft_self_consistency: interface both the following two dmft_weiss: get Weiss field dmft_delta: get Delta function The levacy versions carry a prefix *legacy_ to distinguish from these new ones. The module has a number of 4 independent procedures: dmft_get_{weiss,delta}_{normal,superc}_main dmft_get_weiss_normal_main: has input (Gloc[N,N,L],Sigma[N,N,L],Weiss[N,N,L],[optional Nsites]) dmft_get_weiss_superc_main: has input (Gloc[N,N,L],Floc[N,N,L],Sigma[N,N,L],Self[N,N,L],Weiss[N,N,L],Theta[N,N,L],[optional Nsites]) dmft_get_delta_normal_main: has input (Gloc[N,N,L],Sigma[N,N,L],Delta[N,N,L],Hloc[N,N],[optional Nsites]) dmft_get_delta_superc_main: has input (Gloc[N,N,L],Floc[N,N,L],Sigma[N,N,L],Self[N,N,L],Delta[N,N,L],Theta[N,N,L],Hloc[N,N],[optional Nsites]) Note that the absence of Hloc in weiss procedures allow to distinguish those from delta procedures. Thus we do not need to pass the cg_scheme input variable anymore. Including Hloc will select delta ones otherwise the Weiss is returned. Using specific procedures is an alternative way to deal with this. Interface for arrays with rank-4 to rank-7 are provided and interfaced in the same procedures. The update of this part of the code introduced a huge simplification and rationalization of the code, including parallel execution with respect to the frequencies. Example: !Update WeissField: !Legacy call legacy_dmft_self_consistency(Gmats,Smats,Weiss,j2so(bhzHloc),cg_scheme) call dmft_write_gf(Weiss,"legacy_Weiss",axis='mats',iprint=1) !Update WeissField: call dmft_self_consistency(Gmats,Smats,Weiss) call dmft_write_gf(Weiss,"Weiss",axis='mats',iprint=1) produces no output with diff legacy_Weiss Weiss OR. !Superc case call legacy_dmft_self_consistency(& Gmats(1,:,:,:,:,:),Gmats(2,:,:,:,:,:),& Smats(1,:,:,:,:,:),Smats(2,:,:,:,:,:),& Weiss(1,:,:,:,:,:),Weiss(2,:,:,:,:,:),& Hloc,trim(cg_scheme)) call dmft_write_gf(Weiss(1,:,:,:,:,:),"legacy_Weiss",axis='mats',iprint=1) call dmft_write_gf(Weiss(2,:,:,:,:,:),"legacy_Theta",axis='mats',iprint=1) call save_array("legacy_Weiss",Weiss) call dmft_self_consistency(& Gmats(1,:,:,:,:,:),Gmats(2,:,:,:,:,:),& Smats(1,:,:,:,:,:),Smats(2,:,:,:,:,:),& Weiss(1,:,:,:,:,:),Weiss(2,:,:,:,:,:)) call dmft_write_gf(Weiss(1,:,:,:,:,:),"Weiss",axis='mats',iprint=1) call dmft_write_gf(Weiss(2,:,:,:,:,:),"Theta",axis='mats',iprint=1) call save_array("Weiss",Weiss) produces no output in diff: legacy_Weiss Weiss Probably some micro bugs are still present but this first two rounds of tests are very positive and encourage to merge this update.
PreviousNext