{"id":15018279,"url":"https://github.com/ipqa-research/ugropy","last_synced_at":"2025-06-20T03:39:25.352Z","repository":{"id":192935566,"uuid":"671308343","full_name":"ipqa-research/ugropy","owner":"ipqa-research","description":"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.","archived":false,"fork":false,"pushed_at":"2025-06-05T14:55:56.000Z","size":36505,"stargazers_count":21,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-05T15:44:30.298Z","etag":null,"topics":["chemical","chemical-engineering","compound","contribution","engineering","excess","fragmentation","functional","gibbs","group","groups","grupal","joback","molecule","properties","pure","python","thermodynamics","unifac"],"latest_commit_sha":null,"homepage":"https://ipqa-research.github.io/ugropy/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ipqa-research.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-07-27T03:07:31.000Z","updated_at":"2025-05-28T14:00:48.000Z","dependencies_parsed_at":"2023-12-07T03:23:27.577Z","dependency_job_id":"79ddbec9-48fc-475d-8037-27e00eabd16b","html_url":"https://github.com/ipqa-research/ugropy","commit_stats":{"total_commits":183,"total_committers":4,"mean_commits":45.75,"dds":"0.36612021857923494","last_synced_commit":"7c75a8f3c5ec9856ada356196395752a216f45a5"},"previous_names":["salvadorbrandolin/ugropy","ipqa-research/ugropy"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ipqa-research/ugropy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipqa-research%2Fugropy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipqa-research%2Fugropy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipqa-research%2Fugropy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipqa-research%2Fugropy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipqa-research","download_url":"https://codeload.github.com/ipqa-research/ugropy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipqa-research%2Fugropy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260874447,"owners_count":23075833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chemical","chemical-engineering","compound","contribution","engineering","excess","fragmentation","functional","gibbs","group","groups","grupal","joback","molecule","properties","pure","python","thermodynamics","unifac"],"created_at":"2024-09-24T19:51:46.561Z","updated_at":"2025-06-20T03:39:20.337Z","avatar_url":"https://github.com/ipqa-research.png","language":"Python","readme":"![logo](logo.png)\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ipqa-research/ugropy/main)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://tldrlegal.com/license/mit-license)\n![Python 3.10+](https://img.shields.io/badge/Python-3.10%2B-blue)\n[![Docs](https://img.shields.io/badge/docs%20-%20green?style=flat\u0026label=Sphinx\u0026link=https%3A%2F%2Fipqa-research.github.io%2Fugropy%2Findex.html)](https://salvadorbrandolin.github.io/ugropy/)\n[![PyPI\nversion](https://badge.fury.io/py/ugropy.svg)](https://badge.fury.io/py/ugropy)\n[![Powered by RDKit](https://img.shields.io/badge/Powered%20by-RDKit-3838ff.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEXc3NwUFP8UPP9kZP+MjP+0tP////9ZXZotAAAAAXRSTlMAQObYZgAAAAFiS0dEBmFmuH0AAAAHdElNRQfmAwsPGi+MyC9RAAAAQElEQVQI12NgQABGQUEBMENISUkRLKBsbGwEEhIyBgJFsICLC0iIUdnExcUZwnANQWfApKCK4doRBsKtQFgKAQC5Ww1JEHSEkAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMy0xMVQxNToyNjo0NyswMDowMDzr2J4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDMtMTFUMTU6MjY6NDcrMDA6MDBNtmAiAAAAAElFTkSuQmCC)](https://www.rdkit.org/)\n    \n\n`ugropy` is a `Python` library to obtain subgroups from different thermodynamic\ngroup contribution models using both the name or the SMILES representation of a\nmolecule. If the name is given, the library uses the\n[PubChemPy](https://github.com/mcs07/PubChemPy) library to obtain the SMILES\nrepresentation from PubChem. In both cases, `ugropy` uses the\n[RDKit](https://github.com/rdkit/rdkit) library to search the functional groups\nin the molecule.\n\n`ugropy` is in an early development stage, leaving issues of examples of\nmolecules that `ugropy` fails solving the subgroups of a model is very helpful.\n\n`ugropy` is tested for `Python` 3.10, 3.11 and 3.12 on Linux, Windows and Mac\nOS.\n\n# Try ugropy now\nYou can try ugropy from its\n[Binder](https://mybinder.org/v2/gh/ipqa-research/ugropy/main). Open the\nbinder.ipynb file to explore the basic features.\n\n# Models supported v2.0.7\n- Classic liquid-vapor UNIFAC\n- Predictive Soave-Redlich-Kwong (PSRK)\n- Joback\n\n# Writers\n`ugropy` allows you to convert the obtained functional groups or estimated\nproperties to the input format required by the following thermodynamic\nlibraries:\n\n- [Clapeyron.jl](https://github.com/ClapeyronThermo/Clapeyron.jl)\n- [Thermo](https://github.com/CalebBell/thermo)\n\n\n# Example of use\nYou can check the full tutorial\n[here](https://ipqa-research.github.io/ugropy/tutorial/tutorial.html).\n\nGet groups from the molecule's name:\n\n\n```python\nfrom ugropy import Groups\n\n\nhexane = Groups(\"hexane\")\n\nprint(hexane.unifac.subgroups)\nprint(hexane.psrk.subgroups)\nprint(hexane.joback.subgroups)\n```\n\n    {'CH3': 2, 'CH2': 4}\n    {'CH3': 2, 'CH2': 4}\n    {'-CH3': 2, '-CH2-': 4}\n\nGet groups from molecule's SMILES:\n\n```python\npropanol = Groups(\"CCCO\", \"smiles\")\n\nprint(propanol.unifac.subgroups)\nprint(propanol.psrk.subgroups)\nprint(propanol.joback.subgroups)\n```\n\n    {'CH3': 1, 'CH2': 2, 'OH': 1}\n    {'CH3': 1, 'CH2': 2, 'OH': 1}\n    {'-CH3': 1, '-CH2-': 2, '-OH (alcohol)': 1}\n\nEstimate properties with the Joback model!\n\n```python\nlimonene = Groups(\"limonene\")\n\nprint(limonene.joback.subgroups)\nprint(f\"{limonene.joback.critical_temperature} K\")\nprint(f\"{limonene.joback.vapor_pressure(176 + 273.15)} bar\")\n```\n\n    {'-CH3': 2, '=CH2': 1, '=C\u003c': 1, 'ring-CH2-': 3, 'ring\u003eCH-': 1, 'ring=CH-': 1, 'ring=C\u003c': 1}\n    657.4486692170663 K\n    1.0254019428522743 bar\n\nVisualize your results! (The next code creates the `ugropy` logo)\n\n```Python\nfrom IPython.display import SVG\n\nmol = Groups(\"CCCC1=C(COC(C)(C)COC(=O)OCC)C=C(CC2=CC=CC=C2)C=C1\", \"smiles\")\n\nsvg = mol.unifac.draw(\n    title=\"ugropy\",\n    width=800,\n    height=450,\n    title_font_size=50,\n    legend_font_size=14\n)\n\nSVG(svg)\n```\n\nWrite down the [Clapeyron.jl](https://github.com/ClapeyronThermo/Clapeyron.jl)\n.csv input files.\n\n```python\nfrom ugropy import writers\n\nnames = [\"limonene\", \"adrenaline\", \"Trinitrotoluene\"]\n\ngrps = [Groups(n) for n in names]\n\n# Write the csv files into a database directory\nwriters.to_clapeyron(\n    molecules_names=names,\n    unifac_groups=[g.unifac.subgroups for g in grps],\n    psrk_groups=[g.psrk.subgroups for g in grps],\n    joback_objects=[g.joback for g in grps],\n    path=\"database\"\n)\n```\nObtain the [Caleb Bell's Thermo](https://github.com/CalebBell/thermo) subgroups\n\n```python\nfrom ugropy import unifac\n\nnames = [\"hexane\", \"2-butanone\"]\n\ngrps = [Groups(n) for n in names]\n\n[writers.to_thermo(g.unifac.subgroups, unifac) for g in grps]\n```\n\n```\n[{1: 2, 2: 4}, {1: 1, 2: 1, 18: 1}]\n```\n\n## Installation\n```\npip install ugropy\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipqa-research%2Fugropy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipqa-research%2Fugropy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipqa-research%2Fugropy/lists"}