---
# System prepended metadata

title: Collectivity in glassy systems
tags: [PhD projects]

---

# Collectivity in glassy systems 
###### tags: `PhD projects`


*Found on HERA glass_largersystem/data_HS_pf_0.58_N_1000000_50_propensity(large system)and on HERA glass/Analysis/code_Monte_Carlo/MC_partially_frozen/ (small system). Notebooks can be found in glass_largersystem/data_HS_pf_0.58_N_1000000_50_propensity/Analysis/ and glass/Analysis/code_Monte_Carlo/MC_partially_frozen/*

To investigate how collective the caging behaviour is we compute the average position of particles in their cage while part of the system is frozen at its initial position. Concretely, this means that for each particle $i$ in the system, we freeze all particles at a distance further than $r_f$. Thereafter, we let the particles that have $|\mathbf{r}_i-\mathbf{r}_j|<r_f$ move around in their cage, while measuring the average position of particle $i$. We perform this simulation for various values of $r_f$, after which we compute the correlation between the found ensemble average positions for each particle and the associated propensity.

We furthermore want to investigate what the size effects of the system are on this collectivity, therefore we look at a HS system of 2000 particles and a HS of 100.000 particles. 

### Checks
*See /home/staff/5670772/glass_largersystem/data_HS_pf_0.58_N_1000000_50_propensity/Analysis/ for notebook and /home/staff/5670772/glass_largersystem/data_HS_pf_0.58_N_1000000_50_propensity/data_measure/run_1001/com/ for the center of mass data.*

For the small system we use the earlier obtained data from Frank. To simulate the large system we use the EDMD code of Frank together with the equilibrated snapshots obtained by him. Below we consider both the CofM of the system as well as the average propensity, to ensure that these simulations are correct.

| Center of mass |Propensity|
| -------- | -------- | 
|![](https://i.imgur.com/KlkmJSF.png)|![](https://i.imgur.com/fndCR5D.png)|

On the left we plot the center of mass ($x_{COM}+y_{COM}+z_{COM}$) for the first 5 Pruns, as we can see, it stays positive over time. On the right we plot the average propensity of the *A* particles in both the small and the large system. As we can see there is some drift in the larger system.

### Results
*See glass_largersystem/data_HS_pf_0.58_N_1000000_50_propensity/data_MC/run_1001/ for the frozen and unfrozen data.*

We do this for both a system of 2000 particles (left) and a system of 100.000 particles (right). Note that we only consider the A particles (600 and 2000 respectively).

| Small system  $\eta = 0.58$                     |Large system $\eta = 0.58$    |         
| ------------------------------------ | --- | 
|![](https://i.imgur.com/koNKxPH.png)|![](https://i.imgur.com/O3aH8yN.png)|

From the fact that the unfrozen peak is less high in the case of the larger system we can conclude that drift plays a role in these sytems. 

However from the fact that the partially frozen systems still yields a lower correlation, than the unfrozen system, we can already say that also other collective phenomena play a role.

We have also looked at the distribution of $\Delta r$'s for the different freeze radii

| Small system  $\eta = 0.58$                     |Large system $\eta = 0.58$    |    
| ------------------------------------ | ------------------------------------ | 
| ![](https://i.imgur.com/G0zjIh3.png) | ![](https://i.imgur.com/clN4K93.png)|



## Thorough analysis
To see whether for a lower packing fraction the system saturates at a lower freezing radius we also consider $\eta \in[0.53,0.58]$. Initial snapshots are equilibrated for $t/\tau = 10^5$.
### CHECKS
*Data is found on ODIN /home/staff/5670772/glass_largersystem/data_HS_pf_<..>_N_100000/data_MC/run_1001/freezeradius_comp_non_frozen/ and /home/staff/5670772/glass_largersystem/data_HS_pf_<...>_N_100000/data_MC/run_1001/unfrozen/ for both pf = 0.53 and pf = 0.58. Notebook are Compare_MC_methods_frozen_non_frozen_<...>.nb in again both for both packing fractions at /home/staff/5670772/glass_largersystem/Analysis/ (currently on the computer though).*

Since we use a slightly different code for the unfrozen and frozen system, we test whether in the limit they give the same results. Therefore we use the frozen simulation where we set the freezing radius to infinity. Then we compare the results with the unfrozen system (see pictures below, where we did this analysis for the 80.000 particles for two different packing fraction). The test system is the frozen system with the freeze radius set infinity. As we can see they almost overlap. Moreover, we saw that the more particles we included, the closer the two lines came to each other. I think this has to do with the fact that there is drift (especially in those large systems). The more particles we include the more this effect averages out. 


| PF = 0.53| PF = 0.58 |
| -------- | -------- |
| ![](https://hackmd.io/_uploads/SJEhaWqHn.png)     | ![](https://hackmd.io/_uploads/rkoKvYavn.png)
  |

::: warning
Check whether Laura and Frank are okay with this. 
:::

::: danger
Note that hte distributions below for both the voronoi as well as the radius restriction are old distributions, the mathematica notebooks (found on my desktop in */home/rinskealkemade/Documents/MobaXterm_download/Glass_large_caging*) hold the new distributions
:::
### Voronoi restriction
| $\eta$ | Correlation propensity                        | $\Delta \mathbf{r}^\text{init,CS}$            |Distribtution     |
| ------ | --------------------------------------------- | --------------------------------------------- | --- |
| $0.53$ | ![](https://hackmd.io/_uploads/BJpqZvAGp.png) | ![](https://hackmd.io/_uploads/BJqjWwRzT.png) |![](https://hackmd.io/_uploads/r13qk_RGT.png)|
| $0.54$ | ![](https://hackmd.io/_uploads/HyTw-wAGa.png) | ![](https://hackmd.io/_uploads/rJuubw0Ga.png) |![](https://hackmd.io/_uploads/HJGykOAM6.png)|
| $0.55$ | ![](https://hackmd.io/_uploads/HJN7WD0Mp.png) | ![](https://hackmd.io/_uploads/HyjX-wAMT.png) |  ![](https://hackmd.io/_uploads/BJF3CP0Ma.png)| 
| $0.56$ | ![](https://hackmd.io/_uploads/SymxWvAfT.png) | ![](https://hackmd.io/_uploads/SymTeD0Mp.png) |![](https://hackmd.io/_uploads/rJgqRPAfa.png)|
| $0.57$ | ![](https://hackmd.io/_uploads/HJ4cewAzT.png) | ![](https://hackmd.io/_uploads/HyaFlvRGp.png) | ![](https://hackmd.io/_uploads/ByewADRGp.png)| 
| $0.58$ | ![](https://hackmd.io/_uploads/HyDZxbbBn.png) | ![](https://hackmd.io/_uploads/Skw-lWWS2.png) | ![](https://hackmd.io/_uploads/HyVVCPCGa.png)|

### Cell radius restriction

| $\eta$ | Correlation propensity                        | $\Delta \mathbf{r}^\text{init,CS}$            | Distribution    |
| ------ | --------------------------------------------- | --------------------------------------------- | --- |
| $0.53$ | ![](https://hackmd.io/_uploads/HkRvdL4v3.png) | ![](https://hackmd.io/_uploads/By0P_UVvh.png) |![](https://hackmd.io/_uploads/BJFEeO0z6.png)|
| $0.54$ | ![](https://hackmd.io/_uploads/BkFqvUAz6.png) | ![](https://hackmd.io/_uploads/rJg2DLCzp.png) |![](https://hackmd.io/_uploads/B1127v0Ma.png)     |
| $0.55$ | ![](https://hackmd.io/_uploads/B1Bg_8Rfa.png) | ![](https://hackmd.io/_uploads/HyuGu8AG6.png) |![](https://hackmd.io/_uploads/ryI1VvAza.png)  |
| $0.56$ | ![](https://hackmd.io/_uploads/H1L9nI0fp.png) | ![](https://hackmd.io/_uploads/SJ9C3U0GT.png) |![](https://hackmd.io/_uploads/HJLdVD0Gp.png)|
| $0.57$ | ![](https://hackmd.io/_uploads/HkcZ68CMa.png) | ![](https://hackmd.io/_uploads/rybZpLCfp.png) |![Screenshot from 2023-11-20 12-09-32](https://hackmd.io/_uploads/S1oqR3uVp.png) |
| $0.58$ | ![](https://hackmd.io/_uploads/SJvApUCGa.png) | ![](https://hackmd.io/_uploads/ryRAp80M6.png) |  ![](https://hackmd.io/_uploads/HkKkHDAGT.png)
   |

Note that we for $\eta=0.53$ also add the distribution we would get for an ideal gas (red bars, data found on HERA */home/staff/5670772/glasslargersystem/codeidealgasdeltaR/*). This is obtained by 2000 times sampling the average point of an ideal gas in a sphere (20.000) sample points (i.e. the same statistics as our normal particles). As we can see the distribution is completely different from the distribution the glassy liquids have. 

**Note that 0.53 radius 7 writes out snapshots for the first three particles to check whether the code works. **
## Naming
Each packing fraction file contains the folders:
* data_grow: grow particles until desired packing fractions.
* data_equilibrate (equilibrate snapshot from grow filefor $t = 10^5\tau$)
* data_MC: contains CS data for the initial snapshot. Note that since we use two different ways of calculating the CS, we have two different file names. For the partially frozen system *snap_MC.sph* uses voronoicell to calculate the CS, while *snap_MC_radiuscell.sph* restricts particles to a sphere corresponding to their own radius. For the unfrozen system *snap_MC.sph* uses radiuscell to calculate the CS, while *snap_MC_vor.sph* uses voronoi cell. :warning: Change this when all simulations are finished to a more consistent naming.  
## Current status
**21-04-2023**
| $\eta$ |Prop|UFR|UFV|FR2|FV2|FR3|FV3|FR4|FV4|FR5|FV5|FR6|FV6|FR7|FV7|
| ------ | ---- | --- | --- | --- | --- | --- | ---- | --- | --- | --- | --- | --- | --- | --- | -------- |
| 0.53   |:heavy_check_mark:        |:heavy_check_mark:   |:heavy_check_mark:   | :heavy_check_mark:|:heavy_check_mark:     | :heavy_check_mark:       |:heavy_check_mark:       | :heavy_check_mark:     | :heavy_check_mark:      |  :heavy_check_mark:   |  :heavy_check_mark:   | :heavy_check_mark:    | R    |R     |R     |
| 0.54   |:heavy_check_mark:      | :heavy_check_mark:    | :heavy_check_mark:    | :heavy_check_mark:   | :heavy_check_mark:    |  :heavy_check_mark:      |  :heavy_check_mark:       | :heavy_check_mark:     | :heavy_check_mark:     |:heavy_check_mark:    |:heavy_check_mark:     | R    | R    |R     | R     |       |
| 0.55   |:heavy_check_mark:      | :heavy_check_mark:    | :heavy_check_mark:   | :heavy_check_mark:    | :heavy_check_mark:    |  :heavy_check_mark:   |  :heavy_check_mark:    | :heavy_check_mark:     | :heavy_check_mark:     | :heavy_check_mark:    |:heavy_check_mark:     | :heavy_check_mark:    | :heavy_check_mark:   |R     | R     |
| 0.56   |:heavy_check_mark:     |:heavy_check_mark:     |:heavy_check_mark: |:heavy_check_mark: |:heavy_check_mark:     |:heavy_check_mark:   | :heavy_check_mark:    |:heavy_check_mark:     |   :heavy_check_mark:   |:heavy_check_mark:     |:heavy_check_mark:     |R     | R    |R     |R     |
| 0.57   |:heavy_check_mark:     |:heavy_check_mark:    |:heavy_check_mark:   | :heavy_check_mark:    |:heavy_check_mark:     | :heavy_check_mark:    | :heavy_check_mark:    |:heavy_check_mark:     | :heavy_check_mark:     |:heavy_check_mark:    |:heavy_check_mark:      | R    | :heavy_check_mark:   | R    |  R   | 
| 0.58   |   :heavy_check_mark:     |  :heavy_check_mark:     | :heavy_check_mark:      |  :heavy_check_mark:     | :heavy_check_mark: |:heavy_check_mark:     |   :heavy_check_mark:    | :heavy_check_mark:     |  :heavy_check_mark:     |:heavy_check_mark:     |   :heavy_check_mark:    | R    | :heavy_check_mark:      | R    |  :heavy_check_mark:    |  

### Differences dr's different freezing radii

We look at how much difference there is between the initial state and the cage state for different freezing radii (see figures below)

| $\eta = 0.53$  (radiuscell restriction)| $\eta = 0.58$  (voronoi restriction)|
| -------- | -------- |
| ![](https://hackmd.io/_uploads/BkJWrG9rn.png)|![](https://hackmd.io/_uploads/H11-HMqSn.png)   | 

For the right picture this is what we expect: the lines that lie closest to eachother have the smallest difference. For the left picture this is different. We see that the difference between $r_f = 5$ and the frozen system is smaller than the difference between $r_f = 5$ and $r_f = 4$, while these last lines lay closer. This could have to do something with drift? 


## 

When we plot the position of the $x$-peak as a function of the freezing radii for the different packing factions we see that for the lower packing fractions there is an overshoot (see picture below, where the packing fraction goes from $0.53$ being yellow to $0.58$ being dark gray. In the picture the horizontal lines are the $x$-positions measured for the unfrozen system).
| Radius cell restriction| Voronoi restriction | 
| -------- | -------- | 
| ![Screenshot from 2023-11-29 16-32-07](https://hackmd.io/_uploads/r1utYRVra.png) | ![Screenshot from 2023-11-29 16-27-36](https://hackmd.io/_uploads/HJx5KA4Ha.png)|

Moreover for the Voronoi restriction we also see that f.e. $\eta= 0.53$ has a lower $x$ value for the unfrozen system than $\eta = 0.54$ but higher than $\eta = 0.58$. This is is what we expect: For an ideal gas, the peak should be zero and for a completely quenched system too. 

The overshoot has I think to do with the fact that for lower packing fractions there is a less well defined cage state. In stead there will be multiple energy minima. For smaller freezing radii some of the energy minima might already be available, while others aren't. As a result, when these minima are located at diverent angles, the average distance will be larger when less energy minima are available (since we look at the average position of the particle in the cage).

To research this hypothesis, instead of looking at the average position of particles in their cage, for 5 particles we look at the actual positions such that we have an idea of the $\Delta r$, $\Delta \theta$ and $\Delta \phi$ distribution. Moreover we will also consider the difference between the radius and voronoi restriction. 

### $\eta = 0.53$
#### Radius restriction

|     | $\Delta r$ | $\Delta \theta$ | $\Delta \phi$ |
| --- | ---------- | --------------- | ------------- |
|Particle 1     | ![Screenshot from 2023-12-01 15-08-58](https://hackmd.io/_uploads/r15ZKvPra.png)| ![Screenshot from 2023-11-29 16-51-05](https://hackmd.io/_uploads/BkLeAAErp.png)|     ![Screenshot from 2023-11-29 16-51-26](https://hackmd.io/_uploads/ryNG0C4S6.png) |
|Particle 2    | ![Screenshot from 2023-12-01 15-11-59](https://hackmd.io/_uploads/SJy6Fvwra.png)      | ![Screenshot from 2023-12-01 15-12-12](https://hackmd.io/_uploads/BJh6KwwBp.png)|![Screenshot from 2023-12-01 15-12-25](https://hackmd.io/_uploads/rJDCtPwBa.png)|
|Particle 3     | ![Screenshot from 2023-12-01 15-14-43](https://hackmd.io/_uploads/Hy-v5vvB6.png)        | ![Screenshot from 2023-12-01 15-14-57](https://hackmd.io/_uploads/HyNdqPDrp.png)| ![Screenshot from 2023-12-01 15-15-26](https://hackmd.io/_uploads/HJkccDvS6.png)      |
#### Voronoi restriction

|     | $\Delta r$ | $\Delta \theta$ | $\Delta \phi$ |
| --- | ---------- | --------------- | ------------- |
|Particle 1     |![Screenshot from 2023-12-01 15-10-51](https://hackmd.io/_uploads/SkFuYDDST.png) |![Screenshot from 2023-11-29 16-54-46](https://hackmd.io/_uploads/ryzACCESa.png)|   ![Screenshot from 2023-11-29 16-55-04](https://hackmd.io/_uploads/HJwkyyHHa.png)  |
|Particle 2    |![Screenshot from 2023-12-01 15-13-37](https://hackmd.io/_uploads/By-mcPvBa.png)  | ![Screenshot from 2023-12-01 15-13-53](https://hackmd.io/_uploads/rkR7qPPSp.png)      |![Screenshot from 2023-12-01 15-14-10](https://hackmd.io/_uploads/SybHqwDHT.png)   |
|Particle 3     |![Screenshot from 2023-12-01 15-17-36](https://hackmd.io/_uploads/B1WzowDB6.png)| ![Screenshot from 2023-12-01 15-17-58](https://hackmd.io/_uploads/By7XivPHp.png)            | ![Screenshot from 2023-12-01 15-18-09](https://hackmd.io/_uploads/HJx4oDwB6.png) |



### $\eta = 0.58$
#### Radius restriction

|     | $\Delta r$ | $\Delta \theta$ | $\Delta \phi$ |
| --- | ---------- | --------------- | ------------- |
|Particle 1     | ![Screenshot from 2023-11-29 16-58-07](https://hackmd.io/_uploads/HJJj1kBHa.png) | ![Screenshot from 2023-11-29 16-58-32](https://hackmd.io/_uploads/Byc3JySB6.png)|       ![Screenshot from 2023-11-29 16-58-49](https://hackmd.io/_uploads/H1wayySra.png) |
|Particle 2    | ![Screenshot from 2023-12-01 15-05-52](https://hackmd.io/_uploads/BykLOwwHa.png)       | ![Screenshot from 2023-12-01 15-04-38](https://hackmd.io/_uploads/SyVZdvvHT.png) | ![Screenshot from 2023-12-01 15-04-18](https://hackmd.io/_uploads/SJWeuPvBa.png)|
|Particle 3     |    ![Screenshot from 2023-12-01 15-00-38](https://hackmd.io/_uploads/BJ8fwwvST.png) | ![Screenshot from 2023-12-01 14-59-33](https://hackmd.io/_uploads/SyYA8vPrp.png)   |   ![Screenshot from 2023-12-01 14-59-18](https://hackmd.io/_uploads/Syr68PPBp.png)|

#### Voronoi restriction

|     | $\Delta r$ | $\Delta \theta$ | $\Delta \phi$ |
| --- | ---------- | --------------- | ------------- |
|Particle 1     |  ![Screenshot from 2023-11-29 16-59-49](https://hackmd.io/_uploads/B1U-lkBS6.png)|      ![Screenshot from 2023-11-29 17-00-15](https://hackmd.io/_uploads/ry6fxkBS6.png)|     ![Screenshot from 2023-11-29 17-00-29](https://hackmd.io/_uploads/H15mlJHHp.png) |
|Particle 2    |![Screenshot from 2023-12-01 15-03-34](https://hackmd.io/_uploads/rk4TwvvB6.png) | ![Screenshot from 2023-12-01 15-03-03](https://hackmd.io/_uploads/BkSivPDra.png) | ![Screenshot from 2023-12-01 15-02-48](https://hackmd.io/_uploads/SkD5DDwBp.png)
|Particle 3    |  ![Screenshot from 2023-12-01 15-02-09](https://hackmd.io/_uploads/HkZdPDPr6.png)|  ![Screenshot from 2023-12-01 14-58-32](https://hackmd.io/_uploads/S1wqIPvrp.png) |![Screenshot from 2023-12-01 14-57-55](https://hackmd.io/_uploads/S1iO8PDra.png)|



### $\Delta r $ as a function of MC steps

$\eta = 0.53$

|            | Radius restriction  | Radius restriction    |Voronoi restriction     | Voronoi restriction     |
| ---------- | -------------------------------------------------------------------------------- | --- | --- | ---- |
| Particle 1 |![Screenshot from 2023-12-04 10-22-18](https://hackmd.io/_uploads/Hyd8cMsB6.png)|  ![Screenshot from 2023-12-04 10-22-35](https://hackmd.io/_uploads/Bk5D5GiHp.png)    |![Screenshot from 2023-12-04 10-23-49](https://hackmd.io/_uploads/SkXnqGsBa.png)     |![Screenshot from 2023-12-04 10-24-19](https://hackmd.io/_uploads/H1YRqzoS6.png)|
| Particle 2 | ![Screenshot from 2023-12-04 10-24-49](https://hackmd.io/_uploads/HykxozoB6.png)   |![Screenshot from 2023-12-04 10-25-08](https://hackmd.io/_uploads/rkMZsGor6.png)| ![Screenshot from 2023-12-04 10-25-29](https://hackmd.io/_uploads/SkwfsfiBp.png) | ![Screenshot from 2023-12-04 10-25-43](https://hackmd.io/_uploads/SyOmoGiH6.png)| |
| Particle 3 |![Screenshot from 2023-12-04 10-26-45](https://hackmd.io/_uploads/SyZPiMor6.png)|![Screenshot from 2023-12-04 10-26-59](https://hackmd.io/_uploads/SkSOifiBT.png)  |![Screenshot from 2023-12-04 10-27-26](https://hackmd.io/_uploads/HJJcjfsH6.png)|  ![Screenshot from 2023-12-04 10-27-45](https://hackmd.io/_uploads/HJ1joziSa.png) |


$\eta = 0.58$

|            | Radius restriction  | Radius restriction    |Voronoi restriction     | Voronoi restriction     |
| ---------- | -------------------------------------------------------------------------------- | --- | --- | ---- |
| Particle 1 |![Screenshot from 2023-12-04 10-30-16](https://hackmd.io/_uploads/BkKE2fsB6.png)| ![Screenshot from 2023-12-04 10-30-29](https://hackmd.io/_uploads/SymH2fjBT.png) | ![Screenshot from 2023-12-04 10-30-44](https://hackmd.io/_uploads/r1-83GsST.png) | ![Screenshot from 2023-12-04 10-30-58](https://hackmd.io/_uploads/rk1P3MiSp.png) |
| Particle 2 | ![Screenshot from 2023-12-04 10-31-11](https://hackmd.io/_uploads/rkhv3MoSa.png)  | ![Screenshot from 2023-12-04 10-31-22](https://hackmd.io/_uploads/r1OuhMsrT.png)  |![Screenshot from 2023-12-04 10-31-34](https://hackmd.io/_uploads/BJ7t2ziH6.png) |  ![Screenshot from 2023-12-04 10-31-44](https://hackmd.io/_uploads/SJJ92Mira.png)|
| Particle 3 |![Screenshot from 2023-12-04 10-32-01](https://hackmd.io/_uploads/HyC5hGirp.png)  | ![Screenshot from 2023-12-04 10-32-12](https://hackmd.io/_uploads/SJqihzsra.png) |![Screenshot from 2023-12-04 10-32-25](https://hackmd.io/_uploads/HJw3hfiHp.png)     | ![Screenshot from 2023-12-04 10-32-35](https://hackmd.io/_uploads/ByNThzjBp.png)|
#### Discuss


We consider $\eta = 0.58$, terra is radius restriction, oker is radius restriction  
| Freezing radius 2|  Freezing radius 7|
| -------- | -------- | 
| ![Screenshot from 2023-12-01 14-49-44](https://hackmd.io/_uploads/rywhVwvSp.png) | ![Screenshot from 2023-12-01 14-49-54](https://hackmd.io/_uploads/S15a4vvBp.png)|

### Ratio $|\langle d\mathbf{r}\rangle|/\langle|d\mathbf{r}|\rangle$
*Code can be found on HERA in glass_largersystem/code_structural_MC_relaxation/code_direction_cage for both the Voronoi and radius restriction. The cage simulations themselves are run with the usual code in code_MC_partially frozen, where for the first 2000 particles we now output the particles position every 50 steps. Note that this is exactly the same simulation as we performed earlier, only now we also output the positions of the particles*

We consider the ratio's between those $d\mathbf{r}$'s because it grants us with information about how much particles move in the same direction. For this we compute the average ratio as a function of the freezing radius for several packing fractions and both restrictions. For Voronoi we find 
![Screenshot from 2025-02-27 10-10-30](https://hackmd.io/_uploads/HJ1B2j6qyg.png)
And to show how these lines come about, we have the following picture. All black lines correspond to individual particles, and the red line is the average
![Screenshot from 2025-02-27 10-11-35](https://hackmd.io/_uploads/HJ8whjT9kl.png)

Radiuscell
![Screenshot from 2025-02-27 11-01-19](https://hackmd.io/_uploads/SJFbd3p5kg.png)

## Continuation 2025-03-10
### Smaller system
*See /home/staff/5670772/glass_largersystem/data_HS_pf_0.58_N_2000/*
**2025-03-13**
First we want to make a comparison with a system of 2000 particles. For that we redo the simulations for this system. Doing so we found that the thermostat of the codes was not set to zero leading to drifting of the system. For the large system, this effect is very small, however, for the small system, it is rather big. This means that we need to redo all the propensity simulation.

**To do this, we reran the mdSingle.c code for 50 propensities starting from the same initial snapshots (because during equilibration drifting does not matter). We save the new simulations in data_measure/run\*/Prun\*_Fcom. In these folders we also save the file cofm.n\*  that saves the center of mass position and velocity to see whether that does not drift to much**

*Foud in the notebook COFM.nb*

| Small system different runs, $\eta=0.58$ |Big system different packing frations |
| -------- | -------- |
|![Screenshot from 2025-03-13 13-35-44](https://hackmd.io/_uploads/rJ_V-Ixnyl.png)|![Screenshot from 2025-03-13 13-35-33](https://hackmd.io/_uploads/B1zQW8x2yg.png) |

where the arrow indicates increasing packing fraction. We also checked in the same notebook that the center of mass velocity is always zero
::: warning
Note that the cofm drifs a little bit because in writing out the cofm I did not take into account the fact that periodic boundaries mess with the cofm. I fixed this in the first run of $\eta=0.58$ and $2000$ particles. Here we see that the cofm stays nicely fixed. 
:::

The propensity can be calculated for both the COFM fixed and non-fixed. When it is not fixed it will be called "meandistdata.dat", while if it is fixed it will be called "meandistdata_fcofm.dat". Both files can be found in the DATA directory (the ex_propensity executable makes sure that all important files are copied there).

In the notebook *Propensity.nb* we plot the propensity for both the systems with and without drift. For the higher packing fractions this does not make a significant difference, but for the smaller system it does (as indicated below, where the blue line is the system withouth drift and the black line is the system with drift.)

![image](https://hackmd.io/_uploads/SJkatOx3kl.png)

::: danger
**2025_03_17** During running, we saw that the simulations again crashed around $t/\tau = 5\tau_\alpha$. Frank suggested a fix where in the addevent function we need to add

*if (dt >= numeventlists * eventlisttime) list_id = numeventlists;    //This also handles int overflow when calculating list_id}*

We added this to the code for $\eta=0.53$. On **2025_03_20** we should check this
:::
### Average value versus peak value
*See notebook maximumdistributions_radiuscell.nb*
We also wanted to see whether the way we classify the distributions of the difference between the cage state and the initial state matters. For that we considered both the peak value as well as the average value of the distribution (where the peak value is obtained via the fitted gamma distribution, while the average is just the average dr from the raw data).

| Peak value|Average | 
| -------- | -------- |
| ![Screenshot from 2025-03-10 14-31-54](https://hackmd.io/_uploads/SJdAtv2sJx.png)| ![Screenshot from 2025-03-10 14-32-43](https://hackmd.io/_uploads/SytZqwnjyg.png)| 

As we can see this essentially looks the same.


### Ratio
*See notebook normcage_radius.nb*
We also wanted to see whether it made a difference how we defined the direction ratio (i.e. do the particles always move to the same point or not). The two ratio's we have are
$$
R_1 = \frac{|\langle d\mathbf{r}\rangle|}{\langle |d\mathbf{r}|\rangle}\text{ and } R_2 = \sqrt{\frac{\langle d\mathbf{r}\rangle2}{\langle d\mathbf{r}2\rangle}}
$$

| $R_1$|$R_2$| 
| -------- | -------- |
|![Screenshot from 2025-03-11 14-53-48](https://hackmd.io/_uploads/Byn_e6ao1e.png)| ![Screenshot from 2025-03-11 14-53-25](https://hackmd.io/_uploads/Sktwgppskx.png)| 

As we can see this essentially looks the same.
### Smaller system
We also want to look at a smaller system of 2000 particles. For freezingradii $2$ to $5$ we measure the results. Below we show the prelimilary results (dashed is small system, solid is large system). 
Here the green line is the $r_f=8$ line
![Screenshot from 2025-05-20 11-20-49](https://hackmd.io/_uploads/BJlqYTKWll.png)
If we substract the difference during the caging regime we obtain
![Screenshot from 2025-05-20 11-41-00](https://hackmd.io/_uploads/Sk-r0pF-xl.png)



Note that for $r=5$ for the small system almost everything moves, so why do we still see such a big difference with the unfrozen system?
![Screenshot from 2025-03-12 11-53-26](https://hackmd.io/_uploads/r1x6Dk121g.png)

#### $\Delta r$ with respect to unfrozen
*MC_partically frozen_pearson_no_LR_large_system_pf_0.\*_radiuscell_w.r.t_unfrozen on my laptop in the folder C:\Users\Rinske\Documents\PHD\Papers self\Caging paper II\Data*

We also look at the difference between frozen and unfrozen cagestate , i.e. $\Delta r^\text{cage, unfrozen - frozen radius n}$. 

| $\eta=0.58$, $10^5$ particles                       | $\eta=0.58$, $2\cdot10^3$ particles                 | Comparison                                          |
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
| ![image](https://hackmd.io/_uploads/SyOTqyo2yg.png) | ![image](https://hackmd.io/_uploads/B1fjhyinkx.png) | ![image](https://hackmd.io/_uploads/H1Az0yo21l.png)|
|![image](https://hackmd.io/_uploads/HkHc7lihke.png)$\eta=0.53$|||

As we can see, even for the freezing radius of seven, there is still quite a big difference
This is what the histogram looks like if we compare to another frozen state
![Screenshot from 2025-05-20 13-49-13](https://hackmd.io/_uploads/SyHwny5Wxx.png)

**TO DO**
- Compare this for the smaller system also for $r=7$ when everything is frozen
- Compare this for other densities
- Compare to other unfrozen_2 (I started these 2025_03_19) to compare how much the difference is for another unfrozen system, to compare when the converge to the same value

**Maybe change all the analysis to this way of thinking about it. It might make more sense!**
### SD
So we plot the SD $\sqrt{\langle\delta \mathbf{r}\cdot\delta\mathbf{r}\rangle}$
![Screenshot from 2025-06-23 15-33-28](https://hackmd.io/_uploads/HJgCPC8Nxx.png)
Which we rescale below by substracting the value at freezing radius 2 and dividing by the value at freezing radius 9
![Screenshot from 2025-06-25 12-15-02](https://hackmd.io/_uploads/rk3HnBYEel.png)
::: danger
Note that the positions during the caging regime are writen out also during equilibration. In that case the entry in the position file starts with a 0, otherwise (during measurements) it starts with a 1. This apparently went wrong for the Voronoi codes where every entry starts with a 0. We do not use those, however note that 1/3 of this data is equilibration. 

Also don't use the average cage state of $\eta=0.57$ freeze radius is $7$, because for this point the simulation at one point stopped, so we redid the simulation in multiple intervals.
:::

### Growing lengthscale
 One can fit figure 5 from the paper with $\Gamma = B\exp[-x/\xi]$ 
 and get this
 

|Fit |$\xi$-values |
| -------- | -------- |
| ![Screenshot from 2025-08-20 16-29-57](https://hackmd.io/_uploads/Hk4UnUXtgx.png)| ![Screenshot from 2025-08-20 16-30-01](https://hackmd.io/_uploads/rJlUhUQYgl.png) |

### Figures/text TO DO and Conclusion
- Intro
	- In the quest of finding a correlation between local structure and dynamic heterogeneity, in the recently publishd roadmap there are roughly two ways forward. More complex machine learning or 'better' structural parameters. In this last categorie we find among others the recently introduced cage state, which captures ... (explanation, pureley structural quantity, etc.).
	-  It turned out that the cage state is an excellent predictor of the dynamics of the particles during the cage state outperforming all other methodologies for the KA system in 3D
	- In this paper we want to probe the characteristics of the cage state in more detail.
		- First  by studying the influence of density on the correlation between the dynamics and the cage state, as well as the way of pinpointing the cage (i.e. Vornoi like or radius cell). Cite paper that looks at different densities via cage state.
		- Second, by developing a methodology inspired by the Point to set function to study to which extent boundaries influence the cage state. 

- Methodology
    - Model: Glass simulations Binary hard spheres, differrent densities (refer to fig. 1, some are more liquid, some are ), etc. 
    - Cage state: How do we compute it, etc. Really structural quantity
    - Fig. 1 Propensities
		- To do
			- [ ] Remake the figure with the new propensities
		- Conclusions
			- We want to also study the characteristic as a function of pf. From the propensity alone we already see that higher packing fractions are not really glassy anymore, while $\eta=0.58$ and $\eta=0.57$ really have a glass plateau.
    - Introducing the freezing radius (Do we want this here?). To study the cage state, we want to research to which extent the boundary has an influence on the cage state. Since there is no natural boundary for an amorphous liquid or solid, a common approch is to pin certain particles in en equlibrium configuration, while letting other particles move. This pinpointing is done in the past in e.g. nucleation study and the PTS in glass studies (cite papers in theory section). In practice, this means, measuring the cage state for a specific particle, by only allowing particles within a certain radius to move in their cage. By doing so, we can, for different densities, study how much the cage state is influenced by the boundary conditions of a pinning field and compare this to the unfrozen system. Fig. 2.
	- We do this for the following freezing radii and the following densities...


- Results
	- Density
		- First we study how well the cage state works as a predictor for the dynamical regime as a function of the density. In this case we do this for both restriction methodologies. See Fig. 2 and conclisions
		- Fig. 3 Correlation restriction Voronoi vs radius
			- To do
				- [ ] Remake the figure with the new propensities
			- Conclusions
				- As expected, the less glassy the system the less strongly the cage state correlates with the dynamices, see figure 1. This is something they also saw in the other paper on the cage state.
				- For $\eta=0.58$ the radius of restriction has only little influence. We see that the peak for radius restrition is slightly higher, while the Voronoi restriction slightly broadens the peak.
				- For lower packing fractions we see that Voronoi restriction leads to significantly lower correlation.s
				- The average displacement during the cage state measurements is way less than the radius of the particle, meaning that the difference between the two restriction methods is not the fact that particles are stuck at the edge of the cell.
				- At lower densities, the shape of the  Voronoi/SANN cell is apparrently such that the obtained cage state correlates less well with the propensities. Therefore, for the remainder of the paper we choose to continue with the radius cell restriction. **How to better phrase this?**
	- Freezing radius
		- Secondly we want to study the influence of the boundary on the found cage state. In Fig. 4 we plot for $\eta = 0.58$ the distance between the initial position and the cage state for up to 7 freezing radii, as well as the unfrozen system. On the distributions we plot a $\Gamma$-function. 
		- Fig. 4
			- Conclusions
				- The $\Gamma$ functions fit the distributions very well. 
				- With increasing freezing radius, $\Delta r^\text{cage}$ on average gets bigger, meaning that particles move more with respect to their initial positions.
                - We see that with increasing freezing radius the system tends to converge to the unfrozen system. However, even at $r/\sigma =7$ where around 2200 particles move ($\frac{\frac{4}{3}\pi7^3\cdot0.58}{\frac{\pi}{6}(0.3+0.7\cdot 0.85^3)}$) the distribution does not overlap completely with the unfrozen system.
		- Although it seems like the difference is small, if we look at the correlation between cage state and propensity, we do see that the difference in correlation differs a lot with increasing freezing radii.
		- Fig. 5a a)
		    - To Do
		        - [ ] Remake this figure with the new propensity data
		    - Conclusions
		        - With increasing freezing radii, the correlation between $\Delta r^\text{cage}$ and the propensity gets significantly bigger. 
		        - The data seems to plateau at 
		        - Why, if there is almost no difference between the $\Delta r^\text{cage}$ distributions, is there such a big difference between the propensity? Look at the distributions and see whether you see differences there. 


- Final discussions
	- We want to answer two questions:
	    - How unique is the cage state, which is kind of a PTS like question. Here we see that as density increases, the cage state becomes more unique, underlying the fact that we can really speak of a cage state and amorphous order.
	    - How far ranges the influence of the boundaries? The question is how we can couple this to a growing lengthscale? It is kind of trivial that boundaries have an influence. 
    - Shape of the cavity: Could also be very well other shapes (Static point-to-set correlations in glass-forming liquids)
    - Comparison to PTS: Small background: quest for growing structural lengthscale either look for order via parameters, or look for amorphous order. In this last category fall the PTS function, where the influence of the boundary is measured (since the influence of boundaries should grow during a thermodynamic phase transition (**They say this in the paper, withouth a source...**)). Since there is no natural boundary in an amorphous solid/fluid, equilibrated particles in the fluid are used as the boundary by freezing the entire system apart from a cavity. The influence on the center of the cavity is then measured (how much overlap in configurations there is), which shows an increase with decreasing temperature. Moreover, they also see that this lengthscale drops more suddenly, meaning that the surface tension is becoming more important. 
	- Note that, compared to PTS, we are really doing structural analysis. In the paper "Static point-to-set correlations in glass-forming liquids" we see that in the bulk, i.e. essentially no freezing, we regain normal glass dynamics, while we would obtain the cage state. Therefore our growing lenghtscale is purely structural.
 
## TO DO 2025-03-20:
- [ ] Remake all figures 
- [ ] See for what freezing radius system 2000 particles converges to unfrozen system. 
- [ ] Go through all analysis files and see whether they are correct (especially the comparison between big and small system).


# TO DO physis/questions
- [ ]  The peaks for radius 1 overlap always (for every packing fraction). What does this mean? Is caging a process that always starts the same and then evolves differently.
	- Radius
	![Screenshot from 2025-02-27 09-55-13](https://hackmd.io/_uploads/BJLKOipcJx.png)
	- Voronoi
	![Screenshot from 2025-02-27 09-55-39](https://hackmd.io/_uploads/Hyjsdj6qJg.png)


- [ ] What is the difference between Voronoi restriction and radius restriction?
- [ ] How accurate are the measurements we performed? 
- [ ] Is there really one well defined cage center? $\rightarrow$ No, for lower packing fractions there isn't. 
- [ ] Why does $\eta  = 0.53$ have a smaller peak at the radius 3 radius?
- [ ] Is what we see purely density related or is it really a lengthscale thing?


## IMPORTANT
- [ ] **2023-08-01**: For $\eta = 0.53$ I found out that most likely the voronoi snapshot had overwritten the radiuscell snapshot (this can happen when the files are submitted at exactly the same time and thus read in the filename of the output snapshot from the same file). I restarted both voronoi and radiuscell simulations to be absolutely sure that these snapshots do not get mixed up. I know that for other packing fractions snapshots are not overwritten because there we have distinct snapshots for the voronoi and radius restrction analysis. For the packing fractions that were not yet finished (i.e. still had the probability to be overwritten) I made a back-up of the radiuscell snapshot (named 'snap...backup.sph').
- [ ] **2025-02-17** I found out that for $\eta = 0.58$ the grow and equilibrate files are deleted. However, in data_measure, we still have the equilibrated snapshots in the form of init.sph $\rightarrow$ It does not really matter.
