Authors: James V. Raj, Xiaohan Sun, Charles Emmett Maher, Katherine A. Newhall, and Mason A. Porter
This directory contains the source code used to generate the figures for the paper "Local Geometric and Transport Properties of Networks that are Generated from Hyperuniform Point Patterns".
This code analyzes the transport efficiency and robustness of Hyperuniform-Point-Pattern-Induced (HuPPI) networks compared to Poisson-Point-Pattern-Induced (PoPPI) networks. It includes implementations for generating four types of geometric graphs (Delaunay, Gabriel, Voronoi, and Delaunay-centroidal) and calculating measurements including Total Effective Resistance (TER), Ollivier-Ricci Curvature (ORC), Random-Walk Mixing Times, and network robustness.
| Directory | Manuscript Figure | Description |
|---|---|---|
fig1/ |
Figure 1 | Normalized TER (ℛ_norm) vs Disorder Strength (a) |
fig2/ |
Figure 2 | Normalized TER (ℛ_norm) vs Network Size (n) |
fig3/ |
Figure 3 | Random-Walk Mixing Time vs Disorder Strength (a) |
fig4/ |
Figure 4 | Histograms of ORC Distributions |
fig5/ |
Figure 5 | Mean ORC vs Disorder Strength (a) |
fig6/ |
Figure 6 | Mean ORC vs Network Size (n) |
fig7/ |
Figure 7 | Scatter plots: ORC (κ) vs TER Edge Contribution (Δℛ_tot) |
fig8/ |
Figure 8 | Robustness (LCC Size) under Edge Removal |
supp/ |
Supplementary | Random-Walk Mixing Time (Bar Chart) |
- Install the required dependencies:
pip install -r requirements.txt- Make sure you're in the
HuPPI-Network-Analysisdirectory before running any scripts.
HuPPI-Network-Analysis/
├── utils/ # Shared utility modules
│ ├── network/
│ │ ├── generators.py # LatticeGenerator and GraphGenerator classes
│ │ └── measures.py # Network_Measures class (curvature, resistance, etc.)
│ └── helpers/
│ └── common.py # Helper utilities (UnionFind, validation, etc.)
├── fig1/ # Figure 1: TER vs Disorder Strength
├── fig2/ # Figure 2: TER vs Network Size
├── fig3/ # Figure 3: Mixing Time vs Disorder Strength
├── fig4/ # Figure 4: ORC Distribution Histograms
├── fig5/ # Figure 5: Mean ORC vs Disorder Strength
├── fig6/ # Figure 6: Mean ORC vs Network Size
├── fig7/ # Figure 7: ORC vs TER Correlation
├── fig8/ # Figure 8: Network Robustness
├── supp/ # Supplementary: Mixing Time Bar Chart
├── requirements.txt
└── README.md
For each figure, the workflow is:
- Generate Data: Run
generate_data.py(ormake_data.pyfor fig4) to create the necessary data files - Create Plots: Run
plot.pyto generate the figure from the data
Navigate to the HuPPI-Network-Analysis directory, then run:
# Figure 1: Normalized TER vs Disorder Strength
cd fig1
python generate_data.py
python plot.py
# Figure 2: Normalized TER vs Network Size
cd fig2
python generate_data.py
python plot.py
# Figure 3: Random-Walk Mixing Time vs Disorder Strength
cd fig3
python generate_data.py
python plot.py
# Figure 4: ORC Distribution Histograms
cd fig4
python make_data.py # Note: uses make_data.py instead of generate_data.py
python plot.py
# Figure 5: Mean ORC vs Disorder Strength
cd fig5
python generate_data.py
python plot.py
# Figure 6: Mean ORC vs Network Size
cd fig6
python generate_data.py
python plot.py
# Figure 7: ORC vs TER Edge Contribution (Scatter plots)
cd fig7
python generate_data.py
python plot.py
# Figure 8: Network Robustness (Edge Removal)
cd fig8
python generate_data.py
python plot.py
# Supplementary: Mixing Time Bar Chart
cd supp
python generate_data.py
python plot.pyYou can also use the master script to run any figure:
python run_figure.py 1 both # Generate data and plot for Figure 1
python run_figure.py 5 generate # Only generate data for Figure 5
python run_figure.py 8 plot # Only plot (assuming data exists) for Figure 8
python run_figure.py supp both # Run supplementary figureEach figure has a config.py file (where applicable) that contains:
- Data generation parameters (lattice size, ensemble size, alpha values, etc.)
- Plotting parameters (figure size, colors, fonts, etc.)
- Output directories
You can modify these parameters to customize the experiments.
The code generates four types of geometric graphs from point patterns:
- Delaunay: Delaunay triangulation
- Gabriel: Gabriel graph (subset of Delaunay)
- Delaunay-centroidal: Graph connecting centroids of Delaunay simplices
- Voronoi: Voronoi tessellation graph
Two types of point patterns are compared:
- Hyperuniform (Class I): Perturbed lattice points with controlled disorder
- Poisson (Random): Uniformly distributed random points
- ORC (Ollivier-Ricci Curvature): Edge-level curvature measure
- TER (Total Effective Resistance): Network connectivity/transport measure
- Mixing Time: Random walk convergence measure
- LCC (Largest Connected Component): Robustness measure under edge removal
Generated plots are saved to a plots/ subdirectory within each figure folder.
Data files are saved to a data/ subdirectory (created automatically).