DOI: 10.5061/dryad.zpc866tnv
title: Data and code from: Random knotting in very long off-lattice self-avoiding polygons

description: We present experimental results on knotting in off-lattice self-avoiding
 polygons in the bead-chain model. Using Clisby's tree data structure
 and the scale-free pivot algorithm, for each n between 10 and 27, we
 generated 243–n polygons of size 2*n*. Using a new knot diagram
 simplification and invariant-free knot classification code, we were able
 to determine the precise knot type of each polygon. The results show that
 the number of prime summands of knot type K in a random n-gon is very well
 described by a Poisson distribution. We estimate the characteristic length
 of knotting as 656,500 ± 2500. We also make new calculations for knotting
 rates and amplitude ratios of knot probabilities. We find that our
 calculations agree quite well with previous on-lattice computations. Our
 results support the idea of knot localization and the knot entropy
 conjecture.
description: # Data and code from: Random knotting in very long off-lattice
 self-avoiding polygons Dataset DOI:
 [10.5061/dryad.zpc866tnv](https://doi.org/10.5061/dryad.zpc866tnv) ##
 Description of the data and file structure Files are stored in plain text
 formats. ### Files and variables ####
 mean_number_of_summands_and_tv_distance_to_poisson.tsv This tab-separated
 file contains computed values of *λ~K~(n)*, our estimate of the expected
 number of factors of knot type *K* in a random self-avoiding *n*-gon,
 together with standard errors and total variation (TV) distance from the
 empirical distribution to the Poisson distribution with the same mean.
 #### _observed_summands.tsv These tab-separated files contain
 observation data for the number of *N*-gons with *m* summands of knot type
 *K*. In each file, the first entry of each row is *N*, and the remaining
 entries list the various observed *m*'s and the number of polygons
 with that many factors of *K*. For example, the file
 `5_2_observed_summands.tsv` contains observation data of the 5~2~ knot.
 The sixth row is: `32768 0 268317594 1 79454 2 8` This indicates that,
 among the 32,768-gons, we saw 268,317,594 polygons with no 5~2~ factors,
 79,454 with one 5~2~ factor, and 8 with two 5~2~ factors. ####
 pfruns-large.zip This file contains the raw data underlying the summary
 and computed data in the above files. This file expands to a directory
 `pfruns-large` containing a number of directories with names of the form
 `2-to-the-n-gons` for *n* an integer ranging from 10 to 27. Each such
 directory contains the raw data for 2^n^-gons. At the next level down in
 the directory hierarchy is a collection of 64 (for *n* ≤ 26) or 128 (for
 *n* = 27) directories with names of the form `xxxx`, corresponding to
 different parallel runs of the polygonal fold Markov chain. Finally inside
 each `pfruns-large/2-to-the-n-gons/xxxx` directory are 3 files: * `Info.m`
 is a Wolfram Language package file containing an `Association` object with
 summary information about the run. For reproducibility, perhaps the most
 important information can be found in `"Initialization"`. In
 particular, `"Git Hash"` gives the Git hash of the version of
 [Knoodle](https://github.com/HenrikSchumacher/Knoodle) that produced this
 run. * `MacLeod.txt` gives the prime factors of recorded polygon in the
 run. The format of this file is explained more below. * `Tools_Log.txt`
 records any warnings generated during the run. #### MacLeod.txt
 `MacLeod.txt` gives the knot type of each recorded polygon in a highly
 compressed format. Each line of this file is in one of the following
 forms: * `u ` This indicates a run of *n* consecutive unknots. *
 `k` This is the start of a new nontrivial knot. The lines between this `k`
 and the next `u ` or `k` line give the prime factors of this
 knot. * `T+ ` There are *n* positive trefoils in the knot. * `T-
 ` There are *n* negative trefoils in the knot. * `F8 `
 There are *n* figure-eight factors in the knot. * `s &lt;0/1&gt; |
 `: This is a factor which is not recognizably a trefoil or
 figure-eight. The `&lt;0/1&gt;` is 1 if this factor is provably minimal,
 and 0 otherwise. The `` is a short MacLeod code for the knot
 which can be converted by
 [Knoodle](https://github.com/HenrikSchumacher/Knoodle) to a planar diagram
 object for further analysis. Because MacLeod codes are not guaranteed to
 be backwards-compatible, please be sure to analyze these codes with the
 version of [Knoodle](https://github.com/HenrikSchumacher/Knoodle)
 indicated in the `"Git Hash"` in the associated `Info.m` file.
 For example: * Lines 1–10 of
 `pfruns-large/2-to-the-16-gons/afsb/Macleod.txt` are `u 5` `k` `T+ 1` `u
 2` `k` `T+ 2` `T- 1` `k` `T+ 1` `u 15` This indicates that this run
 started with 5 unknots, followed by a positive trefoil, another 2 unknots,
 a composite knot with 2 positive trefoil factors and 1 negative trefoil
 factor, then a positive trefoil, and then 15 consecutive unknots. * Lines
 17–21 of `pfruns-large/2-to-the-25-gons/bfsb/MacLeod.txt` are: `k` `T+ 40`
 `T- 34` `F8 2` `s 1 | 31 21 15 21 23` Since this is the fifth instance of
 `k` in the file, this indicates that the fifth recorded 2^25^-gon in this
 run was a knot with 40 positive trefoil factors, 34 negative trefoils, 2
 figure-eights, and one additional factor with a diagram with short MacLeod
 code `31 21 15 21 23`. This is a 5-crossing diagram which is provably
 minimal (hence the `1` after the `s`) because it is reduced and
 alternating. [Knoodle](https://github.com/HenrikSchumacher/Knoodle) easily
 identifies this factor as a 5~2~ knot. ## Code/software All data was
 generated by and analyzed with
 [Knoodle](https://github.com/HenrikSchumacher/Knoodle). The Git hash of
 the version of Knoodle which produced and analyzed a particular run is
 recorded in `"Git Hash"` in the associated `Info.m` file.