Skip to content

OptimaSolver.jl ​

OptimaSolver is a Julia-native primal-dual interior-point solver for Gibbs-energy minimization in equilibrium chemistry.

It solves problems of the form

where is the Gibbs free energy (e.g.    for an ideal/dilute solution),   is the mass-conservation (stoichiometric) matrix,   is the element-abundance vector, and is a small positivity floor.

Key features ​

  • Schur-complement Newton step — reduces the  -dimensional KKT system to an   system by exploiting the diagonal Hessian structure. For chemistry problems is typically the number of elements ( ), so this is a dramatic reduction.

  • Filter line search — Wächter & Biegler (2006) filter method with Armijo sufficient decrease on the barrier objective.

  • Variable stability classification — near-bound (absent) species receive reduced step sizes to avoid numerical blow-up near the positivity boundary.

  • Implicit-differentiation sensitivity — post-solve computation of and using the same Schur-complement factorization as the last Newton step.

  • Warm-start — consecutive solves (e.g. temperature scans, titration curves) reuse the previous solution as the starting point, typically halving the iteration count or more.

  • ForwardDiff / AD compatibility — no Float64 casts; the entire solver stack is written in generic Julia arithmetic so thermodynamic parameters can be differentiated through the solver.

  • SciML drop-in — OptimaOptimizer implements SciMLBase.AbstractOptimizationAlgorithm and is a drop-in replacement for IpoptOptimizer in ChemistryLab.jl.

Lineage ​

OptimaSolver is a Julia port of the optima C++ library developed by Allan Leal (ETH Zürich):

https://github.com/reaktoro/optima

The algorithmic design — Schur-complement reduction, filter line search, variable stability classification, and implicit-differentiation sensitivity — originates from that library and from the following reference:

Leal, A.M.M., Blunt, M.J., LaForce, T.C. (2014). Efficient chemical equilibrium calculations for geochemical speciation and reactive transport modelling. Geochimica et Cosmochimica Acta, 131, 301–322. https://doi.org/10.1016/j.gca.2014.01.038

The Julia port was authored by Jean-François Barthélémy (CEREMA, France) with assistance from Claude Code (Anthropic).

OptimaSolver.jl is an independent port: it is not affiliated with, endorsed by, or supported by the authors of the upstream Optima library or by the Reaktoro project. Please report problems with this package here rather than to them. The package logo is an original work made for this port and reproduces no mark of the upstream project.

Documentation structure ​

SectionContent
Getting StartedInstallation and first solve
TheoryInterior-point algorithm, KKT, Schur complement, filter line search, sensitivity
Basic UsageSimple Gibbs problems, Canonicalizer reuse
Warm StartTemperature scans, SciML caching
Sensitivity,
SciML InterfaceOptimaOptimizer with ChemistryLab.jl
API ReferenceDocstrings for all exported symbols