Skip to content

Commit 6a2c8f7

Browse files
authored
Update description of feos crate in Rust guide (#54)
1 parent a3b0f0a commit 6a2c8f7

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

docs/rustguide/core/index.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ We will learn how equations of state are abstracted using traits, how generalize
55

66
## Setup
77

8-
To setup your workspace, [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the [`feos-core` github repository](https://github.com/feos-org/feos-core) and from that clone the fork.
8+
To setup your workspace, [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the [`feos` github repository](https://github.com/feos-org/feos) and from that clone the fork.
99

10-
To build the Rust library, type:
10+
To build the Rust library, switch to the `feos-core` crate
11+
```
12+
cd feos-core
13+
```
14+
15+
and type:
1116

1217
```
1318
cargo build
@@ -20,7 +25,7 @@ cargo build
2025
- `quantity`: for scalar and vector valued dimensioned quantities. Those are used in almost all user-facing interfaces.
2126
- `num-dual`: for generalized (hyper-) dual numbers. These data types are very important because we use them to be able to compute partial, higher-order derivatives of the Helmholtz energy without needing to implement them analytically.
2227
- `ndarray`: for multidimensional arrays. We use these when mathematical operations are performed on arrays. They are a central data structure for `feos-dft`.
23-
- `pyO3`: for the Python interface. All interfaces to Python are written in pure Rust using `pyO3`. It's awesome.
28+
- `pyo3`: for the Python interface. All interfaces to Python are written in pure Rust using `PyO3`. It's awesome.
2429

2530
```{eval-rst}
2631
.. toctree::

docs/rustguide/index.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ On the following pages we discuss the structure of the {math}`\text{FeO}_\text{s
66
## Introduction
77

88
{math}`\text{FeO}_\text{s}` is primarily developed on Linux but it is tested and runs on Linux, macOS and Windows.
9-
You need a [Rust compiler](https://www.rust-lang.org/tools/install) (version 1.51+) to compile the code.
9+
You need a [Rust compiler](https://www.rust-lang.org/tools/install) to compile the code.
1010
For development, [Visual Studio Code](https://code.visualstudio.com/) with the [rust-analyzer](https://rust-analyzer.github.io/) plugin works pretty well, but you should use what you are comfortable in.
1111

1212
## Prerequisites
@@ -29,7 +29,7 @@ Eventually you'll need to learn and understand
2929

3030
## Project Structure
3131

32-
{math}`\text{FeO}_\text{s}` is split into multiple crates that build on each other.
32+
Some common functionalities of {math}`\text{FeO}_\text{s}` are contained in separate workspace crates so that they can be used as standalone dependencies outside of {math}`\text{FeO}_\text{s}`.
3333
The most important ones are
3434

3535
* `feos-core` (`core` for short): defines traits and structs for equations of state and implements thermodynamic states, phase equilibria and critical point routines.
@@ -38,14 +38,16 @@ The most important ones are
3838
These crates offer abstractions for tasks that are common for all equations of state and Helmholtz energy functionals.
3939
Using `core` and `dft`, the following *implementations* of equations of state and functionals are currently available:
4040

41-
* `feos-pcsaft`: the [PC-SAFT equation of state](https://pubs.acs.org/doi/abs/10.1021/ie0003887).
41+
* `pcsaft`: the [PC-SAFT](https://pubs.acs.org/doi/abs/10.1021/ie0003887) equation of state and Helmholtz energy functional.
42+
* `gc-pcsaft`: the [hetero-segmented group contribution](https://aip.scitation.org/doi/full/10.1063/1.4945000) method of the PC-SAFT equation of state.
43+
* `uv-theory`: the equation of state based on [uv-Theory](https://aip.scitation.org/doi/full/10.1063/5.0073572).
44+
* `pets`: the [PeTS](https://www.tandfonline.com/doi/full/10.1080/00268976.2018.1447153) equation of state and Helmholtz energy functional.
4245

43-
The following crates are actively worked on and will be released in the near future:
46+
In addition to that, the `hard_sphere` and `assocation` modules contain implementations of the corresponding Helmholtz energy contributions that are used across multiple models.
4447

45-
* `feos-gc-pcsaft`: the [hetero-segmented group contribution](https://aip.scitation.org/doi/full/10.1063/1.4945000) method of the PC-SAFT equation of state.
46-
* `feos-uv-theory`: the equation of state based on [uv-Theory](https://aip.scitation.org/doi/full/10.1063/5.0073572).
47-
* `feos-thol`: the [Thol equation of state](https://aip.scitation.org/doi/full/10.1063/1.4945000) for pure Lennard-Jones fluids.
48-
* `feos-pets`: the [PeTS equation of state](https://www.tandfonline.com/doi/full/10.1080/00268976.2018.1447153).
48+
To reduce compile times during development, every model is gated by its own `feature`. Specific parts of the library can be built and tested by passing the corresponding feature flags to the Rust compiler.
49+
50+
Due to the particular treatment of procedural macros in Rust, an additional workspace crate `feos-derive` provides procedural macros for the implementation of the `EquationOfState` and `HelmholtzEnergyFunctional` traits for `enum`s used in FFIs like `PyO3`.
4951

5052

5153
## Where to Get Help

0 commit comments

Comments
 (0)