Skip to content

Commit

Permalink
deploy: 4c26e12
Browse files Browse the repository at this point in the history
  • Loading branch information
SalvadorBrandolin committed Apr 23, 2024
0 parents commit 0585532
Show file tree
Hide file tree
Showing 128 changed files with 20,317 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: bd31e4504545ccd7d99c7292608c146a
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added .doctrees/README.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Binary file added .doctrees/modules.doctree
Binary file not shown.
473 changes: 473 additions & 0 deletions .doctrees/nbsphinx/tutorial/easy_way.ipynb

Large diffs are not rendered by default.

516 changes: 516 additions & 0 deletions .doctrees/nbsphinx/tutorial/hard_way.ipynb

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions .doctrees/nbsphinx/tutorial/installation.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Installation\n",
"\n",
"Simply do\n",
"\n",
"```\n",
"pip install ugropy\n",
"```"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "ugropy",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python",
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
555 changes: 555 additions & 0 deletions .doctrees/nbsphinx/tutorial/ugropy_failing.ipynb

Large diffs are not rendered by default.

169 changes: 169 additions & 0 deletions .doctrees/nbsphinx/tutorial/writers.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Writers\n",
"\n",
"#### Clapeyron (https://github.com/ClapeyronThermo/Clapeyron.jl)\n",
"`ugropy` provides a writers module for constructing input files for various\n",
"thermodynamic libraries.\n",
"\n",
"To utilize this function, you must import the module as follows:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from ugropy import Groups, writers"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To utilize the function, you need to provide a list of dictionaries for the\n",
"functional groups of UNIFAC and PSRK, where each dictionary contains the\n",
"functional groups of the molecules.\n",
"\n",
"If the user wishes to write critical properties .csv files, they must provide a\n",
"list of Joback objects. Let's illustrate this with a simple example:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"names = [\"limonene\", \"adrenaline\", \"Trinitrotoluene\"]\n",
"\n",
"grps = [Groups(n) for n in names]\n",
"\n",
"# Write the csv files into a database directory\n",
"writers.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",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In the example provided, we create a Groups object to obtain all the\n",
"information of the molecules. Then, we use list comprehension to create the\n",
"lists for the to_clapeyron function.\n",
"\n",
"The molecules_name argument in this case receives the names used to create the\n",
"Groups objects, but it can be different if desired. These names will be set as\n",
"the molecule names in the .csv files.\n",
"\n",
"You can omit certain arguments if desired:\n",
"\n",
"- If you omit the psrk_groups argument: the PSRK_groups.csv file will not be created.\n",
"- If you omit the unifac_groups argument: the ogUNIFAC_groups.csv file will not be created.\n",
"- If you omit the joback_objects argument: the critical.csv file will not be created."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Thermo (https://github.com/CalebBell/thermo)\n",
"\n",
"`ugropy` also provides a translator of its subgroups dictionaries to the\n",
"`Thermo` library dictionaries.\n",
"\n",
"Let's recreate the simple example of the `Thermo` documentation:\n",
"\n",
"https://thermo.readthedocs.io/activity_coefficients.html#unifac-example"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[{1: 2, 2: 4}, {1: 1, 2: 1, 18: 1}]\n"
]
}
],
"source": [
"from thermo.unifac import UFIP, UFSG, UNIFAC\n",
"\n",
"from ugropy import Groups, unifac, writers\n",
"\n",
"\n",
"names = [\"hexane\", \"2-butanone\"]\n",
"\n",
"grps = [Groups(n) for n in names]\n",
"\n",
"thermo_groups = [writers.to_thermo(g.unifac.subgroups, unifac) for g in grps]\n",
"\n",
"print(thermo_groups)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[1.4276025835624184, 1.3646545010104223]"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"GE = UNIFAC.from_subgroups(\n",
" chemgroups=thermo_groups,\n",
" T=60+273.15,\n",
" xs=[0.5, 0.5],\n",
" version=0,\n",
" interaction_data=UFIP,\n",
" subgroups=UFSG\n",
")\n",
"\n",
"GE.gammas()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "ugropy",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
37 changes: 37 additions & 0 deletions .doctrees/nbsphinx/tutorial_easy_way_16_0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions .doctrees/nbsphinx/tutorial_hard_way_3_0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0585532

Please sign in to comment.