Skip to main content
When you use a PyBaMM model, solver, or parameter set, the library automatically registers the relevant BibTeX citation keys. You can print all registered citations at the end of your simulation script.

pybamm.print_citations

Print (or save) all citations that were registered during the session.
str | None
default:"None"
If provided, write citations to this file instead of stdout.
str
default:"\"text\""
Output format:
  • "text" — human-readable plain text (via pybtex plain style)
  • "bibtex" — raw BibTeX entries
bool
default:"false"
If True, annotate each citation with the PyBaMM component that registered it. Only available when writing to stdout (not to a file).
print_citations requires the optional pybtex dependency. Install it with pip install pybamm[cite].

pybamm.citations.register

Manually register a citation key or an inline BibTeX string.
str
required
Either:
  • A citation key that exists in pybamm/CITATIONS.bib (e.g. "Chen2020")
  • A full BibTeX string (e.g. "@article{MyWork2024, ...}")
Registering an inline BibTeX entry with the same key as an existing entry will overwrite the existing citation without error.

CITATIONS.bib

All built-in citation keys are stored in pybamm/CITATIONS.bib. The file uses standard BibTeX format. Some notable keys:

Automatic Registration

Citations are registered automatically when you instantiate certain objects: