HANNA: binary activity coefficients
HANNA is a hard-constraint neural network that predicts the excess Gibbs energy, and from it thermodynamically consistent activity coefficients, of liquid mixtures from SMILES, temperature and composition. This repository contains the unchanged binary ensemble (ten members), the ChemBERTa encoder and the input scalers that HANNA uses, so that screening-properties (the property package of the ScreeningTool process-screening framework) can download them on first use.
All credit goes to the original authors.
- Code and weights: marco-hoffmann/HANNA, based on the prototype by tspecht93/HANNA (MIT licence, see
LICENSE). - Publications: Specht et al., Chemical Science 2024, 10.1039/D4SC05115G, and the follow-up in Nature Communications (2026), s41467-026-71430-y.
- The
models/ChemBERTaencoder is the copy distributed with HANNA, derived from DeepChem/ChemBERTa-77M-MTR. Please also credit the ChemBERTa authors.
Files
| File | Content |
|---|---|
models/HANNA/ensemble/HANNA_parameters_binary{0-9}.pt |
ensemble state dicts (load with weights_only=True) |
models/ChemBERTa/ |
SMILES encoder and tokenizer (transformers format) |
utils/scalers/*.pkl |
scikit-learn scalers for temperature and embeddings |
The scalers are pickles. screening-properties checks their SHA-256 at a pinned revision before loading them.
In screening-properties, HANNA predictions are fitted to NRTL parameters and accepted only up to a user-chosen maximum held-out ln ฮณ error (settings.max_error).