# Third-party code and data

Everything this repository redistributes, with the version it was taken at, how
to check that the shipped bytes are that version, the upstream terms, and how to
cite it.

The tables below are **generated** by `tools/repo_facts.py` from the files in
this tree, and `tests/test_hygiene.py:test_public_documents_match_the_artifacts`
fails the build when they drift. Do not hand-edit inside the generated markers;
run `python3 tools/repo_facts.py --write`.

Every term quoted below was read from the source named beside it, not from
memory. Where a term restricts use, it is stated plainly rather than summarised
into something friendlier.

---

## Vendored code (`docs/vendor/`)

<!-- BEGIN GENERATED: vendor-table -->
| file | what it is | version | licence | bytes | sha256 (first 16) |
|---|---|---|---|---|---|
| `glpk.esm.js` | glpk.js, an Emscripten build of the GNU Linear Programming Kit | 4.0.1 (bundles **GLPK 5.0**) | **GPL-3.0** | 251,265 | `6ceef7db223c32f5` |
| `plotly.min.js` | Plotly.js, cartesian bundle | 2.35.2 | MIT | 1,358,851 | `72409fd95b505d17` |
<!-- END GENERATED: vendor-table -->

### glpk.js, GPL-3.0, and why that matters here

`docs/autocurator.js` line 2 imports this module, and it drives every
flux-based check (blocked reactions, FVA, the energy-generating-cycle panel,
validation FBA). It is executed on every visit, so the GPL-3.0 code is both
distributed and run as part of the published page. See `LICENSE` clause 2.

Verified in this session, not assumed:

* `https://registry.npmjs.org/glpk.js/4.0.1` reports `"license": "GPL-3.0"`,
  repository `git+https://github.com/jvail/glpk.js.git`.
* The file's embedded base64 payload inflates to a 337,591-byte WebAssembly
  module (magic `0061736d`, sha256 `63be40cf68b81e0b3252c1362b30c03d…`)
  containing the strings `GLPK Simplex Optimizer`, `GLPK Integer Optimizer`,
  `glp_simplex`, and the version string `5.0`.

As published upstream the file is sha256
`83bfcf847737abebccc317da580407b87699672808aacc271861b93b8bfb9ff4`
(250,953 bytes). The copy in this repository is that file with a licence header
prepended, because the upstream file's only header advertises pako's MIT AND
Zlib terms and can be misread as covering the whole module. To recover the
upstream bytes exactly:

```sh
tail -n +5 docs/vendor/glpk.esm.js | sha256sum
# 83bfcf847737abebccc317da580407b87699672808aacc271861b93b8bfb9ff4
```

* Verbatim licence text: `docs/vendor/GLPK-LICENSE` (GPL-3.0, 35,147 bytes,
  sha256 `8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903`).
* Corresponding source: <https://github.com/jvail/glpk.js> at tag `v4.0.1`;
  the solver it builds is GLPK 5.0 from <https://www.gnu.org/software/glpk/>.
* glpk.js embeds **pako 2.0.4** (MIT AND Zlib) as its inflater; that is the
  component the upstream first-line header refers to.

> Note for anyone copying a notices block from a sibling repository: FluxStudio
> records this same artifact as "glpk.js GPL-2.0 (GLPK) / MIT wrapper". That is
> wrong on both halves, the package is GPL-3.0 and there is no MIT wrapper.
> Use the table above, which was written from the package metadata.

### Plotly.js, MIT

Header of `docs/vendor/plotly.min.js`: *"plotly.js (cartesian - minified)
v2.35.2 / Copyright 2012-2024, Plotly, Inc. / Licensed under the MIT license"*.
Upstream: <https://github.com/plotly/plotly.js>.

## Bundled data (`docs/data/`)

<!-- BEGIN GENERATED: data-table -->
| file | derived from | bytes | sha256 (first 16) |
|---|---|---|---|
| `e_coli_core.json` | BiGG Models (redistributed model) | 173,441 | `7bedec10576cfe93` |
| `growthdb.json` | GrowthDB (this institute) | 4,179,267 | `80379f646825a681` |
| `spectrum.json` | GrowthDB + Media DB (this institute) | 4,578,795 | `9b6b3e087ad198d0` |
| `media_ex.json` | Media DB (this institute) | 727,736 | `c30c08c1d3bb8877` |
| `backbone_coverage.json` | MetaNetX/MNXref | 1,211 | `2d3ebec8b0d0003c` |
| `backbone_migration.json` | MetaNetX/MNXref | 488,672 | `2d2994974bb666ae` |
| `metabolite_map.json.gz` | MetaNetX/MNXref | 2,805,059 | `c4aa007dbe347b9d` |
| `reaction_map.json.gz` | MetaNetX/MNXref | 1,193,430 | `26a01009a991eae1` |
| `bigg_met_props.json.gz` | MetaNetX/MNXref + BiGG | 924,755 | `76d086ac80280580` |
| `pka_table.json` | ModelSEED Biochemistry | 1,068,419 | `10e5b0dd12656617` |
| `thermo_rxn.json.gz` | ModelSEED Biochemistry | 410,734 | `651992bbe5d020c0` |
| **total** | | **16,551,519** | |
<!-- END GENERATED: data-table -->

