# XY model on a self-avoiding walk

Kamilla Faizullina  Evgeni Burovski  HSE University, 101000 Moscow, Russia

###### Abstract

We study a lattice model of a magnetic polymer where the XY spin variables are
located on a self-avoiding walk (SAW) on a regular lattice in two and three
dimensions. We consider the regime where both spins and conformations are
dynamic, thus the XY model is defined on a dynamic lattice and conformations
generate an annealed disorder. Using Monte Carlo simulations, we characterize
the globule-coil and ferromagnetic phase transitions, and pay special
attention to the vicinity of the theta-point. Our numerical results suggest
that the transitions are continuous in two dimensions and first-order in three
dimensions, which is similar to related models with Ising spins.

##  I Introduction

Coarse-grained modelling is a commonly used approach to study structural
properties of polymeric materials [1]. One of the models of a macromolecule is
a linear polymer which is represented by an interacting (also known as
collapsing) self-avoiding walk (SAW). Self-avoiding walks allows to include
excluded volume effects for polymers in a good solvent. Van der Waals type
attraction is modelled via including the nearest neighbour monomer attraction.
Critical phenomena take place in the infinite systems in second order phase
transition which is defined as a singularity of free-energy function (see
Chap.3 in Ref [2]).

In the simplest case, a homopolymer chain consists of one type monomers. The
polymers with different types of subunits are called heteropolymers. The
simplest heteropolymer model is Hydrophobic-polar (HP) model of protein [3].
It assumes that the sequence of monomers types are fixed. This model was
introduced to approximate the folding process of protein and mostly used for
development algorithms to find minimum energy states (for example, [4, 5]).
This model also was used to explore conformations space of proteins [6].
Recently, the dynamical case of HP model was studied [7]. In that dynamics,
sequence of monomers and geometry structure are not fixed . Computational
results are consistent with the assumption that dynamical HP model and an
interacting homopolymer have the similar behaviour in phase transition point
and they are in the same universality class at the conformational transition
point.

To represent the ferromagnetic properties of polymer materials self-avoiding
walk models with spin dynamics were introduced [8]. Ising model is the
simplest example of system which undergoes a phase transition between ordered
and disordered states. These models were studied it for 2D and 3D lattices [8,
9] using mean-field theory and Monte-Carlo simulations. This model was studied
using Monte-Carlo methods for long chains [10, 11] on regular square lattices.
Computational results show that the transition between swollen and collapsed
phases is second-order in 2D case and first-order magnetic transition on 3D
lattice with undergoing swollen/collapsed states transition.

Recently, magnetic polymers were studied on Sierpiński triangle in 3D [12],
where renormalisation group approach was used to present phase diagram showing
magnetic and conformational phases.

The other example of magnetic polymer is Potts-like model on SAWs. This model
in case of regular lattice was introduced to represent vulcanization [13].
Recently, Potts-like model was studied for Bethe lattice [14].

Previous work was for Ising spins, and in this work, we extend to XY model
where spin variables are continuous. Original XY model on regular 2D square
lattice has a topological order, which was proposed theoretically and named
Kosterlitz-Thouless (KT) phase transition [15]. As other spin models,
classical 2D was studied numerically using Monte-Carlo methods [16, 17].

In this work, we explore XY model on SAWs for 2D and 3D lattices in lack of an
external field. We construct Monte-Carlo algorithm to study this system at the
phase transition region.

##  II Model and method

Model. A polymer conformation of the length $N$ is a self-avoiding walk (SAW)
with $N-1$ edges and $N$ nodes on a regular lattice. Each $i$th node
represents a spin-like variable $s_{i}$ which is associated with angle
$\theta_{i}\in[-\pi;\pi)$.

The Hamiltonian for a sequence of spins, $s$, and a conformation, $u$, is
defined as the sum over all non-repeating neighbour pairs $\langle
i,j\rangle$th in conformation:

$H(u,s)=-J\sum_{\langle
i,j\rangle}\cos(\theta_{i}-\theta_{j})-h\sum_{i}\cos(\theta_{i})$ (1)

Here, $J>0$ is the coupling constant which represents spin-spin attraction. In
our work, we focus on the system in lack of an external field: $h=0$. Without
loss of generality, we assume that $\beta=\frac{1}{kT}=1$, where $k$ is
Boltzmann’s constant, $T$ is temperature.

Let $U_{N}$ be a set of all SAW conformations of N monomers. The partition
function for the chain of the length $N$ is the sum over all SAW conformations
$u\in U_{N}$ of N monomers and the integral over all spin space:

