pybamm
Skill by K-Dense-AI
Simulates lithium-ion battery charge, discharge and rest experiments with PyBaMM and compares predicted voltage curves with measured cycling data. Built for battery modelers using SPM or DFN electrochemical models.
Install pybamm
Built from the published package, never by AI.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/pybamm ~/.claude/skills/pybammRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/scientific-agent-skills/skills/pybamm ~/.gemini/antigravity-cli/skills/pybammAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The pybamm skill runs single-cell constant-current charge, discharge and rest experiments with PyBaMM 26.9.0.0. Protocols are written as JSON with finite step durations, C-rates and optional voltage cutoffs. The helper uses the IDAKLU solver, records parameter provenance in a report, and runs two numerical comparisons: a tighter solver tolerance and a doubled mesh.
If measured data with time, voltage and current columns is supplied, the helper reports voltage RMSE, MAE and bias, plus current RMSE, and exports the residuals. The source says it does not control a battery cycler or establish an operating envelope for hardware. It is intended for researchers and engineers doing electrochemical battery simulation and numerical validation.
Written from the project's SKILL.md and checked against it.
What it can do
- Protocol simulationRuns constant-current charge, discharge and rest steps from a JSON protocol.
- SPM and DFN modelsUses SPM or DFN electrochemical models, which the tested helper runs isothermally.
- Parameter provenanceSaves base parameters after SOC initialization and the parameter source in report.json.
- Numerical sensitivity checksCompares tighter solver tolerances and a doubled mesh against the baseline run.
- Measurement comparisonComputes voltage RMSE, MAE, bias and current RMSE against user-supplied CSV data.
- Residual exportWrites measurement-residuals.csv with prediction minus measurement and current mismatch.
What you need
- Python 3.12
- PyBaMM 26.9.0.0
- pybammsolvers 0.10.0 (IDAKLU)
- Network access for installation
Try asking
- Simulate a 0.5C discharge and charge protocol with the Chen2020 reference case.
- Compare my SPM voltage curve with this measured cycling CSV file.
- Check mesh and solver sensitivity for my battery simulation results.
Good to know
- Does not control a battery cycler or establish a hardware operating envelope.
- Tested models are isothermal and exclude aging, mechanics, plating and pack control.
- CasadiSolver and ScipySolver are deprecated in this release; IDAKLU is recommended.
- The frozen reference case is numerical regression evidence, not measured-cell validation.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/pybamm/SKILL.md, skills/pybamm/scripts/simulate_battery.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md7 KB -
assets/chen2020-protocol.json340 B -
references/protocol-and-comparison.md8 KB -
scripts/simulate_battery.py13 KB
Alternatives to pybamm
All alternatives →Searches arXiv for scientific papers and preprints, extracts their metadata and abstracts, and downloads PDF or HTML full text. Suited to users who need research papers, literature or specific arXiv IDs.
Downloads AlphaFold predicted structures and PAE matrices for a UniProt ID, then reports pLDDT confidence, domain boundaries and disorder. Built for users who already have a UniProt accession.
Queries the QuickGO and Evidence & Conclusion Ontology REST API to map genes to Gene Ontology terms. Built for researchers doing functional annotation and GO hierarchy exploration.
Connects an AI assistant to Peloton to browse fitness classes, check live and archived schedules, and manage workouts. Built for Peloton users who want to plan rides from their assistant.
Queries NCBI Gene through the E-utilities and Datasets API. It helps researchers search genes by symbol or ID, retrieve gene details, and run batch lookups for annotation and functional analysis.
Prepares and launches nf-core/pacsomatic runs for matched tumor-normal PacBio HiFi data starting from unaligned BAM files. It generates samplesheets and pinned launch artifacts, then runs locally or submits to a scheduler.
Compare with literature-search-arxiv, alphafold-database-fetch-and-analyze or quickgo-database
pybamm: common questions
Does it model battery aging?
The source says the tested models exclude aging, mechanics, plating and pack control.
Which battery models does it support?
It supports SPM and DFN electrochemical models. The tested helper runs them isothermally.
Can it validate a model against measured data?
It compares predicted voltage curves with measured CSV data and reports residuals. The source warns that a small voltage error under a mismatched input current does not validate the model.
How do I install pybamm?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is pybamm free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is pybamm safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to pybamm?
Similar skills: literature-search-arxiv, alphafold-database-fetch-and-analyze, quickgo-database, peloton.