### MetaNetX / MNXref, CC BY 4.0, with inheritance

Release **4.4**, dated **2022/03/16**, from <https://www.metanetx.org/ftp/4.4/>.
Verified from the header of the `chem_prop.tsv` used to build the maps:

> MetaNetX copyright 2011 SystemsX, SIB Swiss Institute of Bioinformatics.
> Except where otherwise noted, the data available from this site are licensed
> under a Creative Commons Attribution 4.0 International License. […] MNXref
> uses information on cellular compartments, reactions, and metabolites that is
> sourced from a number of external resources. […] the data from MNXref may be
> considered to be subject to the original licensing restrictions of the
> external resource.

That last sentence is the operative one: MNXref's own CC BY 4.0 does **not**
launder the terms of what it aggregates. MNXref 4.4 aggregates BiGG 1.6.0, the
Cell Component Ontology 25.0, ChEBI 203, enviPath, HMDB 4.0, KEGG 98.0+, LIPID
MAPS, MetaCyc 25.0, Reactome 77, Rhea 119, SABIO-RK, The SEED 2.6.1 and
SwissLipids. Two of those carry restrictions that reach this bundle:

* **BiGG Models**: Copyright 2015 The Regents of the University of California,
  *All Rights Reserved*; permission granted to use, copy, modify and distribute
  "for educational, research and non-profit purposes, without fee, and without a
  written agreement". Any other use requires a written agreement.
* **KEGG**: academic users may use the site freely; *"Non-academic users and
  Academic users intending to use KEGG for commercial purposes are requested to
  obtain a license agreement"* (<https://www.kegg.jp/kegg/legal.html>).

Cite: Moretti S, Tran VDT, Mehl F, Ibberson M, Pagni M. *MetaNetX/MNXref:
unified namespace for metabolites and biochemical reactions in the context of
metabolic models.* Nucleic Acids Research (2021) 49:D570-D574.

### ModelSEED Biochemistry Database, CC BY 4.0, with the same inheritance

`compounds.tsv` and `reactions.tsv` from
<https://github.com/ModelSEED/ModelSEEDDatabase>, used by
`tools/build_thermo_pka.py` for pKa sites, reaction reversibility and Δ<sub>r</sub>G′<sup>m</sup>.
Verified from that repository's `LICENSE`:

> Except where otherwise noted, the data available from the ModelSEED github
> repository is licensed under a Creative Commons Attribution 4.0 International
> License. […] this data may be considered to be subject to the original
> licensing restrictions of the external resource.

Cite: Seaver SMD et al. *The ModelSEED Biochemistry Database for the integration
of metabolic annotations and the reconstruction, comparison and analysis of
metabolic models for plants, fungi and microbes.* Nucleic Acids Research (2021)
49:D575-D588.

### BiGG Models, `docs/data/e_coli_core.json`

The demo model the landing page loads is the BiGG *e_coli_core* model,
redistributed here. It falls under the BiGG terms quoted above: educational,
research and non-profit use without fee; anything else needs a written
agreement.

Cite: King ZA et al. *BiGG Models: A platform for integrating, standardizing and
sharing genome-scale models.* Nucleic Acids Research (2016) 44:D515-D522.
Orth JD, Fleming RMT, Palsson BØ. *Reconstruction and Use of Microbial Metabolic
Networks: the Core Escherichia coli Metabolic Model as an Educational Guide.*
EcoSal Plus (2010).

### GrowthDB and Media DB, this institute

`growthdb.json`, `media_ex.json` and `spectrum.json` are snapshots built by
`tools/build_validation.py`. The bundle stamps its own provenance:
`growthdb.json` carries `meta = {built: 2026-07-21, n_records: 5163,
n_species: 1296, n_mu: 4540, growthdb_rev: be8e54c9f, media_rev: 067d6b7}`.
Upstream: <https://github.com/omidard/GrowthDB> and
<https://github.com/omidard/Media>. Every record in GrowthDB carries its own
literature citation; those citations, not this file, are what a paper should
cite for a measured growth rate.

---

## Web fonts (`docs/assets/fonts/`)

`ibm-plex-sans-var.woff2`, `ibm-plex-mono-400.woff2` and `ibm-plex-mono-500.woff2` are the
latin subsets of IBM Plex Sans and IBM Plex Mono, retrieved 2026-09-08. Copyright 2017 IBM
Corp., with the reserved font name "Plex", licensed under the SIL Open Font License 1.1.
The full licence text ships beside them as `docs/assets/fonts/OFL.txt`. The OFL permits
redistribution of the font files with that notice and forbids selling them on their own. It
places no condition on the pages that display them, and no condition on commercial use of
this tool.

---

## What this means if the tool is commercialised

C5783 frames this resource as grant and spin-out material. On the terms above,
the bundle **as shipped** is not clear for commercial use: BiGG is non-profit /
educational only without a written agreement, and KEGG-derived content requires
a licence agreement for commercial use. Making a commercial build clean would
mean either obtaining those agreements, or rebuilding the identifier backbone
from sources whose terms permit it and dropping the redistributed BiGG model.
That is a decision to take deliberately, not by omission.
