Skip to content

Models

HANNA

HANNA is a hard-constraint neural network model for the excess Gibbs energy that predicts activity coefficients in a strictly thermodynamically consistent manner [1, 2]. It only requires the SMILES of the components and the temperature as input. The model satisfies thermodynamic boundary conditions by construction, ensuring consistency of the predicted activity coefficients.

Two versions of the model are available:

  • ogHANNA: The original version (HANNA v1.0.0), trained on binary VLE data (up to 10 bar) and limiting activity coefficients from the Dortmund Data Bank [1]. This version is limited to binary mixtures.

  • HANNA (alias multHANNA): The latest version, trained on VLE and LLE data, and applicable to multi-component mixtures [2].

MLThermoProperties.ogHANNA Type
julia
ogHANNA <: ActivityModel

ogHANNA(components;
puremodel = nothing,
userlocations = String[],
pure_userlocations = String[],
verbose = false,
reference_state = nothing)

Input parameters

  • SMILES: canonical SMILES (using RDKit) representation of the components

  • Mw: Single Parameter (Float64) (Optional) - Molecular Weight [g·mol⁻¹]

Input models

  • puremodel: model to calculate pure pressure-dependent properties

Description

Hard-Constraint Neural Network for Consistent Activity Coefficient Prediction (HANNA v1.0.0). The implementation is based on this Github repository. ogHANNA was trained on all available binary VLE data (up to 10 bar) and limiting activity coefficients from the Dortmund Data Bank. ogHANNA was only developed for binary mixtures. Use HANNA for multicomponent mixtures.

Example

julia
using MLThermoProperties, Clapeyron

components = ["water","isobutanol"]
Mw = [18.01528, 74.1216]
smiles = ["O", "CC(C)CO"]

model = ogHANNA(components,userlocations=(;Mw=Mw, SMILWS=smiles))
# model = ogHANNA(components) # also works if components are in the database

References

  1. Specht, T., Nagda, M., Fellenz, S., Mandt, S., Hasse, H., Jirasek, F., HANNA: Hard-Constraint Neural Network for Consistent Activity Coefficient Prediction. Chemical Science 2024. 10.1039/D4SC05115G.
source
MLThermoProperties.multHANNA Type
julia
HANNA <: ActivityModel
multHANNA

HANNA(components;
puremodel = nothing,
userlocations = String[],
pure_userlocations = String[],
verbose = false,
reference_state = nothing)

Input parameters

  • SMILES: canonical SMILES (using RDKit) representation of the components

  • Mw: Single Parameter (Float64) (Optional) - Molecular Weight [g·mol⁻¹]

Input models

  • puremodel: model to calculate pure component properties

Description

Hard-Constraint Neural Network for Consistent Activity Coefficient Prediction (HANNA). HANNA was trained on all available binary VLE data (up to 10 bar) and limiting activity coefficients from the Dortmund Data Bank.

Example

julia
using MLThermoProperties, Clapeyron

components = ["dmso", "ethanol", "aspirin"]
Mw = [78.13, 46.068, 180.158]
smiles = ["CS(=O)C", "CCO", "CC(=O)Oc1ccccc1C(=O)O"]

model = HANNA(components,userlocations=(;Mw=Mw, SMILES=smiles))
# model = HANNA(components) # also works if components are in the database

References

  1. M. Hoffmann, T. Specht, Q. Göttl, J. Burger, S. Mandt, H. Hasse, and F. Jirasek: A Machine-Learned Expression for the Excess Gibbs Energy, (2025), DOI: https://doi.org/10.48550/arXiv.2509.06484.
source

mod. UNIFAC 2.0 and UNIFAC 2.0

UNIFAC 2.0 and mod. UNIFAC 2.0 are enhanced versions of the classical group-contribution methods UNIFAC and mod. UNIFAC (Dortmund), respectively. Missing interaction parameters are predicted using matrix completion, which significantly extends the applicability of the methods and leads to a higher prediction accuracy compared to the original versions [3, 4]. The methods for UNIFAC 2.0 and mod. UNIFAC 2.0 are described in the Clapeyron.jl documentation.

GRAPPA

GRAPPA is a graph neural network model for predicting vapor pressures and boiling points of pure components [5]. The model predicts the parameters , , and of the Antoine equation:

On model construction, the Antoine parameters are predicted and a SaturationModel is automatically created, which enables the calculation of the vapor pressure via saturation_pressure for a given temperature.

MLThermoProperties.GRAPPA Type
julia
GRAPPA{T} <: SaturationModel

GRAPPA(
    components;
    userlocations = String[],
    verbose::Bool=false
)

Description

GRAPPA model for calculating vapor pressure of pure components based on the Antoine equation. On model construction, the Antoine parameters are predicted using a Python implementation the GRAPPA model.

Requires loading the package PythonCall.jl

GRAPPA uses a modified Python implementation taken from https://github.com/marco-hoffmann/GRAPPA. Therefore to use the GRAPPA model, you need to install and load the package PythonCall.jl by

julia
using Pkg; Pkg.add("PythonCall")    # Installation
using PythonCall                    # Loading

For predicting the Antoine parameters, only the smiles of the molecule is required. It will automatically be retrieved from the Clapeyron.jl database. The smiles can also be provided by the userlocations keyword (see example below).

Example

julia
using Clapeyron, PythonCall

model = GRAPPA("propanol")
model = GRAPPA("propanol"; userlocations=(; smiles="CCCO"))

ps, _, _ = saturation_pressure(model, 300.)         # Vapor pressure at 300 K

References

  1. M. Hoffmann, H. Hasse, and F. Jirasek: GRAPPA—A Hybrid Graph Neural Network for Predicting Pure Component Vapor Pressures, Chemical Engineering Journal Advances 22 (2025) 100750, DOI: https://doi.org/10.1016/j.ceja.2025.100750.
source

ESE

ESE is a hybrid model for predicting binary diffusion coefficients at infinite dilution [6]. The model incorporates the Stokes-Einstein equation and ensures a physically consistent temperature dependence of the predicted diffusion coefficients. It only requires the SMILES of the solute and solvent as input, together with a viscosity model for the solvent.

MLThermoProperties.ESE Type
julia
ESE <: AbstractTransportPropertyModel

ESE(components;
vismodel = nothing,
userlocations = String[],
vis_userlocations = String[],
verbose = false)

Input parameters

  • SMILES: canonical SMILES (using RDKit) representation of the components

  • Mw: single parameter (Float64) (Optional) - Molecular Weight [g·mol⁻¹]

  • vismodel: viscosity model

Description

ESE model for calculating diffusion coefficients at infinite dilution. The diffusion coefficient at infinite dilution can be calculated by calling inf_diffusion_coefficient.

If no viscosity model is specified, a GCESModel from EntropyScaling.jl is constructed (if possible). A constant viscosity model can also be used if the viscosity η is knwon as ESE(...; vismodel=ConstantModel(Viscosity(), η)).

Examples

julia
using MLThermoProperties, EntropyScaling

model = ESE(["ethanol", "acetonitrile"])
D_matrix = inf_diffusion_coefficient(model, 1e5, 300.)
D_eth = inf_diffusion_coefficient(model, 1e5, 300.; solute="ethanol", solvent="acetonitril")
source