Skip to main content

Python simulation framework for mycorrhizal network biophysics with Freiman-Villani thermodynamic analysis

Project description

MycoNet

Python simulation framework for mycorrhizal network biophysics with Freiman–Villani thermodynamic analysis.

Python License: MIT PyPI arXiv


Overview

MycoNet implements the simulation and computational validation described in:

Mercier des Rochettes, B. (2026). MycoNet: A Python Framework for Mycorrhizal Network Biophysics. arXiv:2026.XXXXX [q-bio.QM]

Companion theory paper:

Mercier des Rochettes, B. (2026). Geometric Efficiency Bounds for Mycorrhizal Networks: A Freiman–Villani Framework. Journal of Mathematical Biology. arXiv:2026.YYYYY

The central result (Theorem 6.1): a mycorrhizal network with local Freiman index σ_r(Γ) satisfies

Ψ(Γ) ≥ C* · D / ε² · (σ_r(Γ) − K_hex)²

where K_hex = 19/7 ≈ 2.714, C* ≈ 21.8, ε is mean hyphal spacing, D is diffusivity.


Installation

pip install myconet

From source:

git clone https://github.com/quantumproteinsai/myconet
cd myconet
pip install -e ".[dev]"

Quick start

from myconet import MycoNetSimulation

sim     = MycoNetSimulation(seed=42)
results = sim.run(T=120, drought_onset=48)
results.summary()
results.plot()

Reproducing Figure 1

# Single run (~3 min)
python examples/drought_stress.py --save fig1.png

# 10-run ensemble — matches paper exactly (~25 min)
python examples/drought_stress.py --ensemble --save fig1.png

On a VPS or remote server (runs in background):

pip install myconet
git clone https://github.com/quantumproteinsai/myconet
cd myconet
pip install -e ".[dev]"

screen -S myconet
python examples/drought_stress.py --ensemble --save fig1.png
# Ctrl+A then D to detach — reconnect with: screen -r myconet

Key modules

Module Content
myconet.freiman Local Freiman index via k-NN + hex-integer FFT Minkowski sum
myconet.network HyphalNetwork, hexagonal lattice generation, drift field
myconet.transport Fokker–Planck solver, Wasserstein W₂ (log-Sinkhorn/POT), Fisher info
myconet.simulation MycoNetSimulation, SimulationParams, ensemble runner

Theoretical constants (all exact):

Constant Value Source
K_HEX 19/7 ≈ 2.714 Lemma 4.1: hexagonal local doubling constant
C_STAR 256·49/576 ≈ 21.8 Theorem 6.1: dissipation bound constant
c0 7/24 ≈ 0.292 Proposition 4.4a: perturbative Freiman–Wasserstein constant
c0_TV √7/24 ≈ 0.110 Proposition 4.4b: universal Tao–Vu constant

Citation

@software{myconet2026,
  author  = {Mercier des Rochettes, Bertrand},
  title   = {{MycoNet}: Python simulation framework for mycorrhizal network biophysics},
  year    = {2026},
  url     = {https://github.com/quantumproteinsai/myconet},
  version = {1.0.0}
}

License

MIT © 2026 Bertrand Mercier des Rochettes / Quantum Proteins AI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

myconet-1.0.6.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

myconet-1.0.6-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file myconet-1.0.6.tar.gz.

File metadata

  • Download URL: myconet-1.0.6.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for myconet-1.0.6.tar.gz
Algorithm Hash digest
SHA256 17583e5073ceecf25421596a6024a150dfed2f5c7cfb2fae3870a69754b2b3bc
MD5 b34817577d6f57ce4a5352ef188b8019
BLAKE2b-256 2ff6fd0970795ef46f6ec19ad6138ac04f9d470de6b8ae1c002a1d3366a3f8fc

See more details on using hashes here.

File details

Details for the file myconet-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: myconet-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for myconet-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7f2a823361f56179d704ad973c1715d41b1a84f4ebc2eb56780c8e8b8230238a
MD5 4d658a05929f9ca05831b411873b011d
BLAKE2b-256 78fe45b37d11f101f64a1828119d5612638ac36dc5aadb98301989620cfaee86

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page