$Z(J)=\sum_{u\in
U_{N}}\int_{-\pi}^{\pi}\frac{1}{(2\pi)^{N}}e^{J\cos(\theta_{1}-\theta_{2})}e^{J\cos(\theta_{2}-\theta_{3})}\dots{\\\
}e^{J\cos(\theta_{N-1}-\theta_{N})}d\theta_{1}d\theta_{2}\dots d\theta_{N}\;.$
(2)

Physical observables. The magnetization is defined as a vector:

$\langle\vec{m}\rangle=\frac{1}{N}\left\langle(\sum_{i=1}^{N}\cos\theta_{i},\sum_{i=1}^{N}\sin\theta_{i})\right\rangle\;,$
(3)

where $\langle...\rangle$ is averaging with respect to the Gibbs distribution
(2). The second moment of magnetization is a square of the norm:

$\langle
m^{2}\rangle=\frac{1}{N^{2}}\left\langle(\sum_{i=1}^{N}\cos\theta_{i})^{2}+(\sum_{i=1}^{N}\sin\theta_{i})^{2}\right\rangle\;.$
(4)

From measurements of the average magnetization per spin $\langle m\rangle(J)$,
we can obtain the value of the magnetic cumulant (Binder parameters) of fourth
order [18], which is helpful to study magnetic phase transition:

$U_{4}(J)=1-\frac{\langle m^{4}\rangle}{3\langle m^{2}\rangle^{2}}\;.$ (5)

At a continuous phase transition, the Binder ratio transitions approaches a
step function as the system size is increased. The Binder ratio has a
divergent feature at the step if the system has the first order transition. At
the ordered phase $J>J_{cr}$, the value $U_{4}\rightarrow 2/3$. At the
disordered state $J\rightarrow 0$, $U_{4}\rightarrow 1/3$ (see in Sec. VI.1).

To study structural phase transition, we use the mean square end-to-end
distance (radius) of self-avoiding-walks which is defined as the sum over all
configurations:

$\langle R_{N}^{2}\rangle=\frac{1}{Z_{N}}\sum_{u\in
U_{N}}|u|^{2}e^{-H(s,u)}\;,$ (6)

where $|u|$ is the Euclidean distance between the endpoints of conformation
$u$, and $Z_{N}$ is partition function (2). We call it ”mean radius” for
brevity. As $N\rightarrow\infty$, the mean radius of SAWs is believed to scale
as

$\langle R_{N}^{2}\rangle\sim N^{2\nu}.$ (7)

Here ${\nu}$ is a critical exponent. For thermodynamic limit
$N\rightarrow\infty$, $\nu$ is believed to have the form of a step function of
interaction energy $J$. For finite systems, this effect is rounded [19]. This
exponent ${\nu}$ defines three regimes: swollen, theta and compact.

The exact value of critical exponent for non-interacting SAWs ($J=0$) on the
square lattice [20]

$\nu=\frac{3}{4}.$ (8)

At the theta-point, $\nu_{\theta}$ is obtained via Coulomb-gas method [21]:

$\nu_{\theta}=\frac{4}{7}\approx 0.57.$ (9)

For the globular regime ($J>J_{\theta}$) in 2D case:

$\nu=\frac{1}{d}=\frac{1}{2}.$ (10)

At low $J<J_{\theta}$, the system is equivalent to SAW without interaction.
One should call to mind the classical homopolymer model which is represented
by an interacting, or collapsing, self-avoiding walk (iSAW). Below we briefly
report known critical values for homopolymer which are important in our work
as iSAW is a parental model of XY on SAWs.

For 3D case, Flory predicted value for non-interacting self-avoiding walk as
follows [22]:

$\nu=\frac{3}{2+d}=\frac{3}{5}.$ (11)

At the theta-point, the $\nu_{\theta}$ is [23]

$\nu_{\theta}=\frac{1}{2}.$ (12)

For compact regime when $J>J_{\theta}$, the critical exponent $\nu$ has
following value:

$\nu=\frac{1}{d}=\frac{1}{3}.$ (13)

Method.

In this work, we construct the Markov Chain Monte Carlo method for fixed-
length chain consisting of three types of updates similar to [11]. We refer to
them as BEE-reptation step, Reconnection and Wolff Cluster update. In each
iteration, the algorithm chooses the update according to set of probabilities.
We define these probabilities as $P_{\mathrm{local}}$,$P_{\mathrm{reconnect}}$
and $P_{\mathrm{Wolff}}$ respectively. The sum of probabilities is always
equal to one:
$P_{\mathrm{local}}+P_{\mathrm{reconnect}}+P_{\mathrm{Wolff}}=1$.

BEE-reptation move is a bilocal reptation update [24]. The algorithm removes a
monomer from one end and adds a monomer to the other end. Spin angle value
$\theta_{new}$ and the direction in conformation are randomly generated. The
direction is chosen uniformly with the probability $1/(2d)$, where $d$ is the
dimensions of the lattice. The spin angle variable $\theta_{new}$ is generated
uniformly $\theta_{new}\sim U(-\pi,\pi)$. The new generated state is simply
accepted according to the Metropolis rule:

$A(u_{0}\rightarrow
u_{\text{new}})=\begin{cases}e^{-J(E_{u_{\text{new}}}-E_{u_{0}})},&\text{if
$E_{u_{\text{new}}}-E_{u_{0}}>0$;}\\\ 1,&\text{otherwise}.\end{cases}$ (14)

The BEE-reptation update has the time and the memory complexity $O(1)$,
however, the autocorrelation time is quite long for magnetic variables and for
structure $\eta\sim N^{2}$. The system can also be locked in the frozen states
when both ends of the conformation are surrounded by $2d$ neighbours.

To overcome disadvantages of bilocal move, we also use Reconnect update to
accelerate conformations generation and Wolff-cluster algorithm to effectively
explore spin configuration space. Reconnect is a non-local update based on
ideas of Worm algorithm for Ising model [25]. In this system update, only
connections of conformation are changed. The acceptance probability is always
equal to one as the energy does not change. The time complexity $O(N)$.

The Wolff-cluster algorithm is a classical Monte Carlo simulation which allows
to improve sampling of the spin configuration space [26]. The main idea of the
update is to form the cluster of spins and flip its spins. We follow the
classical way of cluster update implementation for XY model discussed in Ref.
[27]. The algorithm effectively sample spin configurations and keep the
conformation fixed. The time complexity $O(N)$.

##  III Numerical simulations, 2D case

To study system on square lattice, we simulate chains up to $N=4900$. For
$N=4900$, we run at least $8\times 10^{10}$ MC steps. Here we use these values
for update probabilities: $P_{\mathrm{local}}=0.8$,
$P_{\mathrm{reconnect}}=0.199$, $P_{\mathrm{Wolff}}=0.001$. Despite both
Reconnect and Cluster updates have complexity $O(N)$, we choose small
$P_{\mathrm{Wolff}}$ due to slow iterations cause by using queue for creating
cluster of spins. At average, the Reconnect update is much faster and leads to
faster convergence of geometry properties, for example, mean radius.

###  III.1 Structural properties

Figure 1: The points are Monte-Carlo data for Mean-squared end-to-end distance
scaled using $\nu_{\theta}=4/7$ (9). The scaled radius is presented as a
function of $1/N$ from $N=900$ to $N=4900$. Dashdotted purple line corresponds
to the structural transition with critical exponent $\nu_{\theta}=4/7$. The
slope of black solid line corresponds to $\nu=1/2$ from unfolded phase. The
dashed lines are guides for an eye.

We start our studying structural properties of the model with analysing mean
radius. From studies of dynamic HP model and Ising model on the SAWs which
inherits the critical value $\nu_{\theta}=4/7$ (9) [7, 11, 10], we expect that
XY model also inherits this value from parental model of interacting self-
avoiding walk.

We make visual inspection of the scaling function for mean radius (6). Here
and elsewhere, we use estimations for $J_{\theta}$ that are obtained using
paired regressions described in VI.2.

Figure 1 shows the scaled mean-squared end-to-end distance by $\nu=4/7$ as a
function of $1/N$ for different $J$. The purple dash-dotted horizontal line is
placed correspondingly to estimation $J_{\theta}$ from Section III.2.2. We
also plot the value $\nu=1/2$ from high-temperature regime using black solid
line with low slope. We thus use assumption that XY model on SAWs also has
value $\nu=4/7$ (9) at the point of structural phase transition. We use this
value to obtain collapsing plots in Figure 2 in following subsection III.2.

###  III.2 Transition

To focus on studying phase transition, we calculate two characteristics. The
first one is the mean square end-to-end distance scaled using the factor
$\nu=4/7$ in (7). The second one is Binder cumulant of magnetization (5).
Figure 2 presents obtained calculations.

(a) Binder cumulants for long chains across the critical region.

(b) Scaled mean radius with zoom-in at the critical interval

Figure 2:  Binder cumulants (5) and mean radius (6) scaled by
$\nu=\frac{4}{7}$.

####  III.2.1 Magnetic phase transition

We compute Binder cumulants (5) with the aim of determining order of magnetic
transition.

The Binder cumulants (top Figure 2(a)) has lower limiting value $U_{4}=1/3$ as
$J\rightarrow 0$ (21) (see Sec. VI.1 for more details). For large interaction
energy constant $J$, the system signs ordering behaviour $U_{4}=\frac{2}{3}$.

Figure 2(a) shows that Binder parameter curves does not diverge. Therefore,
our computational results do not detect the first-order transition.

To estimate critical values for cumulants $U_{4}$ and phase transition point
$J_{cr}$, we perform paired linear intersections in the narrow regions where
the curves cross (see VI.2). We repeat intersections for $N=3600$ with other
chains. Estimation of critical point is the constant value from linear fit of
the line obtained on pairs ($1/N_{i},J_{cross}(N_{i},3600)$). The errorbars
are calculated using module $linregress$ from SciPy [28]. We obtain the
following results:

$J_{cr}^{3600}\approx 1.435\pm 0.008$ (15)

The estimation of critical value of cumulant at the magnetic transition from
paired regressions is following: $U_{4\mathrm{critical}}\approx 0.55(5)$. This
value is far from the Binder cumulant value for classical Ising model on the
square lattice with periodic boundary condition and for Ising model on SAWs in
2D [11].

####  III.2.2  Estimation of $\hat{J_{\theta}}$

Figure 2 shows that curves of mean radius for range of $N$ values cross
approximately at the same point.

Applying paired regressions method, we obtained following estimated value from
the zero point:

$J_{\theta}^{3600}\approx 1.3634\pm 0.0005.$ (16)

The disjoint transition.. Our computational results show that magnetic
transition (15) and structural transition (16) appears at the different
points. The intervals within errobars do not overlap. Therefore, we cannot
conclude that magnetic phase transition and structural transition happens at
the same point, in contrast to Ising model on SAWs. Our MC the data is
inconclusive, whether the transitions occur simultaneously or at distinct
values of the coupling constant J. More work is needed to conclusively rule
out one of possibilities.

###  III.3 Distribution of $\langle\cos\theta\rangle$ and $\langle e\rangle$

To study the phase transition order, we look at distributions of energy and
magnetization.

Figure 3:  Distributions of mean energy and mean $\cos\theta$ as magnetization
component for chains $N=4900$ for various $J$ over structural and magnetic
transitions.

Figure 3 shows shapes of energy distribution across the structural transition
(16) and magnetic transition (15). The curves of distributions is Gaussian-
like and do not sign any bimodal shapes.

Additionally to energy, we consider mean $\cos\theta$ which represents a
component of mean magnetization vector (3). For points $J<J_{cr}$, curves of
$\cos\theta$ distribution is similar to normal curve. Similarly to study of
Ising model on SAWs [10], we check signs of phase coexistence or not. The
shape of magnetization distribution reflects phase coexistence as trimodal
shape, where left and right modals corresponds to the ”ordered states” and the
central one comes from ”disordered” states. Here we see no signs of phase
coexistence, which is consistent with a continuous transition.

##  IV Numerical simulations, 3D case

In this section, we consider short chains up to $N=700$ which is much shorter
than we study for 2D case. The reason of it is the lattice implementation
which requires to keep $2dN^{3}=6N^{3}$ nodes in the memory.

###  IV.1 Structural properties

Figure 4:  Scaled Mean-squared end-to-end distance using $\nu_{\theta}=1/2$ as
a function of $1/N$ from $N=400$ to $N=700$. The dash-dotted purple horizontal
line corresponds to structural phase transition and placed at the estimation
(17) obtained paired regression method from Sec. VI.2.

First, we focus on structural properties and structural transition. Following
2D case, we expect that the XY model on SAWs inherits the critical value
parameter $\nu=1/2$ from interacting SAWs. Figure 4 shows the scaled mean-
squared end-to-end distance by $\nu_{\theta}=1/2$ (12) as a function of the
chain length $1/N$ for a range of $J$. The horizontal line is expected to
represent the point of structural phase transition and corresponds to the
critical exponent $\nu_{\theta}$ (12). We place the horizontal line at the
estimated value where scaled curves cross using histogram procedure described
in Sec. VI.2. The horizontal line is limited by red star-marked curve
($J=0.88$) and pink circle-marked curve ($J=0.885$). Therefore, according our
calculations for chains up to $N=700$, the system undergoes the structural
phase transition $J\in[0.88;0.885]$ with the critical exponent
$\nu_{\theta}=\frac{1}{2}$. However, this visual inspection is not very
reliable due to finite size effects. Applying paired regressions, we obtain
the following estimate for critical interaction energy:

$J_{\theta}^{700}\approx 0.876(5).$ (17)

For further study, we note the critical exponent value
$\nu_{\theta}=\frac{1}{2}$ and use it in the following section to scale mean
radius.

####  IV.1.1 Magnetic phase transition

To investigate the critical behaviour at the phase transition, we again
calculate the Binder cumulants values (5) and scaled mean end-to-end distance
(6).

(a) Binder cumulant on the interval including magnet phase transition.

(b) Scaled mean radius for long chains on the region with structural phase
transition.

Figure 5: $h=0$. Binder cumulants (5) and mean radius (6). The mean radius is
scaled by $\nu=\frac{1}{2}$.

