Commit 1a691aa7 authored by Jefferson Stafusa E. Portela's avatar Jefferson Stafusa E. Portela
Browse files

Add Exercise 1 of Part II. Some cleanup.

parent 83e5406c
%!PS-Adobe-2.0 EPSF-2.0 %!PS-Adobe-2.0 EPSF-2.0
%%Title: Ladder.eps %%Title: Ladder.eps
%%Creator: gnuplot 5.2 patchlevel 6 %%Creator: gnuplot 5.2 patchlevel 8
%%CreationDate: Tue Aug 20 18:43:37 2019 %%CreationDate: Fri Sep 18 05:10:16 2020
%%DocumentFonts: (atend) %%DocumentFonts: (atend)
%%BoundingBox: 50 50 338 251 %%BoundingBox: 50 50 338 251
%%EndComments %%EndComments
...@@ -478,10 +478,10 @@ systemdict /pdfmark known not { ...@@ -478,10 +478,10 @@ systemdict /pdfmark known not {
SDict begin [ SDict begin [
/Title (Ladder.eps) /Title (Ladder.eps)
/Subject (gnuplot plot) /Subject (gnuplot plot)
/Creator (gnuplot 5.2 patchlevel 6) /Creator (gnuplot 5.2 patchlevel 8)
% /Producer (gnuplot) % /Producer (gnuplot)
% /Keywords () % /Keywords ()
/CreationDate (Tue Aug 20 18:43:37 2019) /CreationDate (Fri Sep 18 05:10:16 2020)
/DOCINFO pdfmark /DOCINFO pdfmark
end end
} ifelse } ifelse
...@@ -745,7 +745,7 @@ Z stroke ...@@ -745,7 +745,7 @@ Z stroke
LTb LTb
LCb setrgbcolor LCb setrgbcolor
LCb setrgbcolor LCb setrgbcolor
162 2033 M 171 2033 M
currentpoint gsave translate -270 rotate 0 0 moveto currentpoint gsave translate -270 rotate 0 0 moveto
[ [(Times-Roman) 180.0 0.0 true true 0 (S\(r,0\))] [ [(Times-Roman) 180.0 0.0 true true 0 (S\(r,0\))]
] -60.0 MCshow ] -60.0 MCshow
...@@ -765,6 +765,7 @@ LCb setrgbcolor ...@@ -765,6 +765,7 @@ LCb setrgbcolor
[(Times-Roman) 180.0 0.0 true true 0 (t=10, U/t=4 )] [(Times-Roman) 180.0 0.0 true true 0 (t=10, U/t=4 )]
] -60.0 MCshow ] -60.0 MCshow
/Times-Roman findfont 180 scalefont setfont /Times-Roman findfont 180 scalefont setfont
LTb
% Begin plot #1 % Begin plot #1
1.000 UP 1.000 UP
1.000 UL 1.000 UL
......
...@@ -297,9 +297,9 @@ git clone git@git.physik.uni-wuerzburg.de:ALF/ALF_Tutorial.git ...@@ -297,9 +297,9 @@ git clone git@git.physik.uni-wuerzburg.de:ALF/ALF_Tutorial.git
\exerciseitem{Modifying the hopping} \exerciseitem{Modifying the hopping}
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. 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: 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. 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 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 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 Add this variable also to the name space (\texttt{namelist}) declaration at the \texttt{Ham\_Set} subroutine of \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}).
\item Add \texttt{Ham\_Ty} to the \texttt{VAR\_Hubbard\_Plain\_Vanilla} name space (\texttt{namelist}) declaration at the \texttt{Ham\_Set} subroutine of \texttt{Vanilla}.
\item Modify the hopping matrix in the subroutine \texttt{Ham\_Hop} in \texttt{Vanilla}: \item Modify the hopping matrix in the subroutine \texttt{Ham\_Hop} in \texttt{Vanilla}:
\begin{lstlisting}[style=fortran] \begin{lstlisting}[style=fortran]
Do I = 1,Latt%N Do I = 1,Latt%N
...@@ -320,18 +320,26 @@ Do I = 1,Latt%N ...@@ -320,18 +320,26 @@ Do I = 1,Latt%N
Enddo Enddo
\end{lstlisting} \end{lstlisting}
\end{itemize} \end{itemize}
Note: If you'd like to run the simulation using MPI, you should also add the broadcasting call for \texttt{Ham\_Ty} to \texttt{Ham\_Set}. Note: If you'd like to run the simulation using MPI, you should also add the broadcasting call for \texttt{Ham\_Ty} to \texttt{Ham\_Set}. It is a good idea as well to include the new variable to the simulation parameters written into the file \texttt{info}, also in \texttt{Ham\_Set}.
\red{[NOT yet done.]} In the directory \texttt{Solutions/Exercise\_2} we have duplicated the ALF and commented the changes that have to be carried out to the file \texttt{Hamiltonian\_Hubbard\_Plain\_Vanilla\_mod.F90} in the \texttt{Prog} directory. In the directory \texttt{Solutions/Exercise\_1} we have duplicated ALF's code and commented the changes that have to be carried out to the file \texttt{Hamiltonian\_Hubbard\_Plain\_Vanilla\_mod.F90} in the \texttt{Prog} directory. The solution directory also includes reference data and the necessary \texttt{Start} directory (remember to copy its contents to every new \texttt{Run} directory, and to have a different \texttt{Run} directory for each simulationi).
\noindent \noindent
As an application of this code, one can consider a 2-leg ladder system defined, e.g., with \texttt{L1=14}, \texttt{L2=2}, \texttt{Lattice\_type="Square"}, \texttt{Model="Hubbard\_Plain\_Vanilla"} and \texttt{Ham\_Ty=2.0D0}. As an application of this code, we can consider a 2-leg ladder system defined, e.g., with \texttt{L1=14}, \texttt{L2=2}, \texttt{Lattice\_type="Square"}, \texttt{Model="Hubbard\_Plain\_Vanilla"} and different values of \texttt{Ham\_Ty}. The results you should obtain are summarized in Fig.~\ref{fig:ladder}.
\begin{figure}[h]
\begin{center}
\includegraphics[width=0.6\columnwidth]{Figures/ladder.pdf}
\end{center}
\caption{Spin correlation functions along one leg for the Hubbard ladder. As $t_y$ grows the spin gap becomes large enough so as to detect the exponential decal of the spin correlation function on this small lattice size. The underlying physics of odd-even ladder systems is introduced in the article: Elbio Dagotto and T. M. Rice, Surprises on the way from one- to two-dimensional quantum magnets: The ladder materials, Science 271 (1996), no. 5249, 618--623.}
\label{fig:ladder}
\end{figure}
% [Excluding the introduction to the exercise item: improved estimator \langle \vec{S}_{i} \cdot \vec{S}_{j} \rangle]
\exerciseitem{The SU(2) Hubbard-Stratonovich transformation} \exerciseitem{The SU(2) Hubbard-Stratonovich transformation}
\red{[Introduce modifications to \texttt{Hamiltonian\_Hubbard\_mod.F90}]} The SU(2) Hubbard-Stratonovich decomposition, conserves spin rotational symmetry. Run the ladder code with the SU(2) flag in the parameter file switched on (i.e. \texttt{Model = Hubbard\_SU2}) and compare results.
The SU(2) Hubbard-Stratonovich decomposition conserves spin rotational symmetry. Introduce into \texttt{Hamiltonian\_Hubbard\_mod.F90} the same changes done to the \texttt{Vanilla} module, described in the previous item, and compare results.
......
set terminal postscript eps enhanced solid color 'Times-Roman' 18 set terminal postscript eps enhanced solid color 'Times-Roman' 18
set size 0.8,0.8 set size 0.8,0.8
set title "{L=14 Hubbard Ladder, {/Symbol b}t=10, U/t=4 }" set title "{L=14 Hubbard Ladder, {/Symbol b}t=10, U/t=4 }"
set out 'Ladder.eps' set out 'ladder.eps'
set fit errorvariables set fit errorvariables
#tmp='Ener_fit.dat' #tmp='Ener_fit.dat'
#set print tmp #set print tmp
...@@ -11,12 +11,12 @@ f(x) = a + b * x ...@@ -11,12 +11,12 @@ f(x) = a + b * x
#print "0.0 ", a, a_err, b, b_err, "\n\n" #print "0.0 ", a, a_err, b, b_err, "\n\n"
plot "Spin.dat" i 0 u 1:2:3 w e lt 2 t "t_y=0" ,\ plot "ladder.dat" i 0 u 1:2:3 w e lt 2 t "t_y=0" ,\
"Spin.dat" i 1 u 1:2:3 w e lt 3 t "t_y=1" ,\ "ladder.dat" i 1 u 1:2:3 w e lt 3 t "t_y=1" ,\
"Spin.dat" i 2 u 1:2:3 w e lt 4 t "t_y=2" ,\ "ladder.dat" i 2 u 1:2:3 w e lt 4 t "t_y=2" ,\
"Spin.dat" i 0 u 1:2 w l lt 2 t "" ,\ "ladder.dat" i 0 u 1:2 w l lt 2 t "" ,\
"Spin.dat" i 1 u 1:2 w l lt 3 t "" ,\ "ladder.dat" i 1 u 1:2 w l lt 3 t "" ,\
"Spin.dat" i 2 u 1:2 w l lt 4 t "" "ladder.dat" i 2 u 1:2 w l lt 4 t ""
!epstopdf Ladder.eps !epstopdf ladder.eps
!open Ladder.pdf !open ladder.pdf
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment