Improved notebook runs.

parent 9d964bcb
......@@ -14,7 +14,7 @@ temperature \(\beta = 5\).
Bellow we go through the steps for performing the simulation and
outputting observables.
\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
\textbf{1.} Import \texttt{Simulation} class from the \texttt{py\_alf}
python module, which provides the interface with ALF:
......@@ -22,7 +22,8 @@ python module, which provides the interface with ALF:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{1}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{k+kn}{from} \PY{n+nn}{py\PYZus{}alf} \PY{k+kn}{import} \PY{n}{Simulation} \PY{c+c1}{\PYZsh{} Interface with ALF}
\PY{k+kn}{import} \PY{n+nn}{os}
\PY{k+kn}{from} \PY{n+nn}{py\PYZus{}alf} \PY{k}{import} \PY{n}{Simulation} \PY{c+c1}{\PYZsh{} Interface with ALF}
\end{Verbatim}
\end{tcolorbox}
......@@ -33,10 +34,12 @@ parameters as desired:
\prompt{In}{incolor}{2}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{sim} \PY{o}{=} \PY{n}{Simulation}\PY{p}{(}
\PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Hubbard}\PY{l+s+s2}{\PYZdq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Hamiltonian}
\PY{p}{\PYZob{}} \PY{c+c1}{\PYZsh{} Model and simulation parameters for each Simulation instance}
\PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Model}\PY{l+s+s2}{\PYZdq{}}\PY{p}{:} \PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Hubbard}\PY{l+s+s2}{\PYZdq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Base model}
\PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Lattice\PYZus{}type}\PY{l+s+s2}{\PYZdq{}}\PY{p}{:} \PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Square}\PY{l+s+s2}{\PYZdq{}}\PY{p}{\PYZcb{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Lattice type}
\PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Hubbard}\PY{l+s+s2}{\PYZdq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Hamiltonian}
\PY{p}{\PYZob{}} \PY{c+c1}{\PYZsh{} Model and simulation parameters for each Simulation instance}
\PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Model}\PY{l+s+s2}{\PYZdq{}}\PY{p}{:} \PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Hubbard}\PY{l+s+s2}{\PYZdq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Base model}
\PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Lattice\PYZus{}type}\PY{l+s+s2}{\PYZdq{}}\PY{p}{:} \PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Square}\PY{l+s+s2}{\PYZdq{}}\PY{p}{\PYZcb{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Lattice type}
\PY{n}{alf\PYZus{}dir}\PY{o}{=}\PY{n}{os}\PY{o}{.}\PY{n}{getenv}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{ALF\PYZus{}DIR}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{./ALF}\PY{l+s+s1}{\PYZsq{}}\PY{p}{)}\PY{p}{,} \PY{c+c1}{\PYZsh{} Directory with ALF source code. Gets it from }
\PY{c+c1}{\PYZsh{} environment variable ALF\PYZus{}DIR, if present}
\PY{p}{)}
\end{Verbatim}
\end{tcolorbox}
......@@ -48,13 +51,11 @@ found locally. This may take a few minutes:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{3}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{sim}\PY{o}{.}\PY{n}{compile}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Compilation needs to be performed only once}
\PY{n}{sim}\PY{o}{.}\PY{n}{compile}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Compilation needs to be performed only once}
\end{Verbatim}
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
Repository /home/stafusa/ALF/pyALF/Notebooks/ALF does not exist, cloning from
git@git.physik.uni-wuerzburg.de:ALF/ALF.git
Compiling ALF{\ldots} Done.
\end{Verbatim}
......@@ -63,15 +64,15 @@ Compiling ALF{\ldots} Done.
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{4}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{sim}\PY{o}{.}\PY{n}{run}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Perform the actual simulation in ALF}
\PY{n}{sim}\PY{o}{.}\PY{n}{run}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Perform the actual simulation in ALF}
\end{Verbatim}
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/Hubbard\_Square" for Monte
Carlo run.
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square"
for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
\end{Verbatim}
\textbf{5.} Perform some simple analyses:
......@@ -79,7 +80,7 @@ Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{5}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{sim}\PY{o}{.}\PY{n}{analysis}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Perform default analysis; list observables}
\PY{n}{sim}\PY{o}{.}\PY{n}{analysis}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Perform default analysis; list observables}
\end{Verbatim}
\end{tcolorbox}
......@@ -105,10 +106,17 @@ Analysing SpinT\_tau
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{6}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{obs} \PY{o}{=} \PY{n}{sim}\PY{o}{.}\PY{n}{get\PYZus{}obs}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Dictionary for the observables}
\PY{n}{obs} \PY{o}{=} \PY{n}{sim}\PY{o}{.}\PY{n}{get\PYZus{}obs}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Dictionary for the observables}
\end{Verbatim}
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Kin\_scalJ 1
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Part\_scalJ 1
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Ener\_scalJ 1
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Pot\_scalJ 1
\end{Verbatim}
which are available for further analyses. For instance, the internal
energy of the system (and its error) is accessed by:
......@@ -122,11 +130,11 @@ energy of the system (and its error) is accessed by:
\begin{tcolorbox}[breakable, size=fbox, boxrule=.5pt, pad at break*=1mm, opacityfill=0]
\prompt{Out}{outcolor}{7}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
array([[-29.983503, 0.232685]])
array([[-29.893866, 0.109235]])
\end{Verbatim}
\end{tcolorbox}
\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
\textbf{7.} Running again: The simulation can be resumed to increase the
precision of the results.
......@@ -143,10 +151,10 @@ precision of the results.
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/Hubbard\_Square" for Monte
Carlo run.
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square"
for Monte Carlo run.
Resuming previous run.
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
Analysing Ener\_scal
Analysing Part\_scal
Analysing Pot\_scal
......@@ -161,16 +169,20 @@ Analysing SpinZ\_tau
Analysing Den\_tau
Analysing Green\_tau
Analysing SpinT\_tau
[[-29.819654 0.135667]]
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Kin\_scalJ 1
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Part\_scalJ 1
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Ener\_scalJ 1
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Pot\_scalJ 1
[[-29.839345 0.049995]]
Running again reduced the error from 0.232685 to 0.135667 .
Running again reduced the error from 0.109235 to 0.049995 .
\end{Verbatim}
\textbf{Note}: To run a fresh simulation - instead of performing a
refinement over previous run(s) - the Monte Carlo run directory should
be deleted before rerunning.
\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
\hypertarget{exercises}{%
\subsection{Exercises}\label{exercises}}
......
......@@ -382,7 +382,7 @@ temperature \(\beta = 5\).
Bellow we go through the steps for performing the simulation and
outputting observables.
\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
\textbf{1.} Import \texttt{Simulation} class from the \texttt{py\_alf}
python module, which provides the interface with ALF:
......@@ -390,7 +390,8 @@ python module, which provides the interface with ALF:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{1}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{k+kn}{from} \PY{n+nn}{py\PYZus{}alf} \PY{k+kn}{import} \PY{n}{Simulation} \PY{c+c1}{\PYZsh{} Interface with ALF}
\PY{k+kn}{import} \PY{n+nn}{os}
\PY{k+kn}{from} \PY{n+nn}{py\PYZus{}alf} \PY{k}{import} \PY{n}{Simulation} \PY{c+c1}{\PYZsh{} Interface with ALF}
\end{Verbatim}
\end{tcolorbox}
......@@ -401,10 +402,12 @@ parameters as desired:
\prompt{In}{incolor}{2}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{sim} \PY{o}{=} \PY{n}{Simulation}\PY{p}{(}
\PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Hubbard}\PY{l+s+s2}{\PYZdq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Hamiltonian}
\PY{p}{\PYZob{}} \PY{c+c1}{\PYZsh{} Model and simulation parameters for each Simulation instance}
\PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Model}\PY{l+s+s2}{\PYZdq{}}\PY{p}{:} \PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Hubbard}\PY{l+s+s2}{\PYZdq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Base model}
\PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Lattice\PYZus{}type}\PY{l+s+s2}{\PYZdq{}}\PY{p}{:} \PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Square}\PY{l+s+s2}{\PYZdq{}}\PY{p}{\PYZcb{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Lattice type}
\PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Hubbard}\PY{l+s+s2}{\PYZdq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Hamiltonian}
\PY{p}{\PYZob{}} \PY{c+c1}{\PYZsh{} Model and simulation parameters for each Simulation instance}
\PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Model}\PY{l+s+s2}{\PYZdq{}}\PY{p}{:} \PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Hubbard}\PY{l+s+s2}{\PYZdq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Base model}
\PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Lattice\PYZus{}type}\PY{l+s+s2}{\PYZdq{}}\PY{p}{:} \PY{l+s+s2}{\PYZdq{}}\PY{l+s+s2}{Square}\PY{l+s+s2}{\PYZdq{}}\PY{p}{\PYZcb{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Lattice type}
\PY{n}{alf\PYZus{}dir}\PY{o}{=}\PY{n}{os}\PY{o}{.}\PY{n}{getenv}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{ALF\PYZus{}DIR}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{./ALF}\PY{l+s+s1}{\PYZsq{}}\PY{p}{)}\PY{p}{,} \PY{c+c1}{\PYZsh{} Directory with ALF source code. Gets it from }
\PY{c+c1}{\PYZsh{} environment variable ALF\PYZus{}DIR, if present}
\PY{p}{)}
\end{Verbatim}
\end{tcolorbox}
......@@ -416,13 +419,11 @@ found locally. This may take a few minutes:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{3}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{sim}\PY{o}{.}\PY{n}{compile}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Compilation needs to be performed only once}
\PY{n}{sim}\PY{o}{.}\PY{n}{compile}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Compilation needs to be performed only once}
\end{Verbatim}
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
Repository /home/stafusa/ALF/pyALF/Notebooks/ALF does not exist, cloning from
git@git.physik.uni-wuerzburg.de:ALF/ALF.git
Compiling ALF{\ldots} Done.
\end{Verbatim}
......@@ -431,15 +432,15 @@ Compiling ALF{\ldots} Done.
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{4}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{sim}\PY{o}{.}\PY{n}{run}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Perform the actual simulation in ALF}
\PY{n}{sim}\PY{o}{.}\PY{n}{run}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Perform the actual simulation in ALF}
\end{Verbatim}
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/Hubbard\_Square" for Monte
Carlo run.
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square"
for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
\end{Verbatim}
\textbf{5.} Perform some simple analyses:
......@@ -447,7 +448,7 @@ Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{5}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{sim}\PY{o}{.}\PY{n}{analysis}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Perform default analysis; list observables}
\PY{n}{sim}\PY{o}{.}\PY{n}{analysis}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Perform default analysis; list observables}
\end{Verbatim}
\end{tcolorbox}
......@@ -473,10 +474,17 @@ Analysing SpinT\_tau
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{6}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{obs} \PY{o}{=} \PY{n}{sim}\PY{o}{.}\PY{n}{get\PYZus{}obs}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Dictionary for the observables}
\PY{n}{obs} \PY{o}{=} \PY{n}{sim}\PY{o}{.}\PY{n}{get\PYZus{}obs}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Dictionary for the observables}
\end{Verbatim}
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Kin\_scalJ 1
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Part\_scalJ 1
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Ener\_scalJ 1
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Pot\_scalJ 1
\end{Verbatim}
which are available for further analyses. For instance, the internal
energy of the system (and its error) is accessed by:
......@@ -490,11 +498,11 @@ energy of the system (and its error) is accessed by:
\begin{tcolorbox}[breakable, size=fbox, boxrule=.5pt, pad at break*=1mm, opacityfill=0]
\prompt{Out}{outcolor}{7}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
array([[-29.983503, 0.232685]])
array([[-29.893866, 0.109235]])
\end{Verbatim}
\end{tcolorbox}
\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
\textbf{7.} Running again: The simulation can be resumed to increase the
precision of the results.
......@@ -511,10 +519,10 @@ precision of the results.
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/Hubbard\_Square" for Monte
Carlo run.
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square"
for Monte Carlo run.
Resuming previous run.
Run /home/stafusa/ALF/pyALF/Notebooks/ALF/Prog/Hubbard.out
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
Analysing Ener\_scal
Analysing Part\_scal
Analysing Pot\_scal
......@@ -529,16 +537,20 @@ Analysing SpinZ\_tau
Analysing Den\_tau
Analysing Green\_tau
Analysing SpinT\_tau
[[-29.819654 0.135667]]
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Kin\_scalJ 1
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Part\_scalJ 1
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Ener\_scalJ 1
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_Square/Pot\_scalJ 1
[[-29.839345 0.049995]]
Running again reduced the error from 0.232685 to 0.135667 .
Running again reduced the error from 0.109235 to 0.049995 .
\end{Verbatim}
\textbf{Note}: To run a fresh simulation - instead of performing a
refinement over previous run(s) - the Monte Carlo run directory should
be deleted before rerunning.
\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
\hypertarget{exercises}{%
\subsection{Exercises}\label{exercises}}
......
......@@ -36,6 +36,7 @@ mathematics and plotting packages:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{1}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{k+kn}{import} \PY{n+nn}{os}
\PY{k+kn}{from} \PY{n+nn}{py\PYZus{}alf} \PY{k}{import} \PY{n}{Simulation} \PY{c+c1}{\PYZsh{} Interface with ALF}
\PY{c+c1}{\PYZsh{} }
\PY{k+kn}{import} \PY{n+nn}{numpy} \PY{k}{as} \PY{n+nn}{np} \PY{c+c1}{\PYZsh{} Numerical library}
......@@ -49,11 +50,11 @@ necessary parameters, in particular the different \(\Delta \tau\)
values:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{2}{\boxspacing}
\prompt{In}{incolor}{19}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{sims} \PY{o}{=} \PY{p}{[}\PY{p}{]} \PY{c+c1}{\PYZsh{} Vector of Simulation instances}
\PY{n+nb}{print}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{dtau values used:}\PY{l+s+s1}{\PYZsq{}}\PY{p}{)}
\PY{k}{for} \PY{n}{dtau} \PY{o+ow}{in} \PY{p}{[}\PY{l+m+mf}{0.05}\PY{p}{,} \PY{l+m+mf}{0.1}\PY{p}{,} \PY{l+m+mf}{0.15}\PY{p}{]}\PY{p}{:} \PY{c+c1}{\PYZsh{} Values of dtau}
\PY{k}{for} \PY{n}{dtau} \PY{o+ow}{in} \PY{p}{[}\PY{l+m+mf}{0.05}\PY{p}{,} \PY{l+m+mf}{0.1}\PY{p}{,} \PY{l+m+mf}{0.2}\PY{p}{]}\PY{p}{:} \PY{c+c1}{\PYZsh{} Values of dtau}
\PY{n+nb}{print}\PY{p}{(}\PY{n}{dtau}\PY{p}{)}
\PY{n}{sim} \PY{o}{=} \PY{n}{Simulation}\PY{p}{(}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Hubbard}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Hamiltonian}
......@@ -69,12 +70,13 @@ values:
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{ham\PYZus{}Tperp}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mf}{0.0}\PY{p}{,} \PY{c+c1}{\PYZsh{} For bilayer systems}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{beta}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mf}{2.0}\PY{p}{,} \PY{c+c1}{\PYZsh{} Inverse temperature}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Ltau}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{0}\PY{p}{,} \PY{c+c1}{\PYZsh{} \PYZsq{}1\PYZsq{} for time\PYZhy{}displaced Green functions; \PYZsq{}0\PYZsq{} otherwise }
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{NSweep}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{400}\PY{p}{,} \PY{c+c1}{\PYZsh{} Number of sweeps}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{NSweep}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{1000}\PY{p}{,} \PY{c+c1}{\PYZsh{} Number of sweeps per bin}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{NBin}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{100}\PY{p}{,} \PY{c+c1}{\PYZsh{} Number of bins}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Dtau}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{n}{dtau}\PY{p}{,} \PY{c+c1}{\PYZsh{} Only dtau varies between simulations, Ltrot=beta/Dtau}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Mz}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{k+kc}{True}\PY{p}{,} \PY{c+c1}{\PYZsh{} If true, sets the M\PYZus{}z\PYZhy{}Hubbard model: Nf=2, N\PYZus{}sum=1,}
\PY{p}{\PYZcb{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} HS field couples to z\PYZhy{}component of magnetization}
\PY{n}{alf\PYZus{}dir}\PY{o}{=}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{\PYZti{}/Programs/ALF}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Local ALF copy, if present}
\PY{n}{alf\PYZus{}dir}\PY{o}{=}\PY{n}{os}\PY{o}{.}\PY{n}{getenv}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{ALF\PYZus{}DIR}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{./ALF}\PY{l+s+s1}{\PYZsq{}}\PY{p}{)}\PY{p}{,} \PY{c+c1}{\PYZsh{} Directory with ALF source code. Gets it from }
\PY{c+c1}{\PYZsh{} environment variable ALF\PYZus{}DIR, if present}
\PY{p}{)}
\PY{n}{sims}\PY{o}{.}\PY{n}{append}\PY{p}{(}\PY{n}{sim}\PY{p}{)}
\end{Verbatim}
......@@ -84,7 +86,7 @@ values:
dtau values used:
0.05
0.1
0.15
0.2
\end{Verbatim}
\textbf{3.} Compile ALF, downloading it first if not found locally. This
......@@ -105,7 +107,7 @@ Compiling ALF{\ldots} Done.
\texttt{sim}:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{4}{\boxspacing}
\prompt{In}{incolor}{20}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{k}{for} \PY{n}{i}\PY{p}{,} \PY{n}{sim} \PY{o+ow}{in} \PY{n+nb}{enumerate}\PY{p}{(}\PY{n}{sims}\PY{p}{)}\PY{p}{:}
\PY{n}{sim}\PY{o}{.}\PY{n}{run}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Perform the actual simulation in ALF}
......@@ -113,27 +115,27 @@ Compiling ALF{\ldots} Done.
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
Prepare directory "/home/stafusa/ALF/pyALF/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.05\_Mz=True" for
Monte Carlo run.
Resuming previous run.
Run /home/stafusa/Programs/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.1\_Mz=True" for
Monte Carlo run.
Resuming previous run.
Run /home/stafusa/Programs/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.15\_Mz=True" for
Monte Carlo run.
Resuming previous run.
Run /home/stafusa/Programs/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.
05\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.
1\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.
2\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
\end{Verbatim}
\textbf{5.} Calculate the internal energies:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{5}{\boxspacing}
\prompt{In}{incolor}{21}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{ener} \PY{o}{=} \PY{n}{np}\PY{o}{.}\PY{n}{empty}\PY{p}{(}\PY{p}{(}\PY{n+nb}{len}\PY{p}{(}\PY{n}{sims}\PY{p}{)}\PY{p}{,} \PY{l+m+mi}{2}\PY{p}{)}\PY{p}{)} \PY{c+c1}{\PYZsh{} Matrix for storing energy values}
\PY{n}{dtaus} \PY{o}{=} \PY{n}{np}\PY{o}{.}\PY{n}{empty}\PY{p}{(}\PY{p}{(}\PY{n+nb}{len}\PY{p}{(}\PY{n}{sims}\PY{p}{)}\PY{p}{,}\PY{p}{)}\PY{p}{)} \PY{c+c1}{\PYZsh{} Matrix for Dtau values, for plotting}
......@@ -146,8 +148,8 @@ Run /home/stafusa/Programs/ALF/Prog/Hubbard.out
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
/home/stafusa/ALF/pyALF/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checkerboard=False\_Symm=T
rue\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.05\_Mz=True
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.05\_Mz=True
Analysing Ener\_scal
Analysing Part\_scal
Analysing Pot\_scal
......@@ -157,8 +159,11 @@ Analysing SpinZ\_eq
Analysing Green\_eq
Analysing SpinXY\_eq
Analysing SpinT\_eq
/home/stafusa/ALF/pyALF/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checkerboard=False\_Symm=T
rue\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.1\_Mz=True
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.05\_Mz=True/Ener\_sca
lJ 1
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.1\_Mz=True
Analysing Ener\_scal
Analysing Part\_scal
Analysing Pot\_scal
......@@ -168,8 +173,11 @@ Analysing SpinZ\_eq
Analysing Green\_eq
Analysing SpinXY\_eq
Analysing SpinT\_eq
/home/stafusa/ALF/pyALF/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checkerboard=False\_Symm=T
rue\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.15\_Mz=True
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.1\_Mz=True/Ener\_scal
J 1
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.2\_Mz=True
Analysing Ener\_scal
Analysing Part\_scal
Analysing Pot\_scal
......@@ -179,24 +187,27 @@ Analysing SpinZ\_eq
Analysing Green\_eq
Analysing SpinXY\_eq
Analysing SpinT\_eq
/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.2\_Mz=True/Ener\_scal
J 1
\end{Verbatim}
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{6}{\boxspacing}
\prompt{In}{incolor}{22}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n+nb}{print}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{For Dtau values}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{n}{dtaus}\PY{p}{,} \PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{the measured energies are:}\PY{l+s+se}{\PYZbs{}n}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{n}{ener}\PY{p}{)}
\end{Verbatim}
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
For Dtau values [0.05 0.1 0.15] the measured energies are:
[[-1.473383 0.002569]
[-1.478316 0.002525]
[-1.46798 0.002359]]
For Dtau values [0.05 0.1 0.2 ] the measured energies are:
[[-1.474445 0.002606]
[-1.477042 0.002152]
[-1.490565 0.001943]]
\end{Verbatim}
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{7}{\boxspacing}
\prompt{In}{incolor}{23}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{plt}\PY{o}{.}\PY{n}{errorbar}\PY{p}{(}\PY{n}{dtaus}\PY{o}{*}\PY{o}{*}\PY{l+m+mi}{2}\PY{p}{,} \PY{n}{ener}\PY{p}{[}\PY{p}{:}\PY{p}{,} \PY{l+m+mi}{0}\PY{p}{]}\PY{p}{,} \PY{n}{ener}\PY{p}{[}\PY{p}{:}\PY{p}{,} \PY{l+m+mi}{1}\PY{p}{]}\PY{p}{)}
......@@ -213,11 +224,11 @@ For Dtau values [0.05 0.1 0.15] the measured energies are:
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
[-1.47718877 0.3429858 ] [0.00254357 0.17130454]
[-1.47297574 -0.43843489] [0.00203182 0.07621841]
\end{Verbatim}
\begin{tcolorbox}[breakable, size=fbox, boxrule=.5pt, pad at break*=1mm, opacityfill=0]
\prompt{Out}{outcolor}{7}{\boxspacing}
\prompt{Out}{outcolor}{23}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
<ErrorbarContainer object of 3 artists>
\end{Verbatim}
......
......@@ -404,6 +404,7 @@ mathematics and plotting packages:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{1}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{k+kn}{import} \PY{n+nn}{os}
\PY{k+kn}{from} \PY{n+nn}{py\PYZus{}alf} \PY{k}{import} \PY{n}{Simulation} \PY{c+c1}{\PYZsh{} Interface with ALF}
\PY{c+c1}{\PYZsh{} }
\PY{k+kn}{import} \PY{n+nn}{numpy} \PY{k}{as} \PY{n+nn}{np} \PY{c+c1}{\PYZsh{} Numerical library}
......@@ -417,11 +418,11 @@ necessary parameters, in particular the different \(\Delta \tau\)
values:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{2}{\boxspacing}
\prompt{In}{incolor}{19}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{n}{sims} \PY{o}{=} \PY{p}{[}\PY{p}{]} \PY{c+c1}{\PYZsh{} Vector of Simulation instances}
\PY{n+nb}{print}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{dtau values used:}\PY{l+s+s1}{\PYZsq{}}\PY{p}{)}
\PY{k}{for} \PY{n}{dtau} \PY{o+ow}{in} \PY{p}{[}\PY{l+m+mf}{0.05}\PY{p}{,} \PY{l+m+mf}{0.1}\PY{p}{,} \PY{l+m+mf}{0.15}\PY{p}{]}\PY{p}{:} \PY{c+c1}{\PYZsh{} Values of dtau}
\PY{k}{for} \PY{n}{dtau} \PY{o+ow}{in} \PY{p}{[}\PY{l+m+mf}{0.05}\PY{p}{,} \PY{l+m+mf}{0.1}\PY{p}{,} \PY{l+m+mf}{0.2}\PY{p}{]}\PY{p}{:} \PY{c+c1}{\PYZsh{} Values of dtau}
\PY{n+nb}{print}\PY{p}{(}\PY{n}{dtau}\PY{p}{)}
\PY{n}{sim} \PY{o}{=} \PY{n}{Simulation}\PY{p}{(}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Hubbard}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Hamiltonian}
......@@ -437,12 +438,13 @@ values:
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{ham\PYZus{}Tperp}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mf}{0.0}\PY{p}{,} \PY{c+c1}{\PYZsh{} For bilayer systems}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{beta}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mf}{2.0}\PY{p}{,} \PY{c+c1}{\PYZsh{} Inverse temperature}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Ltau}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{0}\PY{p}{,} \PY{c+c1}{\PYZsh{} \PYZsq{}1\PYZsq{} for time\PYZhy{}displaced Green functions; \PYZsq{}0\PYZsq{} otherwise }
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{NSweep}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{400}\PY{p}{,} \PY{c+c1}{\PYZsh{} Number of sweeps}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{NSweep}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{1000}\PY{p}{,} \PY{c+c1}{\PYZsh{} Number of sweeps per bin}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{NBin}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{l+m+mi}{100}\PY{p}{,} \PY{c+c1}{\PYZsh{} Number of bins}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Dtau}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{n}{dtau}\PY{p}{,} \PY{c+c1}{\PYZsh{} Only dtau varies between simulations, Ltrot=beta/Dtau}
\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{Mz}\PY{l+s+s1}{\PYZsq{}}\PY{p}{:} \PY{k+kc}{True}\PY{p}{,} \PY{c+c1}{\PYZsh{} If true, sets the M\PYZus{}z\PYZhy{}Hubbard model: Nf=2, N\PYZus{}sum=1,}
\PY{p}{\PYZcb{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} HS field couples to z\PYZhy{}component of magnetization}
\PY{n}{alf\PYZus{}dir}\PY{o}{=}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{\PYZti{}/Programs/ALF}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{c+c1}{\PYZsh{} Local ALF copy, if present}
\PY{n}{alf\PYZus{}dir}\PY{o}{=}\PY{n}{os}\PY{o}{.}\PY{n}{getenv}\PY{p}{(}\PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{ALF\PYZus{}DIR}\PY{l+s+s1}{\PYZsq{}}\PY{p}{,} \PY{l+s+s1}{\PYZsq{}}\PY{l+s+s1}{./ALF}\PY{l+s+s1}{\PYZsq{}}\PY{p}{)}\PY{p}{,} \PY{c+c1}{\PYZsh{} Directory with ALF source code. Gets it from }
\PY{c+c1}{\PYZsh{} environment variable ALF\PYZus{}DIR, if present}
\PY{p}{)}
\PY{n}{sims}\PY{o}{.}\PY{n}{append}\PY{p}{(}\PY{n}{sim}\PY{p}{)}
\end{Verbatim}
......@@ -452,7 +454,7 @@ values:
dtau values used:
0.05
0.1
0.15
0.2
\end{Verbatim}
\textbf{3.} Compile ALF, downloading it first if not found locally. This
......@@ -473,7 +475,7 @@ Compiling ALF{\ldots} Done.
\texttt{sim}:
\begin{tcolorbox}[breakable, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder]
\prompt{In}{incolor}{4}{\boxspacing}
\prompt{In}{incolor}{20}{\boxspacing}
\begin{Verbatim}[commandchars=\\\{\}]
\PY{k}{for} \PY{n}{i}\PY{p}{,} \PY{n}{sim} \PY{o+ow}{in} \PY{n+nb}{enumerate}\PY{p}{(}\PY{n}{sims}\PY{p}{)}\PY{p}{:}
\PY{n}{sim}\PY{o}{.}\PY{n}{run}\PY{p}{(}\PY{p}{)} \PY{c+c1}{\PYZsh{} Perform the actual simulation in ALF}
......@@ -481,27 +483,27 @@ Compiling ALF{\ldots} Done.
\end{tcolorbox}
\begin{Verbatim}[commandchars=\\\{\}]
Prepare directory "/home/stafusa/ALF/pyALF/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.05\_Mz=True" for
Monte Carlo run.
Resuming previous run.
Run /home/stafusa/Programs/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.1\_Mz=True" for
Monte Carlo run.
Resuming previous run.
Run /home/stafusa/Programs/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Hubbard\_N\_leg\_ladder\_L1=4\_L2=1\_Checke
rboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.15\_Mz=True" for
Monte Carlo run.
Resuming previous run.
Run /home/stafusa/Programs/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.
05\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.
1\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
Prepare directory "/home/stafusa/ALF/pyALF/Notebooks/ALF\_data/Hubbard\_N\_leg\_ladd
er\_L1=4\_L2=1\_Checkerboard=False\_Symm=True\_T=1.0\_U=4.0\_Tperp=0.0\_beta=2.0\_Dtau=0.
2\_Mz=True" for Monte Carlo run.
Create new directory.
Run /home/stafusa/ALF/ALF/Prog/Hubbard.out
\end{Verbatim}
\textbf{5.} Calculate the internal energies: