Skip to main content

Soft Potato

PyPI CI Documentation Status License Python Version

Soft Potato is an open-source electrochemical simulation and analysis toolkit in Python.

Full documentation: https://softpotato.readthedocs.io | Roadmap: ROADMAP.md | Changelog: CHANGELOG.md

Installation

Stable Release (v3.1.1)

Soft Potato v3.1.1 is available on PyPI and can be installed via pip:

pip install softpotato

Development Version (Milestone 2 in progress)

To install the latest development version directly from GitHub:

pip install git+https://github.com/oliverrdz/softpotato.git

Or clone the repository and install in development mode:

git clone https://github.com/oliverrdz/softpotato.git
cd softpotato
pip install -e ".[dev,docs]"

Quick Start: Solving 1D Diffusion with scipy_ivp

Soft Potato makes it straightforward to simulate chemical diffusion:

$$\frac{\partial c}{\partial t} = D \frac{\partial^2 c}{\partial x^2}$$

Here is a minimal example setting boundary conditions to $0$ at the left boundary ($x=0$) and $1.0$ at the right boundary ($x=1.0$):

import numpy as np
from softpotato.solver import DiffusionProblem, DirichletBC, get_solver

# 1. Define grid and diffusion problem (c = 0 at left, c = 1.0 at right)
grid = np.linspace(0.0, 1.0, 50)
problem = DiffusionProblem(
    grid=grid,
    diffusivity={"c": 1e-4},
    boundary_conditions={"c": (DirichletBC(0.0), DirichletBC(1.0))},
    initial_conditions={"c": 1.0},
)

# 2. Solve using SciPy's Method of Lines solver
solver = get_solver("scipy_ivp")
result = solver.solve(problem, t_span=(0.0, 1.0))

# 3. Save the concentration profile to a variable
c_profile = result["c"]  # 2D array of shape (N_times, N_points)
c_flux = result.fluxes["c"]  # The current can be calculated with i = n*F*A*c_flux

Analytical Equations & Benchmarking (softpotato.analytical)

Soft Potato provides exact closed-form analytical solutions and empirical models for benchmarking numerical solvers and rapid parameter estimation:

import numpy as np
import softpotato as sp

# 1. Planar Cottrell chronoamperometry current transient
t = np.linspace(0.1, 5.0, 50)
i_transient = sp.cottrell(t, n=1, D=1e-5, c_bulk=1e-3, area=1e-4)

# 2. Spherical electrode transient and steady-state limiting current
i_sphere = sp.cottrell_spherical(t, r=1e-5, n=1, D=1e-5, c_bulk=1e-3)

Development Roadmap & Milestones

Soft Potato follows a staged milestone development roadmap for the 3.x series, maintaining strict backwards compatibility across releases:

Milestone Target Focus Area Status
Current Baseline v3.0.0 1D multi-species diffusion solvers (scipy_ivp, Crank–Nicolson, BTCS, FTCS) Released
Milestone 1: Analytical Equations v3.1.0 Vectorized analytical models (step, voltammetry, hydrodynamics, microelectrodes, secm, kinetics), automated solver benchmarking (benchmark), and parameter fitting (fitting) Released
Milestone 2: Grids v3.2.0 Non-uniform, geometric, and exponentially expanding spatial discretization meshes (grid) In Development
Milestone 3: Reactions v3.3.0 Homogeneous chemical mechanisms (EC, EC', catalytic) and heterogeneous charge-transfer kinetics (reactions) Planned
Milestone 4: Techniques v3.4.0 Standard electrochemical experimental waveform generators (CV, CA, DPV, SWV, RDE) and high-level simulation pipelines (techniques) Planned

For detailed architectural plans and deliverable specifications, see the full Roadmap.

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.

Metadata

Release files for softpotato 3.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for softpotato 3.1.1
File Size Uploaded Provenance Actions
softpotato-3.1.1.tar.gz 115.2 kB With provenance Details for softpotato-3.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for softpotato 3.1.1
File Interpreter ABI Platform Actions
softpotato-3.1.1-py3-none-any.whl Python 3 none any Details for softpotato-3.1.1-py3-none-any.whl

Total release size: 211.4 kB

Release files / softpotato-3.1.1.tar.gz

Download URL softpotato-3.1.1.tar.gz
Size 115.2 kB
Tags Source
SHA-256 checksum
How to use checksums
950013bae909abf8a82ce9c7982f8647e31ea5f2252a9ee2397189699d6821e5
BLAKE2b-256 checksum
How to use checksums
6f84c45c75b37ba946af6d28053403b1fbd7e7fc7ea77ca900f601aa89d60ffc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / softpotato-3.1.1-py3-none-any.whl

Download URL softpotato-3.1.1-py3-none-any.whl
Size 96.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79ed2850ae5c6c275057e63a82fe5b035789c6ae515c370320a484bacd619897
BLAKE2b-256 checksum
How to use checksums
25788a6b22ac85859ae28dde02589035b653883f245d698e96509b2c2fe2b42a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Security for softpotato 3.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for softpotato-3.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page