Skip to content

Commit 88637ed

Browse files
authored
Enhance README with installation and usage details
Expanded the README to include installation instructions, demo run commands, configuration parameters, and tips for usage.
1 parent 5c2d789 commit 88637ed

File tree

1 file changed

+83
-21
lines changed

1 file changed

+83
-21
lines changed

README.md

Lines changed: 83 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,90 @@
11
# ChromoSim
2+
23
1D ion-exchange chromatography column simulator (mechanistic; multi-species; gradient; FPLC-style outputs)
34

4-
**ChromoSim** is a general, mechanistic simulator for ion-exchange chromatography
5-
(anionic or cationic). It models 1D convection–dispersion with competitive binding
6-
and supports user-defined affinity maps (e.g., surface-potential dependent) or
7-
constant-affinity protein models.
5+
**ChromoSim** simulates axial convection–dispersion with competitive Langmuir binding. Affinity can be constant (e.g., proteins) or mapped to a per-species property (e.g., surface potential) with salt-dependent screening. Outputs: breakthrough curves, in-column heatmaps, and an FPLC-style trace (mL / pseudo-mAU) with a %B overlay.
86

97
## Highlights
10-
- Multi-species breakthrough & in-column heatmaps
11-
- FPLC-style output (mL / pseudo-mAU) with %B overlay
12-
- Fast stiff-ODE integration with sparse Jacobian
13-
- Works for proteins, nanoparticles, EVs (by configuration)
8+
9+
* Multi-species breakthrough + in-column heatmaps
10+
* FPLC-style plot (elution volume in mL, pseudo-mAU) with %B overlay
11+
* Fast stiff-ODE solve with a sparse Jacobian
12+
* Configurable for proteins, nanoparticles, or EVs
13+
14+
## Install
15+
16+
```bash
17+
# from the repo root
18+
python -m venv .venv
19+
source .venv/bin/activate # Windows: .venv\Scripts\activate
20+
pip install -U pip setuptools wheel
21+
pip install -r requirements.txt # installs ChromoSim in editable mode
22+
```
23+
24+
## Run a demo
25+
26+
```bash
27+
# CLI entry point (if available)
28+
chromosim-run
29+
30+
# or run the example script directly
31+
python -m scripts.main_ev_aex
32+
```
33+
34+
This builds derivative matrices, integrates the model, and opens:
35+
36+
* Breakthrough/elution with %B overlay
37+
* In-column concentration heatmap
38+
* FPLC-style trace (mL / pseudo-mAU) with %B overlay
39+
40+
## Configure a run
41+
42+
Edit parameters in **`scripts/main_ev_aex.py`** (or create your own script):
43+
44+
* **Column & grid:** `L`, `N` (with `dz = L/N`), `eps`
45+
* **Hydrodynamics:** `u` (via flow), `Dax`
46+
* **Species:** `Nsp`, `frac`, optional per-species property array
47+
* **Capacity:** `qmax`
48+
* **Kinetics:** `kd0`, `K0`, `gamma`, and `fI(I)` (or set `gamma=0` for constant affinity)
49+
* **Programs:** `grad_start`, `grad_end`, `I_load`, `I_elute` and `salt_profile(t)`
50+
* **Feed:** `Cfeed_total`, `frac`, `feed_profile(t)` (e.g., 5 min load at 1 mL/min)
51+
52+
## What the model solves (brief)
53+
54+
Mobile phase for species *i*:
55+
[
56+
\partial_t C_i = -u,\partial_z C_i + D_{\mathrm{ax}},\partial_{zz} C_i - \frac{1-\varepsilon}{\varepsilon},\partial_t Q_i
57+
]
58+
Wall phase (competitive Langmuir):
59+
[
60+
\partial_t Q_i = k_{a,i} C_i\Big(Q_{\max}-\sum_j Q_j\Big) - k_{d,i}Q_i
61+
]
62+
Optional affinity map:
63+
[
64+
K_i \equiv \frac{k_{a,i}}{k_{d,i}} = K^\circ \exp!\big(\gamma,|P_i|,f(I)\big)
65+
]
66+
*(Use constant (K_i) by setting (\gamma=0).)*
1467

1568
## Repo layout
16-
- `src/` library code (added later)
17-
- `examples/` runnable demos (added later)
18-
- `assets/` figures/schematics (MIT-licensed)
19-
- `data/` small demo data (LFS)
20-
- `docs/` user docs & images
21-
- `tests/` lightweight checks
22-
23-
## Quick start
24-
Examples and core library will be added in v0.1.0.
25-
For now, see `docs/` for the modeling overview.
26-
27-
## License
28-
MIT for code and assets.
69+
70+
* `chromosim/` core library
71+
72+
* `numerics/` derivative matrices, sparsity, ODE system
73+
* `models/` parameter helpers (profiles, defaults)
74+
* `scripts/` runnable examples
75+
* `docs/` user docs & public figures (MIT)
76+
* `requirements.txt`, `pyproject.toml` packaging
77+
78+
## Tips
79+
80+
* Coarser grids (`N`) run faster; refine only to resolve peak shape.
81+
* If plots don’t show on macOS, try: `export MPLBACKEND=TkAgg` before running.
82+
* To compare with instrument data, adjust `eps_det` in the example to match the mAU scale visually.
83+
84+
## Contributing
85+
86+
Issues and PRs welcome. See `CONTRIBUTING.md` and `CODE_OF_CONDUCT.md`.
87+
88+
## License & citation
89+
90+
MIT for code and assets. If you use ChromoSim in a publication, please cite the repo (`CITATION.cff`).

0 commit comments

Comments
 (0)