From f950c74e38d120e42637983d504f85843a63e95d Mon Sep 17 00:00:00 2001 From: Ian Jauslin Date: Wed, 4 Apr 2018 06:21:21 +0000 Subject: As presented at Princeton University on 2018-04-04 --- Jauslin_EL_2018.tex | 335 ++++++++++++++++++++++++++ Makefile | 50 ++++ README | 46 ++++ figs/dimer_conf.fig/Makefile | 32 +++ figs/dimer_conf.fig/dimer_conf.py | 251 +++++++++++++++++++ figs/dimer_conf.fig/libs/dimer.sty | 33 +++ figs/dimer_example.fig/Makefile | 1 + figs/dimer_example.fig/cover.tikz.tex | 20 ++ figs/dimer_example.fig/graph.tikz.tex | 10 + figs/dimer_example.fig/libs/dimer_example.sty | 66 +++++ figs/dimer_example.fig/mdcover.tikz.tex | 18 ++ figs/ising.fig/Makefile | 38 +++ figs/ising.fig/ising.py | 56 +++++ figs/ising.fig/libs/ising.sty | 9 + figs/libs/Makefile | 25 ++ figs/lieb_lattice.fig/Makefile | 1 + figs/lieb_lattice.fig/lieb_lattice.tikz.tex | 32 +++ figs/nematic.fig/Makefile | 15 ++ figs/nematic.fig/nematic-base.gp | 21 ++ figs/nematic.fig/nematic.py | 90 +++++++ figs/plan.fig/Makefile | 1 + figs/plan.fig/plan.tikz.tex | 34 +++ figs/temperley-lieb.fig/Makefile | 1 + figs/temperley-lieb.fig/tl1.tikz.tex | 15 ++ figs/temperley-lieb.fig/tl2.tikz.tex | 15 ++ figs/temperley-lieb.fig/tl3.tikz.tex | 15 ++ figs/temperley-lieb.fig/tl4.tikz.tex | 15 ++ figs/temperley-lieb.fig/tl5.tikz.tex | 15 ++ libs/ian-presentation.cls | 187 ++++++++++++++ 29 files changed, 1447 insertions(+) create mode 100644 Jauslin_EL_2018.tex create mode 100644 Makefile create mode 100644 README create mode 100644 figs/dimer_conf.fig/Makefile create mode 100644 figs/dimer_conf.fig/dimer_conf.py create mode 100644 figs/dimer_conf.fig/libs/dimer.sty create mode 120000 figs/dimer_example.fig/Makefile create mode 100644 figs/dimer_example.fig/cover.tikz.tex create mode 100644 figs/dimer_example.fig/graph.tikz.tex create mode 100644 figs/dimer_example.fig/libs/dimer_example.sty create mode 100644 figs/dimer_example.fig/mdcover.tikz.tex create mode 100644 figs/ising.fig/Makefile create mode 100644 figs/ising.fig/ising.py create mode 100644 figs/ising.fig/libs/ising.sty create mode 100644 figs/libs/Makefile create mode 120000 figs/lieb_lattice.fig/Makefile create mode 100644 figs/lieb_lattice.fig/lieb_lattice.tikz.tex create mode 100644 figs/nematic.fig/Makefile create mode 100644 figs/nematic.fig/nematic-base.gp create mode 100644 figs/nematic.fig/nematic.py create mode 120000 figs/plan.fig/Makefile create mode 100644 figs/plan.fig/plan.tikz.tex create mode 120000 figs/temperley-lieb.fig/Makefile create mode 100644 figs/temperley-lieb.fig/tl1.tikz.tex create mode 100644 figs/temperley-lieb.fig/tl2.tikz.tex create mode 100644 figs/temperley-lieb.fig/tl3.tikz.tex create mode 100644 figs/temperley-lieb.fig/tl4.tikz.tex create mode 100644 figs/temperley-lieb.fig/tl5.tikz.tex create mode 100644 libs/ian-presentation.cls diff --git a/Jauslin_EL_2018.tex b/Jauslin_EL_2018.tex new file mode 100644 index 0000000..01a3a21 --- /dev/null +++ b/Jauslin_EL_2018.tex @@ -0,0 +1,335 @@ +\documentclass{ian-presentation} + + +\usepackage[hidelinks]{hyperref} +\usepackage{graphicx} +\usepackage{xcolor} + +\definecolor {L67}{HTML}{4169E1} +\definecolor{SML64}{HTML}{4B0082} +\definecolor {TL71}{HTML}{DAA520} +\definecolor {HL72}{HTML}{DC143C} +\definecolor {HL79}{HTML}{32CD32} +\definecolor {L89}{HTML}{00CCCC} + +\begin{document} +\pagestyle{empty} +\hbox{}\vfil +\bf\Large +\hfil Dimers, Spins and Loops\par +\smallskip +\large\hfil Transfer Matrices, the TL Algebra and Emerging Fermions\par +\vfil +\large +\hfil Ian Jauslin +\vfil +\normalsize +\hfil\tt \href{http://ian.jauslin.org}{http://ian.jauslin.org} +\rm +\eject + +\setcounter{page}1 +\pagestyle{plain} + +\title{Outline} +\vfill +\hfil\includegraphics[width=5cm]{plan.pdf} +\hfil\parbox[b]{6.5cm}{ + \begin{itemize} + {\color{L67}\item [Li67] Dimers} + {\color{SML64}\item [SML64] 2D Ising} + {\color{TL71}\item [TL71] Temperley-Lieb algebras} + {\color{HL72}\item [HL72] Monomers and Dimers} + {\color{HL79}\item [HL79] Interacting Dimers} + {\color{L89}\item [Li89] Hubbard model} + \end{itemize} +} +\vfill +\eject + +\title{Dimers} +\vfill +\hfil\includegraphics[width=6cm]{graph.pdf} +\vfill +\eject + +\addtocounter{page}{-1} +\title{Dimer covering} +\vfill +\hfil\includegraphics[width=6cm]{cover.pdf} +\vfill +\eject + +\addtocounter{page}{-1} +\title{Monomer-Dimer configuration} +\vfill +\hfil\includegraphics[width=6cm]{mdcover.pdf} +\vfill +\eject + +\title{Counting dimer coverings} +\begin{itemize} + \item On planar graphs: + \href{http://dx.doi.org/10.1063/1.1703953}{[Kasteleyn, 1963]}, + \href{http://dx.doi.org/10.1080/14786436108243366}{[Temperley, Fisher, 1961]}: Pfaffian formula + $$Z\equiv\mathrm{number\ of\ coverings} = \mathrm{determinant}.$$ + \item {\color{L67}\href{http://dx.doi.org/10.1063/1.1705163}{{\bf E.H. Lieb}, {\it Solution of the Dimer Problem by the Transfer Matrix Method}, Journal of Mathematical Physics, 1967}}: on $M\times N$ discrete torus: + $$\lim_{M,N\to\infty}\frac1{MN}\log Z=\frac1{2\pi}\int_0^\pi dq\ \log\left(\sin q+\sqrt{1+\sin^2q}\right).$$ + \item Using a Transfer Matrix and Emergent Fermions. +\end{itemize} +\vfill +\eject + +\title{2D Ising} +\vskip-10pt +\begin{itemize} + \item {\it Spin} on every $x\in\mathbb Z^2$. Random configuration with probability + $$\frac1{Z(T)}e^{\frac1T\sum_{\left}\sigma_i\sigma_j}.$$ + \vskip-10pt +\end{itemize} +\vfill +\hfil\includegraphics[width=4cm]{ising.pdf} +\vfill +\eject + +\title{2D Ising} +\begin{itemize} + \item At $T\ll 1$, two phases: +\end{itemize} +\vfill +\hfil\includegraphics[width=4cm]{ising_blue.pdf} +\hfil\includegraphics[width=4cm]{ising_red.pdf} +\vfill +\eject + +\title{2D Ising} +\vfill +\begin{itemize} + \item Free energy: + $$f(T)=-T\lim_{M,N\to\infty}\frac1{MN}\log Z(T).$$ + \item Exact solution: + \href{http://dx.doi.org/10.1103/PhysRev.65.117}{[Onsager, 1944]}: + first example of a microscopic model with a phase transition. + \item {\color{SML64}\href{http://dx.doi.org/10.1103/RevModPhys.36.856}{{\bf T.D. Schultz, D.C. Mattis, E.H. Lieb}, {\it Two-Dimensional Ising Model as a Soluble Problem of Many Fermions}, Reviews of Modern Physics, 1964}}. +\end{itemize} +\vfill +\eject + +\title{2D Ising - Transfer Matrix} +\vfill +\hfil\includegraphics[width=4cm]{transfer1.pdf} +\vfill +\eject + +\addtocounter{page}{-1} +\title{2D Ising - Transfer Matrix} +\vfill +\hfil\includegraphics[width=4cm]{transfer2.pdf} +\vfill +\eject + +\title{2D Ising - Transfer Matrix} +\begin{itemize} + \item Transfer matrix: $V$, is a $2^M\times 2^M$ real symmetric matrix, and + $$Z(T)=\mathrm{Tr}(V^N).$$ + \item The free energy + $$f(T)=-T\lim_{N,M\to\infty}\frac1{NM}\log Z(T)=-\lim_{M\to\infty}\frac TM\log\lambda_M$$ + where $\lambda_M$ is the {\it largest} eigenvalue of $V$. +\end{itemize} +\vfill +\eject + +\title{2D Ising - Emergent Fermions} +\begin{itemize} + \item To diagonalize $V$: turn spins into Fermions using a {\it Jordan-Wigner} transformation. + \item Fermions: particle excitations. + \item {\it Non-interacting} Fermions: + $$V=(2\sinh(2JT^{-1}))^{\frac M2}e^{-\sum_q\epsilon_q(c_q^\dagger c_q-\frac12)}.$$ + \item Remark: in the {\it ice model} ({\it cf} Duminil-Copin), Fermions {\it interact}. + \item Remark: the Ising model with weak nearest neighbor interactions is mapped to a weakly interacting Fermion model \href{http://dx.doi.org/10.1063/1.4745910}{[Giuliani, Greenblatt, Mastropietro, 2012]}. +\end{itemize} +\vfill +\eject + +\title{Temperley-Lieb algebras} +\begin{itemize} + \vskip-12pt + \item {\color{TL71}\href{http://dx.doi.org/10.1098/rspa.1971.0067}{{\bf H.N.V. Temperley, E.H. Lieb}, {\it Relations between the `percolation' and `colouring' problem and other graph-theoretical problems associated with regular planar lattices: some exact results for the `percolation' problem}, Proceedings of the Royal Society of London A, 1971}}. + \item Compute {\it Whitney} polynomial on a square lattice + $$W(x,y)=\sum_Gx^{l_G-s_G}y^{s_G}.$$ + where $l_G$ is the number of lines and $s_G$ the number of cycles. + \item Related to counting the number of connected components in a random graph, and to the number of ways of coloring the $\mathbb Z^2$ lattice. + \item Transfer Matrix technique: difficult because the setting is non-Markovian. +\end{itemize} +\vfill +\eject + +\title{Temperley-Lieb algebras} +\begin{itemize} + \item In each row, keep track of who is connected to whom. + \item Graphical representation of the transfer matrix: +\end{itemize} +\vfill +\hfil\includegraphics[width=1cm]{tl1.pdf} +\hfil\includegraphics[width=1cm]{tl2.pdf} +\hfil\includegraphics[width=1cm]{tl3.pdf} +\hfil\includegraphics[width=1cm]{tl4.pdf} +\hfil\includegraphics[width=1cm]{tl5.pdf} +\begin{itemize} + \item Algebra generated by +\end{itemize} +\hfil\includegraphics[width=1cm]{tl1.pdf} +\hfil\includegraphics[width=1cm]{tl2.pdf} +\hfil\includegraphics[width=1cm]{tl3.pdf} +\begin{itemize} + \item Applications to knot theory, the Jones polynomial, braids, 2D Ising, quantum groups... +\end{itemize} +\vfill +\eject + +\title{Counting dimer coverings} +\begin{itemize} + \item {\color{L67}\href{http://dx.doi.org/10.1063/1.1705163}{{\bf E.H. Lieb}, {\it Solution of the Dimer Problem by the Transfer Matrix Method}, Journal of Mathematical Physics, 1967}}. + \item Similar approach to Schultz-Mattis-Lieb: Transfer Matrix/Fermions. + \item What if there are monomers? +\end{itemize} +\hfil\includegraphics[width=3cm]{cover.pdf} +\hfil\includegraphics[width=3cm]{mdcover.pdf} +\vfill +\eject + +\title{Monomer-Dimer} +\begin{itemize} + \vskip-10pt + \item {\color{HL72}\href{http://dx.doi.org/10.1007/BF01877590}{{\bf O.J. Heilmann, E.H. Lieb}, {\it Theory of monomer-dimer systems}, Communications in Mathematical Physics, 1972}}. + \item Random configuration of dimers: ($z$: {\it monomer fugacity}) + $$\frac{z^{\#\mathrm{monomers}}}{\Xi_G(z)}.$$ + \vskip-10pt + \item Free energy: + $$f(z):=-\lim_{\mathrm{Vol}\to\infty}\frac1{\mathrm{Vol}}\log(\Xi_G(z)).$$ + \item There is a {\it phase transition} when $f$ is singular. + \item Roots of $\Xi_G(z)$: {\it Lee-Yang} zeros. +\end{itemize} +\vfill +\eject + +\title{Monomer-Dimer} +\begin{itemize} + \item Recurrence relation: + $$\Xi_G(z)=z\Xi_{G\setminus\{i\}}+\sum_{j:(i,j)\in G}\Xi_{G\setminus\{i,j\}}(z).$$ + \item The Lee-Yang zeros lie in a bounded subset of the imaginary axis. + \item This result was recently used to solve the Kadison-Singer problem + \href{https://arxiv.org/abs/1408.4421}{[Marcus, Spielman, Srivastava, 2014]}. + \item No phase transitions in the monomer-dimer model! +\end{itemize} +\vfill +\eject + +\title{Dimers as particles} +\vfill +\hfil\includegraphics[width=6cm]{dimers.pdf} +\vfill +\eject + +\title{Interacting dimers} +\vfill +\hfil\includegraphics[width=6cm]{interaction.pdf} +\vfill +\eject + +\title{Heilmann-Lieb model} +\vfill +\begin{itemize} + \item {\color{HL79}\href{http://dx.doi.org/10.1007/BF01009518}{{\bf O.J. Heilmann, E.H. Lieb}, {\it Lattice models for liquid crystals}, Journal of Statistical Physics, 1979}}. + \item Long range orientational order: dimers are either mostly vertical or mostly horizontal (if the interaction is strong enough). + \item There is a phase transition! + \item Argument uses {\it reflection positivity} and a {\it chessboard estimate}. +\end{itemize} +\vfill +\eject + +\title{Hubbard model} +\begin{itemize} + \item {\color{L89}\href{http://dx.doi.org/10.1103/PhysRevLett.62.1201}{{\bf E.H. Lieb}, {\it Two Theorems on the Hubbard Model}, Physical Review Letters, 1989}}. + \item Electrons on a graph, with a local interaction. + \item If the interaction is repulsive, the graph is bipartite, and the number of electrons is equal to the number of vertices, then the spin of the ground state is + $$S=\frac12||B|-|A||$$ + where $|B|$ and $|A|$ are the numbers of vertices on the $B$- and $A$-subgraphs. + \item Uses reflection positivity in {\it spin space}. +\end{itemize} + +\title{Lieb lattice} +\vfill +\hfil\includegraphics[width=5cm]{lieb_lattice.pdf} +$$|B|=2|A|$$ +\vfill +\eject + +\title{Heilmann-Lieb model} +\vfill +\hfil\includegraphics[width=6cm]{interaction.pdf} +\vfill +\eject + +\title{Liquid crystals} +\vfill +\hfil\includegraphics[width=6cm]{nematic.png} +\vfill +\eject + +\title{Liquid crystals} +\vfill +\begin{itemize} + \item Orientational order {\it and} positional disorder. + \item Heilmann-Lieb: orientational order. + \item Conjecture: positional disorder. + \item Previous results: + \begin{itemize} + \item \href{http://dx.doi.org/10.1007/BF00535264}{[Bricmont, Kuroda, Lebowitz, 1984]}: hard needles in $\mathbb R^2$ with a {\it finite} number of orientations. + \item \href{http://dx.doi.org/10.1007/s10955-005-8085-8}{[Ioffe, Velenik, Zahradn\'\i k, 2006]}: hard rods in $\mathbb Z^2$ (variable length). + \item \href{http://dx.doi.org/10.1007/s00220-013-1767-1}{[Disertori, Giuliani, 2013]}: hard rods in $\mathbb Z^2$. + \end{itemize} +\end{itemize} + +\title{Nematic phase in the Heilmann-Lieb model} +\vfill +\begin{itemize} + \item Proof of positional disorder: \href{https://arxiv.org/abs/1709.05297}{[Jauslin, Lieb, 2017]} (uses Pirogov-Sinai theory). + \item Correlations between the positions of the dimers decay exponentially. + \item The rate of the decay is strongly anisotropic: in a vertical phase, the correlation length is very large in the vertical direction, and small in the horizontal. +\end{itemize} +\vfill +\eject + +\title{Pirogov-Sinai theory} +\vfill +\hfil\includegraphics[width=6cm]{dimer_contour.pdf} +\vfill +\eject + +\title{Summary} +\vfill +\hfil\includegraphics[width=5cm]{plan.pdf} +\hfil\parbox[b]{6.5cm}{ + \begin{itemize} + {\color{L67}\item [Li67] Dimers} + {\color{SML64}\item [SML64] 2D Ising} + {\color{TL71}\item [TL71] Temperley-Lieb algebras} + {\color{HL72}\item [HL72] Monomers and Dimers} + {\color{HL79}\item [HL79] Interacting Dimers} + {\color{L89}\item [Li89] Hubbard model} + \end{itemize} +} +\vfill +\eject + +\title{Macbeth - act V scene 8} +\vfill +\hfil[...] Before my body\par +\medskip +\hfil I throw my warlike shield. {\color{red}Lay on, Macduff},\par +\medskip +\hfil And damn'd be him that first cries, `Hold, enough!'\par + + +\end{document} diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3446836 --- /dev/null +++ b/Makefile @@ -0,0 +1,50 @@ +PROJECTNAME=$(basename $(wildcard *.tex)) +LIBS=$(notdir $(wildcard libs/*)) +FIGS=$(notdir $(wildcard figs/*.fig)) + +PDFS=$(addsuffix .pdf, $(PROJECTNAME)) +SYNCTEXS=$(addsuffix .synctex.gz, $(PROJECTNAME)) + +all: $(PROJECTNAME) + +$(PROJECTNAME): $(LIBS) $(FIGS) + pdflatex -file-line-error $@.tex + pdflatex -synctex=1 $@.tex + +$(SYNCTEXS): $(LIBS) $(FIGS) + pdflatex -synctex=1 $(patsubst %.synctex.gz, %.tex, $@) + + +$(LIBS): + ln -fs libs/$@ ./ + + +figs: $(FIGS) + +$(FIGS): + make -C figs/$@ + for pdf in $$(find figs/$@/ -name '*.pdf'); do ln -fs "$$pdf" ./ ; done + for png in $$(find figs/$@/ -name '*.png'); do ln -fs "$$png" ./ ; done + + +clean-aux: clean-figs-aux + rm -f $(addsuffix .aux, $(PROJECTNAME)) + rm -f $(addsuffix .log, $(PROJECTNAME)) + rm -f $(addsuffix .out, $(PROJECTNAME)) + +clean-libs: + rm -f $(LIBS) + +clean-figs: + $(foreach fig,$(addprefix figs/, $(FIGS)), make -C $(fig) clean; ) + rm -f $(notdir $(wildcard figs/*.fig/*.pdf)) + rm -f $(notdir $(wildcard figs/*.fig/*.png)) + +clean-figs-aux: + $(foreach fig,$(addprefix figs/, $(FIGS)), make -C $(fig) clean-aux; ) + + +clean-tex: + rm -f $(PDFS) $(SYNCTEXS) + +clean: clean-aux clean-tex clean-libs clean-figs diff --git a/README b/README new file mode 100644 index 0000000..8c6907c --- /dev/null +++ b/README @@ -0,0 +1,46 @@ +This directory contains the source files to typeset the presentation, and +generate the figures. This can be accomplished by running + make + +This document uses a custom class file, located in the 'libs' directory, which +defines a number of commands. + + +* Dependencies: + + pdflatex + TeXlive packages: + amsfonts + graphics + hyperref + latex + pgf + standalone + xcolor + GNU make + python3 + gnuplot + +* Files: + + Jauslin_EL_2018.tex: + main LaTeX file + + libs: + custom LaTeX class file + + figs: + source code for the figures + + figs/dimer_conf.fig/dimer_conf.py: + this python script randomly generates a suitable dimer configuration for + the figures grid.pdf, dimers.pdf, interaction.pdf and dimer_contour.pdf. + + figs/ising.fig/ising.py: + this python script randomly generates a suitable spin configuration for the + figures ising.pdf ising_blue.pdf ising_red.pdf transfer1.pdf transfer2.pdf. + + figs/nematic.fig/nematic.py: + this python script randomly generates configurations of non-overlapping + ellipsoids for nematic.png. + diff --git a/figs/dimer_conf.fig/Makefile b/figs/dimer_conf.fig/Makefile new file mode 100644 index 0000000..f4dcf58 --- /dev/null +++ b/figs/dimer_conf.fig/Makefile @@ -0,0 +1,32 @@ +PROJECTNAME=grid dimers interaction boundary dimer_contour +LIBS=$(notdir $(wildcard libs/*)) + +PDFS=$(addsuffix .pdf, $(PROJECTNAME)) +SOURCES=$(addsuffix .tikz.tex, $(PROJECTNAME)) + +all: $(PDFS) + +$(PDFS): $(SOURCES) $(LIBS) + echo $(LIBS) + pdflatex -jobname $(basename $@) -file-line-error $(patsubst %.pdf, %.tikz.tex, $@) + +$(SOURCES): + python3 dimer_conf.py + +$(LIBS): + ln -fs libs/$@ ./ + +clean-libs: + rm -f $(LIBS) + +clean-aux: + rm -f $(addsuffix .aux, $(PROJECTNAME)) + rm -f $(addsuffix .log, $(PROJECTNAME)) + +clean-tex: + rm -f $(PDFS) + +clean-sources: + rm -f $(SOURCES) + +clean: clean-libs clean-aux clean-tex clean-sources diff --git a/figs/dimer_conf.fig/dimer_conf.py b/figs/dimer_conf.fig/dimer_conf.py new file mode 100644 index 0000000..ec27036 --- /dev/null +++ b/figs/dimer_conf.fig/dimer_conf.py @@ -0,0 +1,251 @@ +#!/usr/bin/env python3 + +import random +from math import * + +# size of the grid +L=24 +# boundary thickness (must be even) +l0=4 +# activity and interaction +z=3 +J=5 + + +# draw random dimers in a select area +def fill_dimers(mask,direction): + if(direction=="h"): + d=[1,0] + else: + d=[0,1] + + dimers=[] + + # keep track of which sites are occupied + occupied=[] + for i in range(L): + occupied.append([]) + for j in range(L): + occupied[i].append(0) + + for i in range(10000): + # pick a random edge (indexed by its lower-left corner) + e=None + while(e==None or e[0]+d[0]>=L or e[1]+d[1]>=L or mask[e[0]][e[1]]==0 or mask[e[0]+d[0]][e[1]+d[1]]==0): + e=[random.randint(0,L-1),random.randint(0,L-1)] + # check whether a dimer can be added to the edge + if(occupied[e[0]][e[1]]==0 and occupied[e[0]+d[0]][e[1]+d[1]]==0): + # number of interactions + interactions=0 + if(e[0]+2*d[0]=0 and e[1]-d[1]>=0 and occupied[e[0]-d[0]][e[1]-d[1]]==1): + interactions=interactions+1 + # probability of adding the dimer + p=1/(1+1/z*exp(-J*interactions)) + if(p>random.random()): + # add dimer + dimers.append(e) + occupied[e[0]][e[1]]=1 + occupied[e[0]+d[0]][e[1]+d[1]]=1 + + return(dimers) + +# find interactions +def interactions(dimers,direction): + if(direction=="h"): + d=[1,0] + else: + d=[0,1] + + out=[] + for d1 in dimers: + for d2 in dimers: + if(d1[0]-d2[0]==2*d[0] and d1[1]-d2[1]==2*d[1]): + out.append([d2[0]+d[0],d2[1]+d[1]]) + return(out) + + +# draw dimers +def draw_dimers(v_dimers,h_dimers,file_desc,color): + for d in v_dimers: + print("\\dimer{[color="+color+"]("+str(d[0])+","+str(d[1])+")}v", file=file_desc) + print("", file=file_desc) + for d in h_dimers: + print("\\dimer{[color="+color+"]("+str(d[0])+","+str(d[1])+")}h", file=file_desc) + print("", file=file_desc) + +# draw interactions +def draw_interactions(v_interactions,h_interactions,file_desc): + for d in v_interactions: + print("\\interaction{("+str(d[0])+","+str(d[1])+")}v", file=file_desc) + print("", file=file_desc) + for d in h_interactions: + print("\\interaction{("+str(d[0])+","+str(d[1])+")}h", file=file_desc) + print("", file=file_desc) + +# draw loops +def draw_loops(loops,file_desc,color): + for loop in loops: + print("\\draw[color="+color+", line width=3pt]",end="",file=file_desc) + for e in loop: + print("("+str(e[0])+","+str(e[1])+")--",end="",file=file_desc) + print("cycle;",file=file_desc) + +# init tikz file +def init_tikz(filename): + file_desc=open(filename,"w") + print("\\documentclass{standalone}\n\n\\usepackage{tikz}\n\\usepackage{dimer}\n\\usetikzlibrary{decorations.pathmorphing}\n\n\\begin{document}\n\\begin{tikzpicture}\n\n", file=file_desc) + return(file_desc) + +# close tikz file +def close_tikz(file_desc): + print("\\end{tikzpicture}\n\\end{document}", file=file_desc) + file_desc.close() + + +mu=int(L/2) + +# loops +loop1=[] +for i in range(0,2*l0): + loop1.append([mu-l0+i,mu+4.5]) +for i in range(0,4): + loop1.append([mu+l0-1+0.5,mu+4-i]) +for i in range(0,l0): + loop1.append([mu+l0+i,mu+0.5]) +for i in range(0,6): + loop1.append([mu+2*l0-1+0.5,mu-i]) +for i in range(0,4*l0): + loop1.append([mu+2*l0-1-i,mu-5.5]) +for i in range(0,6): + loop1.append([mu-2*l0-0.5,mu-5+i]) +for i in range(0,l0): + loop1.append([mu-2*l0+i,mu+0.5]) +for i in range(0,4): + loop1.append([mu-l0-0.5,mu+1+i]) +# core of loop1 +core_loop1=[] +for i in range(0,2*l0-4): + core_loop1.append([mu-l0+2+i,mu+3.5]) +for i in range(0,3): + core_loop1.append([mu+l0-3+0.5,mu+3-i]) +core_loop1.append([mu+l0-2,mu+0.5]) +core_loop1.append([mu+l0-1,mu+0.5]) +for i in range(0,l0-2): + core_loop1.append([mu+l0+i,mu-1+0.5]) +for i in range(0,4): + core_loop1.append([mu+2*l0-3+0.5,mu-1-i]) +for i in range(0,4*l0-4): + core_loop1.append([mu+2*l0-3-i,mu-4.5]) +for i in range(0,4): + core_loop1.append([mu-2*l0+2-0.5,mu-4+i]) +for i in range(0,l0-2): + core_loop1.append([mu-2*l0+2+i,mu-1+0.5]) +core_loop1.append([mu-l0,mu+0.5]) +core_loop1.append([mu-l0+1,mu+0.5]) +for i in range(0,3): + core_loop1.append([mu-l0+2-0.5,mu+1+i]) + +loop2=[[mu-1,mu+2.5],[mu-0.5,mu+2],[mu-0.5,mu+1],[mu-1,mu+0.5],[mu-1.5,mu+1],[mu-1.5,mu+2]] +loop3=[[mu-1,mu-1.5],[mu,mu-1.5],[mu+0.5,mu-2],[mu+0.5,mu-3],[mu,mu-3.5],[mu-1,mu-3.5],[mu-1.5,mu-3],[mu-1.5,mu-2]] + + +loops=[loop1,loop2,loop3] + + +# masks +# init +v_mask=[] +h_mask=[] +for i in range(L): + v_mask.append([]) + h_mask.append([]) + for j in range(L): + v_mask[i].append(1) + h_mask[i].append(0) +# draw masks +for i in range(mu-l0,mu+l0): + for j in range(mu+1,mu+5): + v_mask[i][j]=0 +for i in range(mu-2*l0,mu+2*l0): + for j in range(mu-5,mu+1): + v_mask[i][j]=0 +for i in range(mu-l0+2,mu+l0-2): + for j in range(mu+1,mu+4): + h_mask[i][j]=1 +for i in range(mu-l0,mu+l0): + h_mask[i][mu]=1 +for i in range(mu-2*l0+2,mu+2*l0-2): + for j in range(mu-4,mu): + h_mask[i][j]=1 +h_mask[mu-1][mu+1]=0 +h_mask[mu-1][mu+2]=0 +h_mask[mu-1][mu-3]=0 +h_mask[mu-1][mu-2]=0 +h_mask[mu][mu-3]=0 +h_mask[mu][mu-2]=0 + +# random dimers in mask +v_dimers=fill_dimers(v_mask,"v") +h_dimers=fill_dimers(h_mask,"h") + +# mantle dimers +h_mantle=[] +for i in range(0,l0): + h_mantle.append([mu-l0+2*i,mu+4]) +for i in range(0,4): + h_mantle.append([mu+l0-2,mu+4-i]) + h_mantle.append([mu-l0,mu+4-i]) +for i in range(0,int(l0/2)): + h_mantle.append([mu+l0+2*i,mu]) + h_mantle.append([mu-l0-2-2*i,mu]) +for i in range(0,5): + h_mantle.append([mu+2*l0-2,mu-i]) + h_mantle.append([mu-2*l0,mu-i]) +for i in range(0,2*l0): + h_mantle.append([mu-2*l0+2*i,mu-5]) + +v_mantle=[] +v_mantle.append([mu-1,mu+1]) +v_mantle.append([mu-1,mu-3]) +v_mantle.append([mu,mu-3]) + +# interactions +v_interactions=interactions(v_dimers+v_mantle,"v") +h_interactions=interactions(h_dimers+h_mantle,"h") + + +# files + +grid=init_tikz("grid.tikz.tex") +print("\\grid{"+str(L-1)+"}{"+str(L-1)+"}{(0,0)}\n", file=grid) +close_tikz(grid) + +dimers=init_tikz("dimers.tikz.tex") +print("\\grid{"+str(L-1)+"}{"+str(L-1)+"}{(0,0)}\n", file=dimers) +draw_dimers(v_dimers+v_mantle,h_dimers+h_mantle,dimers,"black") +close_tikz(dimers) + +interaction=init_tikz("interaction.tikz.tex") +print("\\grid{"+str(L-1)+"}{"+str(L-1)+"}{(0,0)}\n", file=interaction) +draw_interactions(v_interactions,h_interactions,interaction) +draw_dimers(v_dimers+v_mantle,h_dimers+h_mantle,interaction,"black") +close_tikz(interaction) + +boundary=init_tikz("boundary.tikz.tex") +print("\\fill[color=cyan](-0.5,-0.5)--++("+str(L)+",0)--++(0,"+str(l0)+")--++("+str(-L)+",0)--cycle;", file=boundary) +print("\\fill[color=cyan](-0.5,"+str(L-l0-0.5)+")--++("+str(L)+",0)--++(0,"+str(l0)+")--++("+str(-L)+",0)--cycle;", file=boundary) +print("", file=boundary) +print("\\grid{"+str(L-1)+"}{"+str(L-1)+"}{(0,0)}\n", file=boundary) +draw_dimers(v_dimers+v_mantle,h_dimers+h_mantle,boundary,"black") +close_tikz(boundary) + +contour=init_tikz("dimer_contour.tikz.tex") +print("\\grid{"+str(L-1)+"}{"+str(L-1)+"}{(0,0)}\n", file=contour) +draw_loops([loop1,loop2,loop3],contour,"blue") +draw_interactions(v_interactions,h_interactions,contour) +draw_dimers(v_dimers,h_dimers,contour,"black") +draw_dimers(v_mantle,h_mantle,contour,"black") +close_tikz(contour) + diff --git a/figs/dimer_conf.fig/libs/dimer.sty b/figs/dimer_conf.fig/libs/dimer.sty new file mode 100644 index 0000000..0f087ef --- /dev/null +++ b/figs/dimer_conf.fig/libs/dimer.sty @@ -0,0 +1,33 @@ +% square lattice (width #1, height #2, origin #3) +\def\grid#1#2#3{ + \foreach\i in {0,...,#2}{ + \draw#3++(0,\i)--++(#1,0); + } + \foreach\i in {0,...,#1}{ + \draw#3++(\i,0)--++(0,#2); + } +} + +% dimer (bottom-left vertex #1, vertical or horizontal #2) +\def\dimer#1#2{ + \if#2h + \draw[line width=5pt]#1--++(1,0); + \fill#1circle(7pt); + \fill#1++(1,0)circle(7pt); + \else + \draw[line width=5pt]#1--++(0,1); + \fill#1circle(7pt); + \fill#1++(0,1)circle(7pt); + \fi +} + +% interactions (bottom-left vertex #1, vertical or horizontal #2) +\def\interaction#1#2{ + \if#2h + \draw[line width=5pt, color=white]#1--++(1,0); + \draw[line width=4pt, decorate, decoration={snake}, color=red]#1--++(1,0); + \else + \draw[line width=5pt, color=white]#1--++(0,1); + \draw[line width=4pt, decorate, decoration={snake}, color=red]#1--++(0,1); + \fi +} diff --git a/figs/dimer_example.fig/Makefile b/figs/dimer_example.fig/Makefile new file mode 120000 index 0000000..704310e --- /dev/null +++ b/figs/dimer_example.fig/Makefile @@ -0,0 +1 @@ +../libs/Makefile \ No newline at end of file diff --git a/figs/dimer_example.fig/cover.tikz.tex b/figs/dimer_example.fig/cover.tikz.tex new file mode 100644 index 0000000..3f6b32c --- /dev/null +++ b/figs/dimer_example.fig/cover.tikz.tex @@ -0,0 +1,20 @@ +\documentclass{standalone} +\usepackage{tikz} +\usepackage{dimer_example} + +\begin{document} +\hfil\begin{tikzpicture} +\basegraph + +\draw[line width=3pt](A2)--(A3); +\draw[line width=3pt](A1)--(D4); +\draw[line width=3pt](D3)--(D2); +\draw[line width=3pt](A8)--(D1); +\draw[line width=3pt](C1)--(A4); +\draw[line width=3pt](A5)--(A6); +\draw[line width=3pt](A7)--(B3); +\draw[line width=3pt](B1)--(B2); + +\end{tikzpicture} + +\end{document} diff --git a/figs/dimer_example.fig/graph.tikz.tex b/figs/dimer_example.fig/graph.tikz.tex new file mode 100644 index 0000000..a628122 --- /dev/null +++ b/figs/dimer_example.fig/graph.tikz.tex @@ -0,0 +1,10 @@ +\documentclass{standalone} +\usepackage{tikz} +\usepackage{dimer_example} + +\begin{document} +\hfil\begin{tikzpicture} +\basegraph +\end{tikzpicture} + +\end{document} diff --git a/figs/dimer_example.fig/libs/dimer_example.sty b/figs/dimer_example.fig/libs/dimer_example.sty new file mode 100644 index 0000000..46eb35b --- /dev/null +++ b/figs/dimer_example.fig/libs/dimer_example.sty @@ -0,0 +1,66 @@ +\def\basegraph{ + \path(0,0)++(-135:3)coordinate(A1); + \path(0,0)++( -90:3)coordinate(A2); + \path(0,0)++( -45:3)coordinate(A3); + \path(0,0)++( 0:3)coordinate(A4); + \path(0,0)++( 45:3)coordinate(A5); + \path(0,0)++( 90:3)coordinate(A6); + \path(0,0)++( 135:3)coordinate(A7); + \path(0,0)++( 180:3)coordinate(A8); + + \path(0,0)++(-0.5,1)coordinate(B1); + \path(B1)++(1,0)coordinate(B2); + \path(B2)++(120:1)coordinate(B3); + + \path(0,0)coordinate(C1); + + \path(0,0)++(-0.5,-1)coordinate(D1); + \path(D1)--++(1,0)coordinate(D2); + \path(D2)--++(0,-1)coordinate(D3); + \path(D3)--++(-1,0)coordinate(D4); + + \draw(A1)--(A2); + \draw(A2)--(A3); + \draw(A3)--(A4); + \draw(A4)--(A5); + \draw(A5)--(A6); + \draw(A6)--(A7); + \draw(A7)--(A8); + \draw(A8)--(A1); + + \draw(B1)--(B2); + \draw(B2)--(B3); + \draw(B3)--(B1); + + \draw(A8)--(C1); + \draw(C1)--(A4); + + \draw(D1)--(D2); + \draw(D2)--(D3); + \draw(D4)--(D2); + + \draw(A4)--(A6); + \draw(B1)--(A8); + \draw(B1)--(A7); + \draw(B3)--(A6); + \draw(B3)--(A7); + \draw(B2)--(A4); + + \draw(D1)--(A8); + \draw(D1)--(A1); + \draw(D4)--(A1); + \draw(D3)--(A3); + \draw(D2)--(A4); + + + \foreach \i in {1,...,8}{ + \fill(A\i)circle(0.1); + } + \fill(B1)circle(0.1); + \fill(B2)circle(0.1); + \fill(B3)circle(0.1); + \fill(C1)circle(0.1); + \foreach\i in {1,...,4}{ + \fill(D\i)circle(0.1); + } +} diff --git a/figs/dimer_example.fig/mdcover.tikz.tex b/figs/dimer_example.fig/mdcover.tikz.tex new file mode 100644 index 0000000..4752da8 --- /dev/null +++ b/figs/dimer_example.fig/mdcover.tikz.tex @@ -0,0 +1,18 @@ +\documentclass{standalone} +\usepackage{tikz} +\usepackage{dimer_example} + +\begin{document} +\hfil\begin{tikzpicture} +\basegraph + +\draw[line width=3pt](A2)--(A3); +\draw[line width=3pt](A1)--(A8); +\draw[line width=3pt](D4)--(D2); +\draw[line width=3pt](C1)--(A4); +\draw[line width=3pt](B3)--(A6); +\draw[line width=3pt](A7)--(B1); + +\end{tikzpicture} + +\end{document} diff --git a/figs/ising.fig/Makefile b/figs/ising.fig/Makefile new file mode 100644 index 0000000..eeff491 --- /dev/null +++ b/figs/ising.fig/Makefile @@ -0,0 +1,38 @@ +PROJECTNAME=ising ising_blue ising_red transfer1 transfer2 +LIBS=$(notdir $(wildcard libs/*)) + +PDFS=$(addsuffix .pdf, $(PROJECTNAME)) +SOURCES=$(addsuffix .tikz.tex, $(PROJECTNAME)) + +all: $(PDFS) + +$(PDFS): $(SOURCES) $(LIBS) + echo $(LIBS) + pdflatex -jobname $(basename $@) -file-line-error $(patsubst %.pdf, %.tikz.tex, $@) + +$(SOURCES): + python3 ising.py + +install: $(PDFS) + cp $^ $(INSTALLDIR)/ + +install-sources: $(SOURCES) + cp $^ $(INSTALLDIR)/ + +$(LIBS): + ln -fs libs/$@ ./ + +clean-libs: + rm -f $(LIBS) + +clean-aux: + rm -f $(addsuffix .aux, $(PROJECTNAME)) + rm -f $(addsuffix .log, $(PROJECTNAME)) + +clean-tex: + rm -f $(PDFS) + +clean-sources: + rm -f $(SOURCES) + +clean: clean-libs clean-aux clean-tex clean-sources diff --git a/figs/ising.fig/ising.py b/figs/ising.fig/ising.py new file mode 100644 index 0000000..8dd1447 --- /dev/null +++ b/figs/ising.fig/ising.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python3 + +import random +from math import * + +# size of the grid +L=8 + +# draw spins, probability of reds: p, only fill up to H +def draw_spins(p, H, file_desc): + for i in range(L): + for j in range(H): + if(random.random()> $(patsubst %.png, %, $@).gp + gnuplot $(patsubst %.png, %, $@).gp > $@ + +clean-aux: + rm -f $(addsuffix .gp, $(PROJECTNAME)) + +clean: clean-aux + rm -f $(PNGS) diff --git a/figs/nematic.fig/nematic-base.gp b/figs/nematic.fig/nematic-base.gp new file mode 100644 index 0000000..4de0ee2 --- /dev/null +++ b/figs/nematic.fig/nematic-base.gp @@ -0,0 +1,21 @@ +set terminal pngcairo size 2048,2048 + +set key off +unset colorbox +unset border +unset xtics +unset ytics +unset ztics + +set parametric + +set view equal xyz + +set isosample 100 + +set pm3d depthorder +set pm3d lighting primary 0.50 specular 0.6 + +set palette defined (0 "#339999", 1 "#339999") + +splot \ diff --git a/figs/nematic.fig/nematic.py b/figs/nematic.fig/nematic.py new file mode 100644 index 0000000..5c779c0 --- /dev/null +++ b/figs/nematic.fig/nematic.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python3 + +from math import * +import random + +# size of space +L=30 +# number of rods +N=75 +# aspect ratio +a=10 +# spread in theta angle +spread=pi/30 + +# check whether two rods overlap +def check_overlap(rod1,rod2): + # relative placement + relative_pos=unrotate(subtract(rod2[0],rod1[0]), rod1[1]) + if(abs(relative_pos[0])<2 and abs(relative_pos[1])<2 and abs(relative_pos[2])<2): + return(True) + # relative angle + relative_ang=cart_to_spherical(unrotate(spherical_to_cart(rod2[1]), rod1[1])) + # exclusion volume + # rotate other rod + relative_pos=unrotate(relative_pos, [0,relative_ang[1]]) + #if(abs(relative_pos[1])<2 and abs(relative_pos[0])-21 and abs(c)<1.0001): + if(c>0): + return([w[0],0]) + else: + return([w[0],pi]) + if(s>=0): + return([w[0],acos(c)]) + return([w[0],2*pi-acos(c)]) + +# configuration +config=[] +# add rods +while len(config)