Repository coding for a mean-field model of nanoparticle adsorption to cells
macOS and Linux:
curl -LsSf https://astral.sh/uv/install.sh | shWindows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"For more installation options, visit: https://docs.astral.sh/uv/getting-started/installation/
macOS, Linux, and WSL:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shWindows: Download and run the installer from: https://rustup.rs/
After installation, restart your terminal or run:
source $HOME/.cargo/envNavigate to the rust directory and run the simulation:
cd rust
cargo run --releaseThis will generate adsorption_rust.dat in the rust directory.
Copy the generated file to the repository root:
cp adsorption_rust.dat ..
cd ..Run the Python simulation and generate plots:
uv run main.pyThis will:
- Generate
adsorption.dat(Python results) - Create
adsorption.png(plot from Python results) - Create
adsorption_rust.png(plot from Rust results)
adsorption.dat- Python simulation results (3 columns: receptor density, effective KD, adsorbed fraction)adsorption_rust.dat- Rust simulation results (same format)adsorption.png- Plot of Python simulation resultsadsorption_rust.png- Plot of Rust simulation results