From 743bbfd8a4a2a4173f309e1be98712f316fdf797 Mon Sep 17 00:00:00 2001 From: Ian Jauslin Date: Fri, 29 Sep 2017 03:55:25 +0000 Subject: As presented at the IAS on 2017-09-29 --- Jauslin_IAS-Postdoc_2017.tex | 66 ++++++++++++ Makefile | 50 +++++++++ README | 41 ++++++++ figs/dimer_example.fig/Makefile | 32 ++++++ figs/dimer_example.fig/dimer_conf.py | 170 +++++++++++++++++++++++++++++++ figs/dimer_example.fig/libs/dimer.sty | 33 ++++++ figs/nematic.fig/Makefile | 12 +++ figs/nematic.fig/nematic-base.gp | 21 ++++ figs/nematic.fig/nematic.py | 89 ++++++++++++++++ libs/ian-presentation.cls | 187 ++++++++++++++++++++++++++++++++++ 10 files changed, 701 insertions(+) create mode 100644 Jauslin_IAS-Postdoc_2017.tex create mode 100644 Makefile create mode 100644 README create mode 100644 figs/dimer_example.fig/Makefile create mode 100644 figs/dimer_example.fig/dimer_conf.py create mode 100644 figs/dimer_example.fig/libs/dimer.sty 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 100644 libs/ian-presentation.cls diff --git a/Jauslin_IAS-Postdoc_2017.tex b/Jauslin_IAS-Postdoc_2017.tex new file mode 100644 index 0000000..c1b22a2 --- /dev/null +++ b/Jauslin_IAS-Postdoc_2017.tex @@ -0,0 +1,66 @@ +\documentclass{ian-presentation} + +\usepackage[hidelinks]{hyperref} +\usepackage{graphicx} + +\begin{document} +\pagestyle{empty} +\hbox{}\vfil +\bf\Large +\hfil Liquid crystals\par +\smallskip +\hfil and interacting dimers\par +\vfil +\large +\hfil Ian Jauslin +\normalsize +\vfil +\hfil\rm joint with {\bf Elliott H. Lieb}\par +\vfil +arXiv:{\tt \href{http://arxiv.org/abs/1709.05297}{1709.05297}}\hfill{\tt \href{http://ian.jauslin.org}{http://ian.jauslin.org}} +\eject + +\setcounter{page}1 +\pagestyle{plain} + +\title{Nematic liquid crystals} +\vfil +\hfil\includegraphics[width=6cm]{nematic.png} +\vfil\eject + +\title{Nematic liquid crystals} +\vfil +\begin{itemize} + \item {\bf Long range orientational order}: molecules tend to align, and maintain their alignment over macroscopic distances. + \item {\bf No positional order}: the locations of the centers of the molecules are decorrelated. +\end{itemize} +\vfil\eject + +\title{Heilmann-Lieb model} +\hfil[Heilmann, Lieb, 1979] +\vfil +\hfil\includegraphics[width=5cm]{interaction.pdf} +\vfil\eject + +\title{Heilmann-Lieb model} +\begin{itemize} + \item Probability of a configuration (grand-canonical Gibbs distribution): + $$ + \mathrm{Prob}(\mathrm{conf})=\frac1\Xi z^{\#\mathrm{particles}}e^{J\ \#\mathrm{interactions}} + $$ + \begin{itemize} + \item $\Xi$: partition function + \item $z\geqslant 0$: activity + \item $J\geqslant 0$: interaction strength + \end{itemize} + \item Regime $J\gg z\gg 1$. +\end{itemize} + +\title{[Heilmann, Lieb, 1979]} +\vfil +\begin{itemize} + \item {\it Theorem}: given $x,y\in\mathbb Z^2$, the probability that there is a horizontal dimer attached to $x$ and no horizontal dimer attached to $y$ tends to 0 as $J,z\to\infty$. ({\bf Orientational order}.) + \item {\it Conjecture}: given to edges $e$ and $e'$, the probability of finding a dimer on $e$ and another on $e'$ is independent of $e$ and $e'$, up to a term that decays {\it exponentially} in $\mathrm{dist}(e,e')$. ({\bf No positional order}.) +\end{itemize} + +\end{document} diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fa0fd61 --- /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/$@ + if [ -e figs/$@/*.pdf ]; then ln -fs figs/$@/*.pdf ./ ; fi + if [ -e figs/$@/*.png ]; then ln -fs figs/$@/*.png ./ ; fi + + +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..642e9dd --- /dev/null +++ b/README @@ -0,0 +1,41 @@ +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 + GNU make + python3 + gnuplot + +* Files: + + Jauslin_IAS-Postdoc_2017.tex: + main LaTeX file + + libs: + custom LaTeX class file + + figs: + source code for the figures + + figs/dimer_example.fig/dimer_conf.py: + this python script randomly generates a suitable dimer configuration for + the figure interaction.pdf + + figs/nematic.fig/nematic.py: + this python script randomly generates a configuration of non-overlapping + ellipsoids for the figure nematic.png + diff --git a/figs/dimer_example.fig/Makefile b/figs/dimer_example.fig/Makefile new file mode 100644 index 0000000..0596f04 --- /dev/null +++ b/figs/dimer_example.fig/Makefile @@ -0,0 +1,32 @@ +PROJECTNAME=interaction +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_example.fig/dimer_conf.py b/figs/dimer_example.fig/dimer_conf.py new file mode 100644 index 0000000..ce918e7 --- /dev/null +++ b/figs/dimer_example.fig/dimer_conf.py @@ -0,0 +1,170 @@ +#!/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) + +# 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) + +# 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 + +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) + diff --git a/figs/dimer_example.fig/libs/dimer.sty b/figs/dimer_example.fig/libs/dimer.sty new file mode 100644 index 0000000..0f087ef --- /dev/null +++ b/figs/dimer_example.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/nematic.fig/Makefile b/figs/nematic.fig/Makefile new file mode 100644 index 0000000..ecd0041 --- /dev/null +++ b/figs/nematic.fig/Makefile @@ -0,0 +1,12 @@ +all: nematic.png + +nematic.png: + cp nematic-base.gp nematic.gp + python nematic.py >> nematic.gp + gnuplot nematic.gp > nematic.png + +clean-aux: + rm -f nematic.gp + +clean: clean-aux + rm -f nematic.png diff --git a/figs/nematic.fig/nematic-base.gp b/figs/nematic.fig/nematic-base.gp new file mode 100644 index 0000000..e583994 --- /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 50 + +set pm3d depthorder +set pm3d lighting primary 0.50 specular 0.6 + +set palette defined (0 "#339999") + +splot \ diff --git a/figs/nematic.fig/nematic.py b/figs/nematic.fig/nematic.py new file mode 100644 index 0000000..ef24733 --- /dev/null +++ b/figs/nematic.fig/nematic.py @@ -0,0 +1,89 @@ +#!/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,rod2[1][1]]) + if(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)