Skip to content

seandavies555/nanoadsorption

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nanoadsorption

Repository coding for a mean-field model of nanoparticle adsorption to cells

Prerequisites

Install uv (Python Package Manager)

macOS and Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows:

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/

Install Rust

macOS, Linux, and WSL:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Windows: Download and run the installer from: https://rustup.rs/

After installation, restart your terminal or run:

source $HOME/.cargo/env

Running the Simulation

Step 1: Run the Rust Implementation

Navigate to the rust directory and run the simulation:

cd rust
cargo run --release

This will generate adsorption_rust.dat in the rust directory.

Step 2: Copy Rust Results to Top Level

Copy the generated file to the repository root:

cp adsorption_rust.dat ..
cd ..

Step 3: Run the Python Implementation

Run the Python simulation and generate plots:

uv run main.py

This will:

  • Generate adsorption.dat (Python results)
  • Create adsorption.png (plot from Python results)
  • Create adsorption_rust.png (plot from Rust results)

Output Files

  • 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 results
  • adsorption_rust.png - Plot of Rust simulation results

About

Repository coding for a mean-field model of nanoparticle adsorption to cells

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 51.9%
  • Rust 44.4%
  • Shell 3.7%