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.0)

Soft Potato v3.1.0 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.0

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.0
File Size Uploaded Provenance Actions
softpotato-3.1.0.tar.gz 114.7 kB With provenance Details for softpotato-3.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 210.3 kB

Release files / softpotato-3.1.0.tar.gz

Download URL softpotato-3.1.0.tar.gz
Size 114.7 kB
Tags Source
SHA-256 checksum
How to use checksums
aa7218dd70a930231ef56e233abddb8d44f085804d6b96eb25d1b8b2a2cfe3db
BLAKE2b-256 checksum
How to use checksums
4266476e2cf1c1efac45f565503169a4750d2879927c42f63349439cb4211d01
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 1, 2026.

Transparency log

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

Download URL softpotato-3.1.0-py3-none-any.whl
Size 95.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f0cc42de5ad692e3ad441270e2229718c811c6c7e7ad522da2128b430498e5d
BLAKE2b-256 checksum
How to use checksums
a155652cd5a4096e4b3e710fa1753729c74ad32b31fdccfe92406e6c9400b76a
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 1, 2026.

Transparency log

Security for softpotato 3.1.0

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.0.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 1, 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.0 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