Skip to main content

FeOs - A Framework for Equations of State and Classical Density Functional Theory

crate documentation repository documentation FeOs Publication

The FeOs package provides Rust implementations of different equation of state and Helmholtz energy functional models and corresponding Python bindings.

import feos
import si_units as si

# PC-SAFT parameters for methanol (Gross and Sadowski 2002)
record = feos.PureRecord(
    feos.Identifier(name="methanol"),
    molarweight=32.04,
    m=1.5255,
    sigma=3.23,
    epsilon_k=188.9,
    association_sites=[{
      "kappa_ab": 0.035176,
      "epsilon_k_ab": 2899.5,
      "na": 1,
      "nb": 1,
    }]
)

# Build an equation of state
parameters = feos.Parameters.new_pure(record)
eos = feos.EquationOfState.pcsaft(parameters)

# Define thermodynamic conditions
critical_point = feos.State.critical_point(eos)

# Compute properties
p = critical_point.pressure()
t = critical_point.temperature
print(f"Critical point for methanol: T={t/si.KELVIN:.1f} K, p={p/si.BAR:.1f} bar.")
Critical point for methanol: T=531.5 K, p=106.5 bar.

Models

The following models are currently published as part of the FeOs framework

name description eos dft
pcsaft perturbed-chain (polar) statistical associating fluid theory ✓ ✓
epcsaft electrolyte PC-SAFT ✓
gc-pcsaft (heterosegmented) group contribution PC-SAFT ✓ ✓
pets perturbed truncated and shifted Lennard-Jones mixtures ✓ ✓
uvtheory equation of state for Mie fluids and mixtures ✓
saftvrqmie equation of state for quantum fluids and mixtures ✓ ✓
saftvrmie statistical associating fluid theory for variable range interactions of Mie form ✓
multiparameter Multiparameter Helmholtz energy equations of state for common pure components ✓

The list is being expanded continuously. Currently under development are implementations of Helmholtz energy functionals for the UV theory and for SAFT-VR Mie.

Other public repositories that implement models within the FeOs framework, but are currently not part of the feos Python package, are

name description eos dft
feos-fused-chains heterosegmented fused-sphere chain functional ✓

Parameters

In addition to the source code for the Rust and Python packages, this repository contains JSON files with previously published parameters for the different models including group contribution methods. The parameter files can be read directly from Rust or Python.

Properties and phase equilibria

The crate makes use of generalized (hyper-) dual numbers to generically calculate exact partial derivatives from Helmholtz energy equations of state. The derivatives are used to calculate

  • equilibrium properties (pressure, heat capacity, fugacity, and many more),
  • transport properties (viscosity, thermal conductivity, diffusion coefficients) using the entropy scaling approach
  • critical points and phase equilibria for pure components and mixtures.

In addition to that, utilities are provided to assist in the handling of parameters for both molecular equations of state and (homosegmented) group contribution methods and for the generation of phase diagrams for pure components and binary mixtures.

Classical density functional theory

FeOs uses efficient numerical methods to calculate density profiles in inhomogeneous systems. Highlights include:

  • Fast calculation of convolution integrals in cartesian (1D, 2D and 3D), polar, cylindrical, and spherical coordinate systems using FFT and related algorithms.
  • Automatic calculation of partial derivatives of Helmholtz energy densities (including temperature derivatives) using automatic differentiation with generalized (hyper-) dual numbers.
  • Modeling of heterosegmented molecules, including branched molecules.
  • Functionalities for calculating surface tensions, adsorption isotherms, pair correlation functions, and solvation free energies.

Cargo features

Without additional features activated, the command

cargo test --release

will only build and test the core functionalities of the crate. To run unit and integration tests for specific models, run

cargo test --release --features pcsaft

to test, e.g., the implementation of PC-SAFT or

cargo test --release --features all_models

to run tests on all implemented models.

Python package

FeOs uses the PyO3 framework to provide Python bindings. The Python package can be installed via pip and runs on Windows, Linux and macOS:

pip install feos

If there is no compiled package for your system available from PyPI and you have a Rust compiler installed, you can instead build the python package from source using

pip install git+https://github.com/feos-org/feos

This command builds the package without link-time optimization (LTO) that can be used to increase the performance further. See the Building from source section for information about building the wheel including LTO.

Building from source

To compile the code you need the Rust compiler and maturin installed. To install the package directly into the active environment (virtualenv or conda), use

cd py-feos
maturin develop --release

which uses the wheel feature collection specified in the pyproject.toml file.

Alternatively, you can specify the models or features that you want to include in the python package explicitly, e.g.

maturin develop --release --features "pcsaft dft"

for the PC-SAFT equation of state and Helmholtz energy functional.

To build wheels including link-time optimization (LTO), use

maturin build --profile="release-lto"

which will use the wheel feature collection specified in the pyproject.toml file. The emscripten_wheel collection provides the same models and AD support for Pyodide while omitting incompatible features (such as Rayon, SQLite, and the Rayon-dependent 3D DFT classes). Use the following command to build a wheel with specific features:

maturin build --profile="release-lto" --features "pcsaft ..."

LTO increases compile times measurably but the resulting wheel is more performant and has a smaller size. For development however, we recommend using the --release flag.

Documentation

For a documentation of the Python API, Python examples, and a guide to the underlying Rust framework check out the documentation.

Benchmarks

Check out the benches directory for information about provided Rust benchmarks and how to run them.

Developers

This software is currently maintained by members of the groups of

Contributing

FeOs grew from the need to maintain a common codebase used within the scientific work done in our groups. We share the code publicly as a platform to publish our own research but also encourage other researchers and developers to contribute their own models or implementations of existing equations of state.

If you want to contribute to FeOs, there are several ways to go: improving the documentation and helping with language issues, testing the code on your systems to find bugs, adding new models or algorithms, or providing feature requests. Feel free to message us if you have questions or open an issue to discuss improvements.

Cite us

If you find FeOs useful for your own scientific studies, consider citing our publication accompanying this library.

@article{rehner2023feos,
  author = {Rehner, Philipp and Bauer, Gernot and Gross, Joachim},
  title = {FeOs: An Open-Source Framework for Equations of State and Classical Density Functional Theory},
  journal = {Industrial \& Engineering Chemistry Research},
  volume = {62},
  number = {12},
  pages = {5347-5357},
  year = {2023},
}

Metadata

Release files for feos 0.10.3

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

Built distributions (wheels)

Table of built distributions (wheels) for feos 0.10.3
File
feos-0.10.3-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
feos-0.10.3-cp310-abi3-win32.whl CPython 3.10 abi3 Windows x86-32 Details
feos-0.10.3-cp310-abi3-pyemscripten_2026_0_wasm32.whl CPython 3.10 abi3 PyEmscripten 2026.0+ WebAssembly Details
feos-0.10.3-cp310-abi3-manylinux_2_34_x86_64.whl CPython 3.10 abi3 Linux glibc 2.34+ x86-64 Details
feos-0.10.3-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
feos-0.10.3-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 115.9 MB

Release files / feos-0.10.3-cp310-abi3-win_amd64.whl

Download URL feos-0.10.3-cp310-abi3-win_amd64.whl
Size 22.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
76bb2e187430ac6305039216a6c68b8838b622881404a2f1d501579a95213aa4
BLAKE2b-256 checksum
How to use checksums
b15b8ec7661db70f8953b231af0f1d4af4535e9f535b063582b50094930fa65c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / feos-0.10.3-cp310-abi3-win32.whl

Download URL feos-0.10.3-cp310-abi3-win32.whl
Size 20.9 MB
Tags CPython 3.10 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
7cf65268f0141437604dfd4b6a5fde0dacdaa4158655ae8ec076541c433c3db3
BLAKE2b-256 checksum
How to use checksums
472172efcaaf6f89f558bce3b1206f3d25e602ac1e2be7e75ecb934be6ff735f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / feos-0.10.3-cp310-abi3-pyemscripten_2026_0_wasm32.whl

Download URL feos-0.10.3-cp310-abi3-pyemscripten_2026_0_wasm32.whl
Size 11.9 MB
Tags CPython 3.10 PyEmscripten 2026.0+ WebAssembly abi3
SHA-256 checksum
How to use checksums
ce889be976f0223d6e95cb9f118ea3db8c628c9ffc57cc1ef5e86e44a05cb728
BLAKE2b-256 checksum
How to use checksums
3cc62d868d2756d7e4d4b9a346d3560ca2f4be9b917884b7a78080599e45eac0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / feos-0.10.3-cp310-abi3-manylinux_2_34_x86_64.whl

Download URL feos-0.10.3-cp310-abi3-manylinux_2_34_x86_64.whl
Size 21.8 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
cc9777e9c5f47cb49d2f907d493fc64fe21dcae89b92672b0f298e067d05ca1b
BLAKE2b-256 checksum
How to use checksums
b22492a0ba8639a27c0bd0bba3366313b270fdd698170adc7d2f65a927fad869
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / feos-0.10.3-cp310-abi3-macosx_11_0_arm64.whl

Download URL feos-0.10.3-cp310-abi3-macosx_11_0_arm64.whl
Size 18.4 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
418d2a182e2cab75b4b24b2f71edf948eb939e7a59b6410d14bc18509a67a7d8
BLAKE2b-256 checksum
How to use checksums
16b530e0e623a1722f513868eff32fd93c79da4e37d881408599e66dd00232c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / feos-0.10.3-cp310-abi3-macosx_10_12_x86_64.whl

Download URL feos-0.10.3-cp310-abi3-macosx_10_12_x86_64.whl
Size 20.8 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7f83246e538d0c87a756c44c9a03a0cabdd95dad48ad19da059511a3038fc49e
BLAKE2b-256 checksum
How to use checksums
0894e863fc7ea6d80cdcd094ca3b6d1ec89857ada1c9f192663fa248b6a83a85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release history Release notifications | RSS feed

This release

0.10.3 This release

6 release files

0.10.2

6 release files

0.10.1

6 release files

0.10.0

5 release files

0.9.6

5 release files

0.9.5

5 release files

0.9.4

5 release files

0.9.3

5 release files

0.9.2

5 release files

0.9.1

5 release files

0.9.0

5 release files

0.8.0

5 release files

0.7.0

5 release files

0.6.1

5 release files

0.6.0

5 release files

0.5.1

5 release files

0.5.0

5 release files

0.4.3

5 release files

0.4.2

5 release files

0.4.1

5 release files

0.4.0

5 release files

0.3.0

5 release files

0.2.1

5 release files

0.2.0

5 release files

0.1.1

5 release files

0.1.0

5 release files

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