This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
PolyPESTO is a parameter estimation package for polymerization data using PyPESTO. It provides a framework for modeling chemical kinetics, particularly polymerization reactions, and estimating parameters from experimental data.
The project uses setuptools with pyproject.toml configuration. Install in development mode:
pip install -e .- Core dependencies include pypesto[amici,petab,fides], python-libsbml, h5py
- Development dependencies include pytest, pytest-cov for testing
- Visualization tools: plotly, matplotlib, seaborn
- Jupyter support included for notebook development
pytest- Tests are located in the
tests/directory - Main test fixtures are defined in
tests/conftest.py - Test models include "BinaryIrreversible" and "LotkaVolterra"
- Tests use parameterized fixtures for different model types
pytest tests/path/to/specific_test.py
pytest -k "test_name_pattern"polypesto.core: Central framework components
Study: Main class for managing parameter estimation studies across multiple problems and parameter setsProblem: Individual optimization problems with model, data, and parameter definitionsexperiment.py: Experimental data handlingconditions.py: Simulation condition managementparams.py: Parameter group and set definitionspetab.py: Integration with PEtab standardpypesto/: PyPESTO integration utilities
polypesto.models: Model definitions
ModelBase: Abstract base class for all modelsbinary/: Binary polymerization modelsexample/: Example models like Lotka-Volterrasbml.py: SBML model utilities- Models automatically generate AMICI models in
amici_models/directory
polypesto.visualization: Plotting and visualization utilities
- Modular visualization components for different analysis types
- Integration with plotly, matplotlib, and seaborn
polypesto.utils: Utility functions
file.py: JSON I/O utilitieslogging.py: Logging configurationpatches.py: Compatibility patches
- Models inherit from
ModelBaseand define SBML representations - Study objects manage collections of problems with different parameter sets
- Type aliases used extensively for complex nested dictionaries (e.g.,
ProbParamDict) - AMICI integration for efficient simulation and sensitivity analysis
- Models define chemical kinetics via SBML
- Study objects coordinate parameter estimation across multiple problems
- Problems contain model + data + parameter bounds
- PyPESTO performs optimization
- Results stored and visualized through dedicated modules
- Create new model class inheriting from
ModelBaseinpolypesto/models/ - Implement required abstract methods for SBML definition
- Add observables and parameter definitions
- Test with existing test framework fixtures
Check polypesto/examples/ for example scripts showing typical workflows.