The Binder parameters (top Figure 5) has lower limiting value
$U_{4}=\frac{1}{3}$ as $J\rightarrow 0$ (see Sec. VI.1 for more details). For
large values of coupling constant $J$, the system gets the ordering phase, for
which $U_{4}=\frac{2}{3}$.

Cumulant curves diverges at the critical region. This is a clear sign of a
first-order phase transition [29, 30]. The similar results for diverged
cumulants were obtained for Ising model on SAWs for 3D case [10].

###  IV.2 Distribution of $\langle\cos\theta\rangle$ and $\langle e\rangle$

We check the distributions of thermodynamic characteristics to check whether
energy distribution is bimodal and magnetic distribution show signs of phase
coexistence.

(a) The mean component $\cos\theta$ of magnetization vector.

(b) The mean energy.

Figure 6:  Distributions for chain $N=700$ for various $J$.

Figure 6 (top) illustrates that energy distribution has bimodal shape
approximately at $J\approx 0.904$. However, this region of bimodal curve is
quite far ($\approx 0.03$) from the estimation for point of the structural
transition (17) and the divergence region of minimum Binder cumulant (see
Figure 5(a)). This could be caused by finite size effect as chains up to
$N=700$ are not too long.

We consider mean $\cos\theta$ which is a component of mean magnetization
vector (3). For points $J<J_{cr}$ before magnetic transition transition,
curves of $\cos\theta$ distribution is similar to normal curve which is
expected as this case corresponds to the sampling from uniform distribution
$U\sim[-1;1]$ and convergence to the Gaussian.Over the critical region, the
shapes of distributions are far from Normal-like curves.

##  V Conclusions and outlook

We study the XY model on self-avoiding walks on a square lattice in 2D and a
simple cubic lattice in 3D using Monte-Carlo simulations. We consider the
regime where both spins and SAW conformations are fluctuating—in a sense, this
is an XY model defined on a dynamic lattice with annealed disorder.

We use unbiased Monte-Carlo simulations which combine a variant of the
canonic-ensemble worm algorithm for conformations and cluster updates for spin
variables. This way, our simulations keep being efficient in the critical
region around the $theta$-point, and allow us to simulate SAW chains of up to
$5\times 10^{3}$ in 2D and up to $7\times 10^{2}$ in 3D.

In 2D, our numerical results indicate that both paramegnetic-to-ferromagnetic
and globule-coil transitions are continuous. This is consistent with earlier
results for a similar model with Ising spins [11, 10]. The structural and
magnetic transitions occur in the same region of the coupling constant $J$,
but the numerical values of $J$ differ within statistical errorbars. This is
in contrast to the Ising case, where the transitions occur simultaneously [11,
10]. A possible explanation is that we are limited by the finite size effects
even for the SAW chains of $\sim 10^{3}$ sites—for the Kosterlitz-Thouless
type transition of the 2D XY model, the correlation length has an exponential
scaling, and up to $\sim 10^{6}$ spins were necessary to accurately resolve
the KT physics in previous Monte-Carlo simulations [31].

Our numerical simulations indicate that the mean end-to-end distance
(equivalently, the gyration radius) of a SAW in the critical region scales
with the length of the SAW as $\langle R^{2}\rangle\sim N^{2\nu}$, with the
value of $nu=4/7$, inherited from the classic interacting SAW model [21]. We
note that this same scaling is observed for the Ising model [11, 10] and for
the dynamic HP model [7]. We thus speculate that this critical exponent is
inherited by a wide class of models irrespective of details of short-range
interactions between monomers of a SAW.

In 3D, our simulations are limited to the SAW lengths of up to $~{}700$, which
is an almost order of magnitude smaller than 2D. The limitation is purely
technical and is due to our implementation [32] using locally sensitive
hashing to achieve $O(1)$ time complexity for the nearest-neighbor queries.
Despite this limitation, the SAW lengths available in our simulations are
sufficient for drawing quantitative conclusions from the MC data.
Specifically, we see clear signatures of the magnetic transition being first
order: the Binder cumulant displays a characteristic divergence (of course,
the divergence is strongly rounded by the finite-size effects) and the
distributions of observables signal phase coexistence. The critical exponent
for the gyration radius is consistent with the 3D interacting SAW value
$\nu=1/2$ [23]. We note that this scenario is similar to the one observed for
the Ising model on a 3D SAW in Refs [11, 10]: the magnetic transition is first
order and the gyration radius exponent is consistent with the interacting SAW
value. Therefore, we speculate that this scenario is generic and should be
observed for a wide range of SAW models with short-range interactions. Whether
long-range interactions (e.g. dipole-type $\sim 1/r^{3}$ couplings) change the
behavior is an open question.

Numerical simulations were performed using the computational resources of HPC
facilities at HSE University [33].

##  VI Appendix

###  VI.1 $U_{4}$ as $J\rightarrow 0$

Consider the case when no interaction which could be close to classical
1-dimensional XY-chain. In case of open boundary conditions, the partition
function for the chain of the length $N$ has following form:

$Z(J)=\int_{-\pi}^{\pi}\frac{1}{(2\pi)^{N}}d\theta_{1}d\theta_{2}\dots
d\theta_{N}e^{J\cos(\theta_{1}-\theta_{2})}e^{J\cos(\theta_{2}-\theta_{3})}\\\
\dots e^{J\cos(\theta_{N-1}-\theta_{N})}$ (18)

In case $J=0$ (high-temperature regime), all states have equal probabilities:

$Z(0)=\int_{-\pi}^{\pi}(\frac{1}{2\pi})^{N}d\theta_{1}d\theta_{2}\dots
d\theta_{N}$ (19)

To calculate the exact value of $\langle m^{2}\rangle(J=0)$ we use following
results:

$\int_{-\pi}^{\pi}\frac{1}{2\pi}\sin^{2}\theta
d\theta=\int_{-\pi}^{\pi}\frac{1}{2\pi}\cos^{2}\theta d\theta=\frac{1}{2}$
$\int_{-\pi}^{\pi}\frac{1}{2\pi}\sin\theta
d\theta=\int_{-\pi}^{\pi}\frac{1}{2\pi}\cos\theta d\theta=0$

After some calculation, only integration results for $N$ times
$sin^{2}\theta_{i}$ and $N$ times $cos^{2}\theta_{i}$ survive:

$\langle
m^{2}\rangle(J=0)=\frac{1}{N^{2}}\int_{-\pi}^{\pi}(\frac{1}{2\pi})^{N}\left((\sum_{i=1}^{N}\cos\theta_{i})^{2}+(\sum_{i=1}^{N}\sin\theta_{i})^{2}\right)d\theta_{1}d\theta_{2}\dots
d\theta_{N}=\\\ \frac{1}{N^{2}}(\frac{1}{2}N+\frac{1}{2}N)=\frac{1}{N}$ (20)

Next, to calculate $\langle m^{4}\rangle(J=0)$ we use following facts:

$\langle
m^{4}\rangle(J=0)=\frac{1}{N^{4}}\int_{-\pi}^{\pi}(\frac{1}{2\pi})^{N}\left((\sum_{i=1}^{N}\cos\theta_{i})^{2}+(\sum_{i=1}^{N}\sin\theta_{i})^{2}\right)^{2}d\theta_{1}d\theta_{2}\dots
d\theta_{N}$
$\left((\sum_{i=1}^{N}\cos\theta_{i})^{2}+(\sum_{i=1}^{N}\sin\theta_{i})^{2}\right)^{2}=(\sum_{i=1}^{N}\cos\theta_{i})^{4}+(\sum_{i=1}^{N}\sin\theta_{i})^{4}+2(\sum_{i=1}^{N}\cos\theta_{i})^{2}(\sum_{i=1}^{N}\sin\theta_{i})^{2}$

$\int_{-\pi}^{\pi}\frac{1}{2\pi}\sin^{4}\theta
d\theta=\int_{-\pi}^{\pi}\frac{1}{2\pi}\cos^{4}\theta d\theta=\frac{3}{8}$ (We
have $N$ times $sin^{4}\theta_{i}$-term and $N$ times $cos^{4}\theta_{i}$-term
what results in $2\times\frac{3}{8}\times N$).

$\int_{-\pi}^{\pi}\frac{1}{2\pi}\int_{-\pi}^{\pi}\frac{1}{2\pi}\sin^{2}\theta_{i}\sin^{2}\theta_{j}d\theta_{i}d\theta_{j}=\int_{-\pi}^{\pi}\frac{1}{2\pi}\int_{-\pi}^{\pi}\frac{1}{2\pi}\cos^{2}\theta_{i}\cos^{2}\theta_{j}d\theta_{i}d\theta_{j}=\frac{1}{4}$
(We have $6N(N-1)\frac{1}{2}$ times $sin$-term and $6N(N-1)\frac{1}{2}$ times
$cos$-term what results in $6\times\frac{1}{4}\times N(N-1)$).

$\int_{-\pi}^{\pi}\frac{1}{2\pi}\sin^{2}\theta\cos^{2}\theta
d\theta=\frac{1}{8}$ (We have this term $2N$ times what results in
$2\times\frac{1}{8}\times N$).

$\int_{-\pi}^{\pi}\frac{1}{2\pi}\int_{-\pi}^{\pi}\frac{1}{2\pi}\cos^{2}\theta_{i}\sin^{2}\theta_{j}d\theta_{i}d\theta_{j}=\frac{1}{4}$
(We have $2N(N-1)\frac{1}{2}$ times what results in $2\times\frac{1}{4}\times
N(N-1)$).

All other terms with odd power of sin and cos function equals zero after
integration over period.

$\langle m^{4}\rangle(J=0)=\frac{1}{N^{4}}\left(2\times\frac{3}{8}\times
N+6\times\frac{1}{4}\times N(N-1)+2\times\frac{1}{8}\times
N+2\times\frac{1}{4}\times N(N-1)\right)=\frac{2N-1}{N^{3}}$
$U_{4}(J=0)=1-\frac{\frac{2N-1}{N^{3}}}{3\frac{1}{N^{2}}}\\\
=1-\frac{2N-1}{3N}=\frac{1}{3}+\frac{1}{3N}$ (21)

###  VI.2 Paired regressions

To estimate critical values for cumulants $U_{4}$ and phase transition point
$J_{cr}$, we perform paired linear intersections. The procedure to analyze
Monte-Carlo data is following:

1\. Choose the pair of two different N values for length of the chain. Choose
the range of values for interaction energy J. This segment should be as short
as possible and include the point of intersection of the two curves.

2\. We need to obtain the errors to estimated Binder cumulant. To that end, we
use Gaussian sampling.

For each point from the set generate $n_{samples}$ values using Normal
distribution with mean and standard error of $\langle m^{2}\rangle$ and
$\langle m^{4}\rangle$ as parameters: $M2_{J,N}\sim N(\langle
m^{2}\rangle,\sigma(\langle m^{2}\rangle))$, $M4_{J,N}\sim N(\langle
m^{4}\rangle,\sigma(\langle m^{4}\rangle))$. We generate for each value $J$
1000 samples. For each pair of sampled $m_{2},m_{4}$ we calculate the Binder
cumulant (5).

3\. Using generated set, for each pair $J$ and $N$ make estimation for mean
and standard deviation $\langle U_{4}\rangle$.

4\. Now, we have two curves of calculated $U_{4}$ with errorbars for two
values of $N$. Apply weighted least squares regression to find crossing point.
Save the obtained estimation for $\hat{J}$.

5\. Repeat steps 2-5 $n_{lines}$ times. We repeat it $n_{lines}=1000$ times.

6\. At the end, we have $n_{lines}$ of estimated $\hat{J}$ and
$U_{4\mathrm{critical}}$ where two curves cross. The mean value and standard
deviation of this arrays correspond to the estimation and its error.

The same procedure could be applied using crossing curves of $R^{2}/N^{2\nu}$
to estimate $J_{\theta}$ and crossover value for $R^{2}/N^{2\nu}$.

