ugropy
A Python library designed to swiftly and effortlessly obtain the UNIFAC-like groups from molecules by their names and subsequently integrate them into inputs for thermodynamic libraries. UNIFAC, PSRK, Joback, and Abdulelah-Gani models are implemented.
Science Score: 62.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 4 committers (25.0%) from academic institutions -
✓Institutional organization owner
Organization ipqa-research has institutional domain (ipqa.unc.edu.ar) -
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Keywords
Repository
A Python library designed to swiftly and effortlessly obtain the UNIFAC-like groups from molecules by their names and subsequently integrate them into inputs for thermodynamic libraries. UNIFAC, PSRK, Joback, and Abdulelah-Gani models are implemented.
Basic Info
- Host: GitHub
- Owner: ipqa-research
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://ipqa-research.github.io/ugropy/
- Size: 35 MB
Statistics
- Stars: 22
- Watchers: 3
- Forks: 2
- Open Issues: 3
- Releases: 8
Topics
Metadata Files
README.md

ugropy is a Python library to obtain subgroups from different thermodynamic
group contribution models using both the name or the SMILES representation of a
molecule. If the name is given, the library uses the
PubChemPy library to obtain the SMILES
representation from PubChem. In both cases, ugropy uses the
RDKit library to search the functional groups
in the molecule.
ugropy is tested for Python 3.10, 3.11, 3.12, and 3.13 on Linux, Windows
and Mac OS.
You can access the documentation here: https://ipqa-research.github.io/ugropy/
Try ugropy now
You can try ugropy without installing it by clicking on the Colab badge.
You can install ugropy by:
shell
pip install ugropy
Models implemented
Gibbs / EoS models
- Classic liquid-vapor UNIFAC
- Predictive Soave-Redlich-Kwong (PSRK)
- Dortmund (modified UNIFAC)
Property estimators
- Joback
- Abdulelah-Gani (beta)
Writers
ugropy allows you to convert the obtained functional groups or estimated
properties to the input format required by the following thermodynamic
libraries:
Example of use
Here is a little taste of ugropy, please, check the full tutorial
here to see
all it has to offer!
Get groups from the molecule's name:
```python from ugropy import Groups
hexane = Groups("hexane")
print(hexane.unifac.subgroups) print(hexane.psrk.subgroups) print(hexane.dortmund.subgroups) print(hexane.joback.subgroups) print(hexane.agani.primary.subgroups) ```
{'CH3': 2, 'CH2': 4}
{'CH3': 2, 'CH2': 4}
{'CH3': 2, 'CH2': 4}
{'-CH3': 2, '-CH2-': 4}
{'CH3': 2, 'CH2': 4}
Get groups from molecule's SMILES:
```python propanol = Groups("CCCO", "smiles")
print(propanol.unifac.subgroups) print(propanol.psrk.subgroups) print(propanol.dortmund.subgroups) print(propanol.joback.subgroups) print(propanol.agani.primary.subgroups) ```
{'CH3': 1, 'CH2': 2, 'OH': 1}
{'CH3': 1, 'CH2': 2, 'OH': 1}
{'CH3': 1, 'CH2': 2, 'OH (P)': 1}
{'-CH3': 1, '-CH2-': 2, '-OH (alcohol)': 1}
{'CH3': 1, 'CH2': 2, 'OH': 1}
Estimate properties with the Joback and Abdulelah-Gani models!
```python limonene = Groups("limonene")
print(limonene.joback.subgroups) print(f"{limonene.joback.criticaltemperature} K") print(f"{limonene.joback.vaporpressure(176 + 273.15)} bar") ```
{'-CH3': 2, '=CH2': 1, '=C<': 1, 'ring-CH2-': 3, 'ring>CH-': 1, 'ring=CH-': 1, 'ring=C<': 1}
657.4486692170663 kelvin
1.0254019428522743 bar
python
print(limonene.agani.primary.subgroups)
print(limonene.agani.secondary.subgroups)
print(limonene.agani.tertiary.subgroups)
print(f"{limonene.agani.critical_temperature}")
print(limonene.agani.molecular_weight / limonene.agani.liquid_molar_volume)
{'CH3': 2, 'CH2=C': 1, 'CH2 (cyclic)': 3, 'CH (cyclic)': 1, 'CH=C (cyclic)': 1}
{'CH3-CHm=CHn (m,n in 0..2)': 1, '(CHn=C)cyc-CH3 (n in 0..2)': 1, 'CHcyc-C=CHn (n in 1..2)': 1}
{}
640.1457030826214 kelvin
834.8700605718585 gram / liter
Visualize your results! (The next code creates the ugropy logo)
```Python mol = Groups("CCCC1=C(COC(C)(C)COC(=O)OCC)C=C(CC2=CC=CC=C2)C=C1", "smiles")
mol.unifac.draw( title="ugropy", width=800, height=450, titlefontsize=50, legendfontsize=14 ) ```
ugropy can obtain multiple solutions, even nonoptimal ones if desired. For
example:
```python from ugropy import unifac
solutions = unifac.getgroups( "9,10-dihydroanthracene", searchmultiplesolutions=True, searchnonoptimal=True )
for sol in solutions: print(sol.subgroups) ```
{'ACH': 8, 'AC': 2, 'ACCH2': 2}
{'CH2': 1, 'ACH': 8, 'AC': 3, 'ACCH2': 1}
{'CH2': 2, 'ACH': 8, 'AC': 4}
Write down the Clapeyron.jl .csv input files.
```python from ugropy import writers
names = ["limonene", "adrenaline", "Trinitrotoluene"]
grps = [Groups(n) for n in names]
Write the csv files into a database directory
writers.toclapeyron( moleculesnames=names, unifacgroups=[g.unifac.subgroups for g in grps], psrkgroups=[g.psrk.subgroups for g in grps], joback_objects=[g.joback for g in grps], path="database" ) ``` Obtain the Caleb Bell's Thermo subgroups
```python from ugropy import unifac
names = ["hexane", "ethanol"]
grps = [unifac.get_groups(n) for n in names]
[writers.to_thermo(g.subgroups, unifac) for g in grps] ```
[{1: 2, 2: 4}, {1: 1, 2: 1, 14: 1}]
Owner
- Name: IPQA research
- Login: ipqa-research
- Kind: organization
- Location: Córdoba, Argentina
- Website: https://ipqa.unc.edu.ar/
- Twitter: IPQACONICET
- Repositories: 1
- Profile: https://github.com/ipqa-research
Citation (CITATION.cff)
cff-version: 1.2.0
title: "Ugropy: An Extensible Python Package for Thermodynamic Model’s Functional Groups Identification via ILP Minimization"
message: "If you use this software, please cite it as below."
authors:
- family-names: Brandolín
given-names: Salvador Eduardo
orcid: https://orcid.org/0000-0002-8255-6322
- family-names: Benelli
given-names: Federico Ezequiel
orcid: https://orcid.org/0009-0002-0072-815X
- family-names: Magario
given-names: Ivana
orcid: https://orcid.org/0000-0001-7909-4131
- family-names: Scilipoti
given-names: José Antonio
version: 3.1.0
repository-code: 'https://github.com/ipqa-research/ugropy'
url: 'https://ipqa-research.github.io/ugropy/'
license: MIT
GitHub Events
Total
- Create event: 10
- Release event: 3
- Issues event: 4
- Watch event: 5
- Delete event: 6
- Issue comment event: 5
- Push event: 66
- Pull request review comment event: 1
- Pull request review event: 5
- Pull request event: 16
Last Year
- Create event: 10
- Release event: 3
- Issues event: 4
- Watch event: 5
- Delete event: 6
- Issue comment event: 5
- Push event: 66
- Pull request review comment event: 1
- Pull request review event: 5
- Pull request event: 16
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| salvador | s****n@m****r | 116 |
| salvadorbrandolin | s****n@g****m | 58 |
| Salvador Brandolin | 8****n | 6 |
| Federico E. Benelli | f****i@o****m | 3 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 7
- Total pull requests: 30
- Average time to close issues: about 2 months
- Average time to close pull requests: 10 minutes
- Total issue authors: 2
- Total pull request authors: 2
- Average comments per issue: 0.71
- Average comments per pull request: 0.17
- Merged pull requests: 30
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 12
- Average time to close issues: about 13 hours
- Average time to close pull requests: 21 minutes
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 2.0
- Average comments per pull request: 0.33
- Merged pull requests: 12
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- SalvadorBrandolin (6)
- fedebenelli (2)
Pull Request Authors
- SalvadorBrandolin (40)
- fedebenelli (3)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 433 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 10
- Total maintainers: 1
pypi.org: ugropy
Get UNIFAC functional groups of PubChem compounds or SMILES representation.
- Homepage: https://github.com/ipqa-research/ugropy
- Documentation: https://ugropy.readthedocs.io/
- License: The MIT License
-
Latest release: 3.1.6
published 8 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout master composite
- actions/setup-python v2 composite
- numpy >= 1.25.1
- pandas >= 2.0.3
- pubchempy == 1.0.4
- rdkit == 2023.3.2
- check-manifest * development
- chemspipy ==2.0.0 development
- commitizen * development
- flake8-black * development
- flake8-builtins * development
- flake8-import-order * development
- flake8-nb * development
- ipdb * development
- ipython * development
- jupyter * development
- matplotlib * development
- nbsphinx * development
- numpy >=1.25.1 development
- pandas >=2.0.3 development
- pep8-naming * development
- pubchempy ==1.0.4 development
- pydocstyle * development
- pytest * development
- pytest-cov * development
- rdkit ==2023.3.2 development
- sphinx * development
- sphinx_copybutton * development
- sphinx_rtd_theme * development
- tox * development
- numpy >=1.25.1
- pandas >=2.0.3
- pubchempy ==1.0.4
- rdkit ==2023.3.2
- Sphinx *
- ipykernel *
- ipython *
- matplotlib *
- nbsphinx *
- sphinx_copybutton *
- sphinx_rtd_theme *
- sphinxcontrib-bibtex *