================================================================================
GENERAL
================================================================================
This repository contains the program code to reproduce the plots for the paper
"Color-dependent interactions in the three-coloring model". It consists of
three parts:
(1) C++ source code
(2) Python source code
(3) Python & gnuplot scripts
(1) contains the basic numerical C++ routines that generate a transfer matrix
and use the Arnoldi algorithm to obtain the largest eigenvalue from it. (2)
provides a set of functions that interact with the C++ files to easily obtain
the largest eigenvalues for an entire set of values of N (system size) and
xA,xB,xC (interaction parameters). The Python functions also use Numpy to fit
the finite-size scaling of the free energy, and therefore obtain the central
charge. (3) runs the Python functions with different parameters (e.g. number of
points for the plot, max system size, system size used for propagating sector
check, which plane or line in the phase space to plot etc.), and uses gnuplot
to visualise the output data.
To use this software, you will need:
* cmake
* NAG
* Eigen
* Python (with Numpy)
You can plot the data yourself or use the predefined scripts using:
* Python (with matplotlib)
Eigen is technically not used any more, but it's dependencies are built into
the C++ source code. You can also remove those dependencies and compile without
Eigen, but that's probably more work than just compiling with Eigen installed.
================================================================================
(1) C++ Code
================================================================================
You can find the source code in the folder "./src/" and build it by running the
following commands in the top-level directory:
mkdir build
cd build
cmake ../src/
cmake --build .
Before building, you should change the CMakeLists.txt file accordingly to point
towards the directory where Eigen is installed.
You should then add the executable binaries to your PATH by doing:
export PATH=$PATH:/path_to_repo/build/bin
You should then be able to run a small test:
threecol-ttm --out-dir=./ --N=18 --sparse-hash
echo "dp1,0.0,0.0,0.0,-100.00" > dp.txt
threecol-lev --sparse-hash tempTM-N\=18-sparse.out dp.txt
This will generate the template transfer matrix for N=18, and feed it the data
point (xA,xB,xC)=(0,0,0) to the software and asks it to compute the largest
eigenvalue. The program should give you an answer of something like: 33.4532.
================================================================================
(2) Python functions
================================================================================
The folder "./scripts" contains 7 files each containing functions that operate
on three-coloring data using either the C++ programs from above, Numpy or
matplotlib. Each function takes the enviroment variable "env" as an input
parameter. This should contain a list of strings telling the function the path
of the folder containing intermediate data files, output data files, and log
files.
* Cleaner.py Cleans up all data files and folders from earlier runs, and
creates all required folders if they do not exist yet.
* Fitter.py Obtains the central charge from a list of largest
eigenvalues for a given list of data points.
* LEVComputer.py Computes the largest eigenvalues for a list of data points
from a given transfer matrix.
* PlotterMPL.py Provides various functions to create 2D and 3D plots of the
raw data.
* PropagatingSect Takes a list of data points and checks for each point
orChecker.py whether its in the propagating sector or not.
* TTMComputer.py Computes the template transfer matrix for a given N.
* Workloader.py Creates a list of data points for a given line or 2D plane
of interest.
================================================================================
(3) Python functions
================================================================================
The folder "./runs/" contains 7 folders, each corresponding to a particular
graph. These graphs will show cross-sections of the phase space of the three-
coloring model. Some of the graphs are shown in the paper.
In each folder you can run:
* f01-run.py To run the Python functions and C++ programs to compute
the central charge for a defined set of data points.
* f02-fitting-onl To only do the fitting routine again to obtain the central
y.py charge from the larges eigenvalues.
* f03-plot.py To use the Python function "Plotter.plot" to generate
Mathematica scripts. These scripts will be automatically
executed and will create output files in PDF format.
* f04-plot-all.sh To run the gnuplot script for each output file present.
This aims to create the same output file as the Mathematica
scripts.
* f05-gnuplot.plt Has to be run with the option -e "plotname='identifier'",
where identifier is the name of the output file generated
(without the .txt ending). This will generate a LaTeX file
that can be converted into a PDF with pdflatex.
These scripts will create the following folders:
* d01-running-aux Intermediate output files (template transfer matrix, list
of data points, etc.).
* d02-running-out Final output files (list of data points with corresponding
value of the central charge).
* d03-running-log Log files from the C++ progams (if generated).
* d04-plotting-aux Intermediate files in the plotting process (LaTeX files).
* d05-plotting-out Final output files (PDF format).
================================================================================
(4) Naming conventions
================================================================================
This repository uses the following short-hand notations to refer to these
figures in paper / plots of the central charge.
p1: Fig. 7 / 2D back plane of the phase diagram where xA -> -1
p2: Fig. 12 / 2D cross section of the phase diagram showing c(xA, xB=xC)
p3: Fig. 13 / triangular 2D cross sections perpendicular to xA=xB=xC
l1: (not in the paper) / 1D line showing c(xC) for xA=-1, xB=-1
l3: Fig. 11 / 1D line showing c(x) for x=xA=xB=xC
l4: Fig. 9 / 1D line showing c(xA) for xB=xC=0
l5: Fig. 10 / 1D line showing c(x) x=xB=xC, xA=0