Commit 5d0e3d2e by Jefferson Stafusa E. Portela

Exercise 2 of part 2 (tv model) and minor changes elsewhere.

parent 426c7c3a
No preview for this file type
 ... @@ -296,7 +296,7 @@ git clone git@git.physik.uni-wuerzburg.de:ALF/ALF_Tutorial.git ... @@ -296,7 +296,7 @@ git clone git@git.physik.uni-wuerzburg.de:ALF/ALF_Tutorial.git Here we will modify the code so as to allow for different hopping matrix elements along the $x$ and $y$ directions of a square lattice. Here we will modify the code so as to allow for different hopping matrix elements along the $x$ and $y$ directions of a square lattice. \exerciseitem{Modifying the hopping} \exerciseitem{Modifying the hopping} To do so we start from the module \texttt{Hamiltonian\_Hubbard\_Plain\_Vanilla\_mod.F90} found in \texttt{/Prog/Hamiltonians/}, which we will simply call \texttt{Vanilla}'', and then: To do so we start from the module \texttt{Hamiltonian\_Hubbard\_Plain\_Vanilla\_mod.F90} found in \texttt{\$ALF\_DIR/Prog/Hamiltonians/}, which we will simply call \texttt{Vanilla}'', and then: \begin{itemize} \begin{itemize} \item Add \texttt{Ham\_Ty} to the \texttt{VAR\_Hubbard\_Plain\_Vanilla} name space in the parameter file \texttt{parameters}. \item Add \texttt{Ham\_Ty} to the \texttt{VAR\_Hubbard\_Plain\_Vanilla} name space in the parameter file \texttt{parameters}. \item Declare a new variable, \texttt{Ham\_Ty}, in the module's specification (just search for the declaration of \texttt{Ham\_T} in \texttt{Vanilla}). \item Declare a new variable, \texttt{Ham\_Ty}, in the module's specification (just search for the declaration of \texttt{Ham\_T} in \texttt{Vanilla}). ... @@ -356,6 +356,8 @@ The above form is readily included in the ALF since the interaction is written ... @@ -356,6 +356,8 @@ The above form is readily included in the ALF since the interaction is written \hat{H} = -t \sum_{i} \left( \hat{c}^{\dagger}_{i} \hat{c}^{\phantom\dagger}_{i+a} + \hat{c}^{\dagger}_{i+a} \hat{c}^{\phantom\dagger}_{i} \right) + V \sum_{i} \left( \hat{n}_{i} - 1/2 \right) \left( \hat{n}_{i+a} - 1/2 \right). \hat{H} = -t \sum_{i} \left( \hat{c}^{\dagger}_{i} \hat{c}^{\phantom\dagger}_{i+a} + \hat{c}^{\dagger}_{i+a} \hat{c}^{\phantom\dagger}_{i} \right) + V \sum_{i} \left( \hat{n}_{i} - 1/2 \right) \left( \hat{n}_{i+a} - 1/2 \right). \end{equation} \end{equation} Note that the t-V model is already implemented in ALF in the module \texttt{Hamiltonian\_tV\_mod.F90} found in \texttt{Prog/Hamiltonians/}. While it can be used for checking your own results\footnote{A short simulation of the t-V model can be conveniently run using its Jupyter notebook available in pyALF.}, you are not supposed to reproduce that implementation -- which is more general and makes use of predefined structures -- but instead to write a simpler one, based on the module \texttt{Hamiltonian\_Hubbard\_Plain\_Vanilla\_mod.F90} as detailed below. \red{[Mention more general tV implementation in pred. strutct. (for checking correctness), as well as the tV Jupyter notebook.]} \red{[Mention more general tV implementation in pred. strutct. (for checking correctness), as well as the tV Jupyter notebook.]} ... ...  ... @@ -151,7 +151,10 @@ ... @@ -151,7 +151,10 @@ Type (Lattice), private :: Latt Type (Lattice), private :: Latt Type (Unit_cell), private :: Latt_unit Type (Unit_cell), private :: Latt_unit Integer, private :: L1, L2 Integer, private :: L1, L2 real (Kind=Kind(0.d0)), private :: Ham_T , Ham_Ty , Ham_U, Ham_chem real (Kind=Kind(0.d0)), private :: Ham_T , Ham_U, Ham_chem !!!!!!! Modifications for Exercise 1a real (Kind=Kind(0.d0)), private :: Ham_Ty !!!!!!! real (Kind=Kind(0.d0)), private :: Dtau, Beta, Theta real (Kind=Kind(0.d0)), private :: Dtau, Beta, Theta Integer , private :: N_part Integer , private :: N_part Character (len=64), private :: Model, Lattice_type Character (len=64), private :: Model, Lattice_type ... @@ -187,7 +190,10 @@ ... @@ -187,7 +190,10 @@ NAMELIST /VAR_Lattice/ L1, L2, Lattice_type, Model NAMELIST /VAR_Lattice/ L1, L2, Lattice_type, Model !!!!!!! Modifications for Exercise 1a !NAMELIST /VAR_Hubbard_Plain_Vanilla/ Ham_T, ham_chem, ham_U, Dtau, Beta, Projector, Theta, Symm, N_part NAMELIST /VAR_Hubbard_Plain_Vanilla/ Ham_T, Ham_Ty, ham_chem, ham_U, Dtau, Beta, Projector, Theta, Symm, N_part NAMELIST /VAR_Hubbard_Plain_Vanilla/ Ham_T, Ham_Ty, ham_chem, ham_U, Dtau, Beta, Projector, Theta, Symm, N_part !!!!!!! ... @@ -250,7 +256,10 @@ ... @@ -250,7 +256,10 @@ CALL MPI_BCAST(Projector ,1, MPI_LOGICAL , 0,Group_Comm,ierr) CALL MPI_BCAST(Projector ,1, MPI_LOGICAL , 0,Group_Comm,ierr) CALL MPI_BCAST(Dtau ,1, MPI_REAL8 , 0,Group_Comm,ierr) CALL MPI_BCAST(Dtau ,1, MPI_REAL8 , 0,Group_Comm,ierr) CALL MPI_BCAST(Beta ,1, MPI_REAL8 , 0,Group_Comm,ierr) CALL MPI_BCAST(Beta ,1, MPI_REAL8 , 0,Group_Comm,ierr) CALL MPI_BCAST(Ham_T ,1, MPI_REAL8 , 0,Group_Comm,ierr) CALL MPI_BCAST(ham_T ,1, MPI_REAL8 , 0,Group_Comm,ierr) !!!!!!! Modifications for Exercise 1a CALL MPI_BCAST(Ham_Ty ,1, MPI_REAL8 , 0,Group_Comm,ierr) !!!!!!! CALL MPI_BCAST(ham_chem ,1, MPI_REAL8 , 0,Group_Comm,ierr) CALL MPI_BCAST(ham_chem ,1, MPI_REAL8 , 0,Group_Comm,ierr) CALL MPI_BCAST(ham_U ,1, MPI_REAL8 , 0,Group_Comm,ierr) CALL MPI_BCAST(ham_U ,1, MPI_REAL8 , 0,Group_Comm,ierr) #endif #endif ... @@ -350,10 +359,10 @@ ... @@ -350,10 +359,10 @@ If ( L2 > 1 ) then If ( L2 > 1 ) then Iy = Latt%nnlist(I,0,1) Iy = Latt%nnlist(I,0,1) !!!!!!! Modifications for Exercise 1a !!!!!!! Modifications for Exercise 1a Op_T(1,nf)%O(I, Iy) = cmplx(-Ham_T, 0.d0, kind(0.D0)) !Op_T(1,nf)%O(I, Iy) = cmplx(-Ham_T, 0.d0, kind(0.D0)) Op_T(1,nf)%O(Iy, I ) = cmplx(-Ham_T, 0.d0, kind(0.D0)) !Op_T(1,nf)%O(Iy, I ) = cmplx(-Ham_T, 0.d0, kind(0.D0)) ! Op_T(1,nf)%O(I, Iy) = cmplx(-Ham_Ty, 0.d0, kind(0.D0)) Op_T(1,nf)%O(I, Iy) = cmplx(-Ham_Ty, 0.d0, kind(0.D0)) ! Op_T(1,nf)%O(Iy, I ) = cmplx(-Ham_Ty, 0.d0, kind(0.D0)) Op_T(1,nf)%O(Iy, I ) = cmplx(-Ham_Ty, 0.d0, kind(0.D0)) !!!!!!! !!!!!!! endif endif Op_T(1,nf)%O(I, I ) = cmplx(-Ham_chem, 0.d0, kind(0.D0)) Op_T(1,nf)%O(I, I ) = cmplx(-Ham_chem, 0.d0, kind(0.D0)) ... @@ -414,10 +423,10 @@ ... @@ -414,10 +423,10 @@ If (L2 > 1 ) Then If (L2 > 1 ) Then Iy = Latt%nnlist(I,0,1) Iy = Latt%nnlist(I,0,1) !!!!!!! Modifications for Exercise 1a !!!!!!! Modifications for Exercise 1a H0(I, Iy) = -Ham_T *(1.d0 - Delta) !H0(I, Iy) = -Ham_T *(1.d0 - Delta) H0(Iy, I ) = -Ham_T *(1.d0 - Delta) !H0(Iy, I ) = -Ham_T *(1.d0 - Delta) !H0(I, Iy) = -Ham_Ty *(1.d0 - Delta) H0(I, Iy) = -Ham_Ty *(1.d0 - Delta) !H0(Iy, I ) = -Ham_Ty *(1.d0 - Delta) H0(Iy, I ) = -Ham_Ty *(1.d0 - Delta) !!!!!!! !!!!!!! Endif Endif Enddo Enddo ... ...  .PHONY : all tidy clean BINS= cov_scal.out cov_tau.out cov_tau_ph.out Max_SAC.out cov_eq.out OBJS= cov_scal.o cov_tau.o cov_tau_ph.o Max_SAC.o cov_eq.o OBJS1 = Predefined_Latt_mod.o MODS=predefined_lattices.mod all:$(OBJS1) $(BINS) cov_tau_ph.F90 : cov_tau.F90 cpp -w -P -DPartHole cov_tau.F90 -o cov_tau_ph.F90 %.o: %.F90$(ALF_FC) -c $*.F90$(ALF_FLAGS_ANA) %.out: %.F90 $(ALF_FC) -c$(ALF_FLAGS_ANA) $<$(ALF_FC) -o $@$*.o $(OBJS1)$(ALF_LIB) tidy: rm -f $(OBJS)$(OBJS1) $(MODS) cov_tau_ph.F90 clean: tidy rm -f$(BINS)