# `equi_gel`

`equi_gel` is the shared library behind the publication workflows. It builds
PC-SAFT parameter dictionaries, interfaces with `feos`, traces phase
boundaries, evaluates fitting objectives, stores JSON records, and provides
common plotting helpers.

## Prerequisites

Install the repository environment from the root README. The package expects
Python `3.11` and the dependencies pinned in
[`../../../pyproject.toml`](../../../pyproject.toml).

## Module Guide

- [`__init__.py`](__init__.py): package marker
- [`parameters.py`](parameters.py): loads parameter tables, assembles component
  and binary dictionaries, saves/loads curated parameter sets, and rescales
  polymer molar mass
- [`interface_feos.py`](interface_feos.py): builds `feos` PC-SAFT states and
  pure-component property calculations
- [`newton_raphson.py`](newton_raphson.py): Newton residuals, Jacobians, and
  low-level solvers
- [`newton_raphson_tracing.py`](newton_raphson_tracing.py): continuation tools
  for binary and ternary phase-boundary tracing
- [`alternating_tangents.py`](alternating_tangents.py): spinodal, LCST, and
  alternating-tangent utilities
- [`elastic_contribution.py`](elastic_contribution.py): Flory, phantom, and
  Miao elasticity contributions and derivatives
- [`cost_func_binodal.py`](cost_func_binodal.py): distance metrics used in
  binodal and swelling fits
- [`optimize_parameters.py`](optimize_parameters.py): differential-evolution
  wrappers and CSV history logging
- [`save_load_json.py`](save_load_json.py): JSON naming, save/load, and
  record-discovery helpers
- [`plot_binary.py`](plot_binary.py) and [`plot_ternary.py`](plot_ternary.py):
  shared plotting helpers and style accessors
- [`plotting_style.mplstyle`](plotting_style.mplstyle): shared Matplotlib style

## Notes

`save_load_json.py` resolves the repository root from the installed package
path and maps record types to `02_CalculationData/` and
`03_ExperimentalData/`. The package is intended as an internal research library
for the section scripts, not as a separately versioned public API.