## References

  * [1] P-G de Gennes.  Scaling concepts in polymer physics.  Cornell University Press, 1979.
  * [2] Marc Baus and Carlos F. Tejero, editors.  Statistical Physics, pages 45–63.  Springer Berlin Heidelberg, Berlin, Heidelberg, 2008.
  * [3] Kit Fun Lau and Ken A Dill.  A lattice statistical mechanics model of the conformational and sequence spaces of proteins.  Macromolecules, 22(10):3986–3997, 1989.
  * [4] Jinfeng Zhang, S. C. Kou, and Jun S. Liu.  Biopolymer structure simulation and optimization via fragment regrowth monte carlo.  The Journal of Chemical Physics, 126(22):225101, 2007.
  * [5] Hsiao-Ping Hsu, Vishal Mehra, Walter Nadler, and Peter Grassberger.  Growth-based optimization algorithm for lattice heteropolymers.  Phys. Rev. E, 68:021113, Aug 2003.
  * [6] Robert Helling, Hao Li, Régis Mélin, Jonathan Miller, Ned Wingreen, Chen Zeng, and Chao Tang.  The designability of protein structures.  Journal of Molecular Graphics and Modelling, 19(1):157 – 167, 2001\.
  * [7] Kamilla Faizullina and Evgeni Burovski.  Globule-coil transition in the dynamic hp model.  Journal of Physics: Conference Series, 1740:012014, 1 2021.
  * [8] T Garel, H Orland, and E Orlandini.  Phase diagram of magnetic polymers, 1999.
  * [9] Andrea Papale and Angelo Rosa.  The ising model in swollen vs. compact polymers: Mean-field approach and computer simulations.  European Physical Journal E, 41, 12 2018.
  * [10] Damien Paul Foster and Debjyoti Majumdar.  Critical behavior of magnetic polymers in two and three dimensions.  Phys. Rev. E, 104:024122, Aug 2021.
  * [11] Kamilla Faizullina, Ilya Pchelintsev, and Evgeni Burovski.  Critical and geometric properties of magnetic polymers across the globule-coil transition.  Phys. Rev. E, 104:054501, Nov 2021.
  * [12] Sumitra Rudra, Damien Paul Foster, and Sanjay Kumar.  Critical behavior of magnetic polymers on the three-dimensional sierpiński gasket.  Phys. Rev. E, 108:L042502, Oct 2023.
  * [13] A Coniglio and M Daoud.  Polymer chains and vulcanisation.  Journal of Physics A: Mathematical and General, 12(10):L259, oct 1979.
  * [14] Nathann T. Rodrigues and Tiago J. Oliveira.  Semianalytical solutions of ising-like and potts-like magnetic polymers on the bethe lattice.  Phys. Rev. E, 106:024130, Aug 2022.
  * [15] J M Kosterlitz and D J Thouless.  Ordering, metastability and phase transitions in two-dimensional systems.  Journal of Physics C: Solid State Physics, 6(7):1181–1203, apr 1973\.
  * [16] Martin Hasenbusch.  The two-dimensional xy model at the transition temperature: a high-precision monte carlo study.  Journal of Physics A: Mathematical and General, 38(26):5869–5883, Jun 2005.
  * [17] Marios Nikolaou.  A Matter of Disorder: Monte Carlo Simulations of Phase Transitions in Strongly Disordered Systems.  PhD thesis, KTH, 2007.
  * [18] Kurt Binder and Dieter W. Heermann.  Monte Carlo Methods for the Sampling of Free Energy Landscapes.  2010\.
  * [19] Carlo Vanderzande.  Lattice models of polymers.  Cambridge University Press, 1998.
  * [20] Bin Li, Neal Madras, and Alan D Sokal.  Critical exponents, hyperscaling, and universal amplitude ratios for two-and three-dimensional self-avoiding walks, 1995.
  * [21] Bertrand Duplantier and Hubert Saleur.  Exact tricritical exponents for polymers at the e point in two dimensions, 1987.
  * [22] Paul J Flory.  Principles of polymer chemistry.  Cornell university press, 1953.
  * [23] E.J.J. Van Rensburg.  The Statistical Mechanics of Interacting Walks, Polygons, Animals and Vesicles.  Oxford Lecture Series in Mathe. Oxford University Press, 2015.
  * [24] S. Caracciolo, M. Papinutto, and A. Pelissetto.  Dynamic critical behavior of an extended reptation dynamics for self-avoiding walks.  Phys. Rev. E, 65:031106, Feb 2002.
  * [25] N. Prokof’ev and B. Svistunov.  Worm algorithms for classical statistical models.  Phys. Rev. Lett., 87:160601, Sep 2001.
  * [26] Ulli Wolff.  Collective monte carlo updating for spin systems.  Phys. Rev. Lett., 62:361–364, Jan 1989.
  * [27] Mark Newman and Gerard Barkema.  Monte Carlo methods in statistical physics chapter 1-4.  Oxford University Press: New York, USA, 1999.
  * [28] Pauli Virtanen, Ralf Gommers, Travis E. Oliphant, Matt Haberland, Tyler Reddy, David Cournapeau, Evgeni Burovski, Pearu Peterson, Warren Weckesser, Jonathan Bright, Stéfan J. van der Walt, Matthew Brett, Joshua Wilson, K. Jarrod Millman, Nikolay Mayorov, Andrew R. J. Nelson, Eric Jones, Robert Kern, Eric Larson, C J Carey, İlhan Polat, Yu Feng, Eric W. Moore, Jake VanderPlas, Denis Laxalde, Josef Perktold, Robert Cimrman, Ian Henriksen, E. A. Quintero, Charles R. Harris, Anne M. Archibald, Antônio H. Ribeiro, Fabian Pedregosa, Paul van Mulbregt, and SciPy 1.0 Contributors.  SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python.  Nature Methods, 17:261–272, 2020.
  * [29] K. Binder.  Critical properties from monte carlo coarse graining and renormalization.  Phys. Rev. Lett., 47:693–696, Aug 1981.
  * [30] K. Binder and D. P. Landau.  Finite-size scaling at first-order phase transitions.  Phys. Rev. B, 30:1477–1485, Aug 1984.
  * [31] Martin Hasenbusch.  The binder cumulant at the kosterlitz–thouless transition.  Journal of Statistical Mechanics: Theory and Experiment, 2008(08):P08003, aug 2008.
  * [32] Kamilla Faizullina.  Saw models.  https://github.com/kamilla0503/saw_models, 2022.
  * [33] P. S. Kostenetskiy, R. A. Chulkevich, and V. I. Kozyrev.  HPC resources of the Higher School of Economics.  J. Phys.: Conf. Ser., 1740:012050, jan 2021.