Pysac
Pairwise interaction segment activity coefficients, reference implementation in Python
Install / Use
/learn @lvpp/PysacREADME
Pairwise interacting surface activity coefficient, reference implementation in Python
This repository contains a reference implementation of pairwise interacting surface activity coefficient (SAC) equations. There are two accompanying papers showing the derivation of all equations used:
- Ref. 1 - Beyond activity coefficients with pairwise interacting surface (COSMO-type) models.
- Ref. 2 - Unraveling Order and Entropy with Modern Quasi-Chemical Models.
All the relevant SAC equations are implemented in the pysac.py module favoring readability over efficiency. The base code is not dependent on how the surface interaction energies are actually calculated and then it can be adapted to work as a COSMO-RS/SAC, F-SAC, COSMO-SAC-Phi, etc. implementation.
Interactive notebooks
In addition to the SAC equations implementation, there are many jupyter interactive notebooks.
Notebooks related to Ref. 1:
- List all microstates for a given number of segments
- Nonrandom factors for a five compund mixture
- Excess properties for a size-symmetric nonideal mixture
- Excess properties for a size-symmetric nonideal mixture, adjusted UNIQUAC parameters
- Excess properties for a size-asymmetric nonideal mixture
- Study on the interaction probabylities of a size-symmetric mixture
- Study on the interaction probabylities of a size-asymmetric mixture
- Study on the interaction probabylities of a nearly ideal mixture
- Excess properties with temperature dependent interaction energies
- Numerical check for excess energy with temperature dependent interaction energies
Notebooks related to Ref. 2:
- Model polar/inert system
- Model hydrogen bonding/inert system
- Excess properties for the chloroform/methanol mixture
- Excess properties for the n-butanol/n-hexane mixture
- Excess properties for the tetrahydrofuran/water mixture
Running on your machine
Requirements
You will need a jupyter installation on your machine.
Clone or download the repository
Clone this repository using git or download the code and extract the zip contents.
Running
Enter the root directory of the project and run:
jupter-notebook
This should start the notebook app and open your web browser so that you can run and edit the notebooks.
Another option is simply to open the project directory with Visual Studio Code and install the suggested Python extensions.
Other related projects
The reader might be also interested in the following related projects:
Related Skills
node-connect
342.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.7kCommit, push, and open a PR
