diff --git a/.buildinfo b/.buildinfo new file mode 100644 index 0000000..ab776f8 --- /dev/null +++ b/.buildinfo @@ -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: 91beb8f4c4e0c3b67d1c12647de35209 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.doctrees/README.doctree b/.doctrees/README.doctree new file mode 100644 index 0000000..8606135 Binary files /dev/null and b/.doctrees/README.doctree differ diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle new file mode 100644 index 0000000..fa63d2e Binary files /dev/null and b/.doctrees/environment.pickle differ diff --git a/.doctrees/index.doctree b/.doctrees/index.doctree new file mode 100644 index 0000000..5240036 Binary files /dev/null and b/.doctrees/index.doctree differ diff --git a/.doctrees/modules.doctree b/.doctrees/modules.doctree new file mode 100644 index 0000000..4e5341c Binary files /dev/null and b/.doctrees/modules.doctree differ diff --git a/.doctrees/nbsphinx/tutorial/easy_way.ipynb b/.doctrees/nbsphinx/tutorial/easy_way.ipynb new file mode 100644 index 0000000..64f285b --- /dev/null +++ b/.doctrees/nbsphinx/tutorial/easy_way.ipynb @@ -0,0 +1,473 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### The easy way\n", + "\n", + "#### The Groups class\n", + "`ugropy` is relatively straightforward to use, but let's explore what it has to \n", + "offer. Now, let's start with the easy methods...\n", + "\n", + "We'll utilize the Groups class to retrieve the subgroups of all the models \n", + "supported by `ugropy`." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from ugropy import Groups\n", + "\n", + "carvone = Groups(\"carvone\")\n", + "\n", + "carvone.unifac.subgroups" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Well, that was easy... `ugropy` utilizes `PubChemPy` \n", + "([link](https://github.com/mcs07/PubChemPy)) to access `PubChem` and \n", + "retrieve the SMILES representation of the molecule. `ugropy` then employs the \n", + "SMILES representation along with the `rdkit` \n", + "([link](https://github.com/rdkit/rdkit)) library to identify the \n", + "functional groups of the molecules.\n", + "\n", + "The complete signature of the Groups class is as follows:" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "carvone = Groups(\n", + " identifier=\"carvone\",\n", + " identifier_type=\"name\",\n", + " normal_boiling_temperature=None\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The identifier_type argument (default: \"name\") can be set to \"name\", \"smiles\"\n", + "or \"mol\".\n", + "\n", + "When \"name\" is set, `ugropy` will use the identifier argument to search in\n", + "pubchem for the canonical SMILES of the molecule.\n", + "\n", + "When \"smiles\" is set, `ugropy` uses it directly, this also means that the \n", + "library will not suffer the overhead of searching on pubchem. Try it yourself:" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "carvone = Groups(\n", + " identifier=\"CC1=CCC(CC1=O)C(=C)C\",\n", + " identifier_type=\"smiles\",\n", + " normal_boiling_temperature=None\n", + ")\n", + "\n", + "carvone.unifac.subgroups" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If you are familiar with the `rdkit` library, you'll know that there are\n", + "numerous ways to define a molecule (e.g., SMILES, SMARTS, PDB file, InChIKey,\n", + "etc.). `ugropy` supports the provision of a Mol object from the `rdkit`\n", + "library." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from rdkit import Chem\n", + "\n", + "mol_obj = Chem.MolFromInchi(\"InChI=1S/C10H14O/c1-7(2)9-5-4-8(3)10(11)6-9/h4,9H,1,5-6H2,2-3H3\")\n", + "\n", + "carvone = Groups(\n", + " identifier=mol_obj,\n", + " identifier_type=\"mol\",\n", + " normal_boiling_temperature=None\n", + ")\n", + "\n", + "carvone.unifac.subgroups" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The current supported models are the classic liquid-vapor UNIFAC, Predictive\n", + "Soave-Redlich-Kwong (PSRK) and Joback. You can access the functional groups\n", + "this way:" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}\n", + "{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}\n", + "{'-CH3': 2, '=CH2': 1, '=C<': 1, 'ring-CH2-': 2, 'ring>CH-': 1, 'ring=CH-': 1, 'ring=C<': 1, '>C=O (ring)': 1}\n" + ] + } + ], + "source": [ + "carvone = Groups(\"carvone\")\n", + "\n", + "print(carvone.unifac.subgroups)\n", + "\n", + "print(carvone.psrk.subgroups)\n", + "\n", + "print(carvone.joback.subgroups)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You may notice that the joback attribute is a different object. That's because\n", + "it's a JobackProperties object, which contains all the properties that the\n", + "Joback model can estimate. This will be discussed later in the Joback tutorial.\n", + "As an example:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "516.47" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "carvone.joback.normal_boiling_point" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finally, if the normal_boiling_temperature parameter is provided, it is used in\n", + "the Joback properties calculations instead of the Joback-estimated normal\n", + "boiling temperature (refer to the Joback tutorial)." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The full documentation of the `Groups` class may be accessed in the API\n", + "documentation. Or you can do..." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[0;31mInit signature:\u001b[0m\n", + "\u001b[0mGroups\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0midentifier\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0midentifier_type\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'name'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mnormal_boiling_temperature\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m \n", + "Group class.\n", + "\n", + "Stores the solved FragmentationModels subgroups of a molecule.\n", + "\n", + "Parameters\n", + "----------\n", + "identifier : str or rdkit.Chem.rdchem.Mol\n", + " Identifier of a molecule (name, SMILES or Chem.rdchem.Mol). Example:\n", + " hexane or CCCCCC.\n", + "identifier_type : str, optional\n", + " Use 'name' to search a molecule by name, 'smiles' to provide the\n", + " molecule SMILES representation or 'mol' to provide a\n", + " rdkit.Chem.rdchem.Mol object, by default \"name\".\n", + "normal_boiling_temperature : float, optional\n", + " If provided, will be used to estimate critical temperature, acentric\n", + " factor, and vapor pressure instead of the estimated normal boiling\n", + " point in the Joback group contribution model, by default None.\n", + "\n", + "Attributes\n", + "----------\n", + "identifier : str\n", + " Identifier of a molecule. Example: hexane or CCCCCC.\n", + "identifier_type : str, optional\n", + " Use 'name' to search a molecule by name or 'smiles' to provide the\n", + " molecule SMILES representation, by default \"name\".\n", + "mol_object : rdkit.Chem.rdchem.Mol\n", + " RDKit Mol object.\n", + "molecular_weight : float\n", + " Molecule's molecular weight from rdkit.Chem.Descriptors.MolWt [g/mol].\n", + "unifac : Fragmentation\n", + " Classic LV-UNIFAC subgroups.\n", + "psrk : Fragmentation\n", + " Predictive Soave-Redlich-Kwong subgroups.\n", + "joback : JobackProperties\n", + " JobackProperties object that contains the Joback subgroups and the\n", + " estimated properties of the molecule.\n", + "\u001b[0;31mFile:\u001b[0m ~/code/ugropy/ugropy/groups.py\n", + "\u001b[0;31mType:\u001b[0m type\n", + "\u001b[0;31mSubclasses:\u001b[0m " + ] + } + ], + "source": [ + "Groups?" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Also, you can visualize the fragmentation result simply doing:" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "CH3CH2CHCH2=CCH=CCH2CO" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from IPython.display import SVG\n", + "\n", + "svg = carvone.unifac.draw(width=600)\n", + "\n", + "SVG(svg)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You can save the figure by doing:" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "with open(\"figure.svg\", \"w\") as f:\n", + " f.write(svg)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Check the full documentation of the draw funcion:" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[0;31mSignature:\u001b[0m\n", + "\u001b[0mcarvone\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0munifac\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdraw\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mtitle\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m''\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mwidth\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m400\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mheight\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m200\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mtitle_font_size\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m12\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mlegend_font_size\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m12\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mfont\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'Helvetica'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mUnion\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mList\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m\n", + "Create a svg representation of the fragmentation result.\n", + "\n", + "Parameters\n", + "----------\n", + "title : str, optional\n", + " Graph title, by default \"\"\n", + "width : int, optional\n", + " Graph width, by default 400\n", + "height : int, optional\n", + " Graph height, by default 200\n", + "title_font_size : int, optional\n", + " Font size of graph's title, by default 12\n", + "legend_font_size : int, optional\n", + " Legend font size, by default 12\n", + "font : str, optional\n", + " Text font, by default \"Helvetica\"\n", + "\n", + "Returns\n", + "-------\n", + "Union[str, List[str]]\n", + " SVG of the fragmentation solution/s.\n", + "\u001b[0;31mFile:\u001b[0m ~/code/ugropy/ugropy/core/fragmentation_object.py\n", + "\u001b[0;31mType:\u001b[0m method" + ] + } + ], + "source": [ + "carvone.unifac.draw?" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### WARNING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For the UNIFAC, and PSRK groups the aldehyde group is change to HCO according\n", + "to the discussion: https://github.com/ClapeyronThermo/Clapeyron.jl/issues/225\n", + "\n", + "This is more consistent with the ether groups and formate group." + ] + } + ], + "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 +} diff --git a/.doctrees/nbsphinx/tutorial/hard_way.ipynb b/.doctrees/nbsphinx/tutorial/hard_way.ipynb new file mode 100644 index 0000000..180cd58 --- /dev/null +++ b/.doctrees/nbsphinx/tutorial/hard_way.ipynb @@ -0,0 +1,516 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### The Hard? way\n", + "\n", + "#### The get_groups function\n", + "\n", + "In some situation you may not require to instantiate all the models supported\n", + "by `ugropy`, for that, you can search the model's groups individually." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'CH3': 2, 'CH2': 4}\n", + "{'CH2': 3, 'CH3N': 1, 'C5H4N': 1, 'CH': 1}\n", + "{'-CH3': 2, '=CH2': 1, '=C<': 1, 'ring-CH2-': 3, 'ring>CH-': 1, 'ring=CH-': 1, 'ring=C<': 1}\n" + ] + } + ], + "source": [ + "from ugropy import joback, psrk, unifac, get_groups\n", + "\n", + "hexane = get_groups(unifac, \"hexane\")\n", + "nicotine = get_groups(psrk, \"nicotine\")\n", + "limonene = get_groups(joback, \"limonene\")\n", + "\n", + "print(hexane.subgroups)\n", + "print(nicotine.subgroups)\n", + "print(limonene.subgroups)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Also, you can visualize the fragmentation results as in the \"easy way\" tutorial" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "CH3CH2" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from IPython.display import SVG\n", + "\n", + "SVG(hexane.draw())" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "CH2CH3NC5H4NCH" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "SVG(nicotine.draw())" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "-CH3=CH2=C<ring-CH2-ring>CH-ring=CH-ring=C<" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "SVG(limonene.draw(width=600))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The `get_groups` function have the signature:" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "get_groups(\n", + " model=psrk,\n", + " identifier=\"nicotine\",\n", + " identifier_type=\"name\"\n", + ");" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "As in the `Groups` class you can use \"name\", \"smiles\" or \"mol\" as identifier\n", + "type. This can be useful for whatever you are doing and skip the overhead of\n", + "setting models that you don't want. The `Groups` class is pretended to be used\n", + "when you think: \"I want all of this molecule\". The fragmentation_model \n", + "parameters represents an ugropy fragmentation model." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "from ugropy import FragmentationModel" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Joback\n", + "\n", + "For context, check the Joback's article:\n", + "https://doi.org/10.1080/00986448708960487\n", + "\n", + "The `JobackProperties` object is instantiated by the Group object, as we saw in\n", + "the previous tutorial. However, a `JobackProperties` object can also be\n", + "instantiated individually:" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "34.800000000000004" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from ugropy.properties import JobackProperties\n", + "\n", + "joback_carvone = JobackProperties(\"carvone\")\n", + "\n", + "joback_carvone.g_formation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "As with a `Groups` object, the signature of a `Joback` object is as follows\n", + "similarly, in the `Groups` class, you can use \"name,\" \"smiles,\" or \"mol\" as the\n", + "identifier type with the addition that you can provide the Joback's functional\n", + "groups as a dictionary directly:" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "carvone = JobackProperties(\n", + " identifier=\"carvone\",\n", + " identifier_type=\"name\",\n", + " normal_boiling_point=None\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "31.070992245923176\n", + "31.070992245923176\n" + ] + } + ], + "source": [ + "hex_g = JobackProperties(identifier={\"-CH3\": 2, \"-CH2-\": 4}, identifier_type=\"groups\")\n", + "\n", + "hex_n = JobackProperties(identifier=\"hexane\", identifier_type=\"name\")\n", + "\n", + "print(hex_g.critical_pressure)\n", + "print(hex_n.critical_pressure)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The normal_boiling_temperature parameter, if provided, is used in the Joback\n", + "properties calculations instead of the Joback-estimated normal boiling\n", + "temperature. Let's examine an example from the original Joback's article:" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Estimated normal boiling point: 443.4 K\n", + "Critical temperature: 675.1671746814928 K\n" + ] + } + ], + "source": [ + "mol = JobackProperties(\"p-dichlorobenzene\")\n", + "\n", + "print(f\"Estimated normal boiling point: {mol.normal_boiling_point} K\")\n", + "print(f\"Critical temperature: {mol.critical_temperature} K\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The critical temperature necessitates the estimation of the normal boiling\n", + "point. Joback recommends that if the experimental value of the normal boiling\n", + "point is known, it should be used instead of the estimated value." + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Experimental normal boiling point: 447.3 K\n", + "Estimated normal boiling point: 443.4 K\n", + "Critical temperature: 681.1057222260526 K\n" + ] + } + ], + "source": [ + "mol = JobackProperties(\"p-dichlorobenzene\", normal_boiling_point=447.3)\n", + "\n", + "print(f\"Experimental normal boiling point: {mol.exp_nbt} K\")\n", + "print(f\"Estimated normal boiling point: {mol.normal_boiling_point} K\")\n", + "print(f\"Critical temperature: {mol.critical_temperature} K\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The experimental value of the critical temperature for p-dichlorobenzene is 685\n", + "K. In this example, the error is not significant, but Joback warns that errors\n", + "could be more significant in other cases.\n", + "\n", + "Refer to the full documentation of the Joback object for information on units\n", + "and further explanation." + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[0;31mInit signature:\u001b[0m\n", + "\u001b[0mJobackProperties\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0midentifier\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0midentifier_type\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'name'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mnormal_boiling_point\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m \n", + "Joback [1] group contribution properties estimator.\n", + "\n", + "Parameters\n", + "----------\n", + "identifier : str or rdkit.Chem.rdchem.Mol\n", + " Identifier of a molecule (name, SMILES, groups, or Chem.rdchem.Mol).\n", + " Example: you can use hexane, CCCCCC, {\"-CH3\": 2, \"-CH2-\": 4} for name,\n", + " SMILES and groups respectively.\n", + "identifier_type : str, optional\n", + " Use 'name' to search a molecule by name, 'smiles' to provide the\n", + " molecule SMILES representation, 'groups' to provide Joback groups or\n", + " 'mol' to provide a rdkit.Chem.rdchem.Mol object, by default \"name\".\n", + "normal_boiling_point : float, optional\n", + " If provided, will be used to estimate critical temperature, acentric\n", + " factor, and vapor pressure instead of the estimated normal boiling\n", + " point, by default None.\n", + "\n", + "Attributes\n", + "----------\n", + "subgroups : dict\n", + " Joback functional groups of the molecule.\n", + "exp_nbt : float\n", + " User provided experimental normal boiling point [K].\n", + "critical_temperature : float\n", + " Joback estimated critical temperature [K].\n", + "critical_pressure : float\n", + " Joback estimated critical pressure [bar].\n", + "critical_volume : float\n", + " Joback estimated critical volume [cm³/mol].\n", + "normal_boiling_point : float\n", + " Joback estimated normal boiling point [K].\n", + "fusion_temperature : float\n", + " Joback estimated fusion temperature [K].\n", + "h_formation : float\n", + " Joback estimated enthalpy of formation ideal gas at 298 K [kJ/mol].\n", + "g_formation : float\n", + " Joback estimated Gibbs energy of formation ideal gas at 298 K [K].\n", + "heat_capacity_ideal_gas_params : dict\n", + " Joback estimated Reid's ideal gas heat capacity equation parameters\n", + " [J/mol/K].\n", + "h_fusion : float\n", + " Joback estimated fusion enthalpy [kJ/mol].\n", + "h_vaporization : float\n", + " Joback estimated vaporization enthalpy at the normal boiling point\n", + " [kJ/mol].\n", + "sum_na : float\n", + " Joback n_A contribution to liquid viscosity [N/s/m²].\n", + "sum_nb : float\n", + " Joback n_B contribution to liquid viscosity [N/s/m²].\n", + "molecular_weight : float\n", + " Molecular weight from Joback's subgroups [g/mol].\n", + "acentric_factor : float\n", + " Acentric factor from Lee and Kesler's equation [2].\n", + "vapor_pressure_params : dict\n", + " Vapor pressure G and k parameters for the Riedel-Plank-Miller [2]\n", + " equation [bar].\n", + "\u001b[0;31mFile:\u001b[0m ~/code/ugropy/ugropy/properties/joback_properties.py\n", + "\u001b[0;31mType:\u001b[0m type\n", + "\u001b[0;31mSubclasses:\u001b[0m " + ] + } + ], + "source": [ + "JobackProperties?" + ] + } + ], + "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 +} diff --git a/.doctrees/nbsphinx/tutorial/installation.ipynb b/.doctrees/nbsphinx/tutorial/installation.ipynb new file mode 100644 index 0000000..ebcb173 --- /dev/null +++ b/.doctrees/nbsphinx/tutorial/installation.ipynb @@ -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 +} diff --git a/.doctrees/nbsphinx/tutorial/ugropy_failing.ipynb b/.doctrees/nbsphinx/tutorial/ugropy_failing.ipynb new file mode 100644 index 0000000..e6cc3ce --- /dev/null +++ b/.doctrees/nbsphinx/tutorial/ugropy_failing.ipynb @@ -0,0 +1,555 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Failing\n", + "\n", + "`ugropy` may fail to obtain the subgroups of a molecule for a certain model for\n", + "two reasons: either there is a bug in the code, or the molecule cannot be\n", + "represented by the subgroups of the failing model.\n", + "\n", + "`ugropy` utilizes SMARTS for the representation of functional groups to inquire\n", + "whether the molecule contains those structures. Let's examine the functional\n", + "group list for the classic liquid-vapor UNIFAC model." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
detection_smartssmartscontributecomposedmolecular_weight
group
CH3[CX4H3]NaN{\"CH3\": 1}n15.03500
CH2[CX4H2]NaN{\"CH2\": 1}n14.02700
CH[CX4H]NaN{\"CH\": 1}n13.01900
C[CX4H0]NaN{\"C\": 1}n12.01100
CH2=CH[CH2]=[CH]NaN{\"CH2=CH\": 1}n27.04600
..................
NCO[NX2H0]=[CX2H0]=[OX1H0]NaN{\"NCO\": 1}n42.01700
(CH2)2SU[CH2]S(=O)(=O)[CH2]NaN{\"(CH2)2SU\": 1, \"CH2\": -1, \"CH2S\": -1}n92.11620
CH2CHSU[CH2]S(=O)(=O)[CH]NaN{\"CH2CHSU\": 1, \"CH\": -1, \"CH2S\": -1}n91.10840
IMIDAZOL[c]1:[c]:[n]:[c]:[n]:1NaN{\"IMIDAZOL\": 1, \"ACH\": -3}n68.07820
BTIC(F)(F)(F)S(=O)(=O)[N-]S(=O)(=O)C(F)(F)FNaN{\"BTI\": 1, \"CF3\": -2}n279.91784
\n", + "

113 rows × 5 columns

\n", + "
" + ], + "text/plain": [ + " detection_smarts smarts \\\n", + "group \n", + "CH3 [CX4H3] NaN \n", + "CH2 [CX4H2] NaN \n", + "CH [CX4H] NaN \n", + "C [CX4H0] NaN \n", + "CH2=CH [CH2]=[CH] NaN \n", + "... ... ... \n", + "NCO [NX2H0]=[CX2H0]=[OX1H0] NaN \n", + "(CH2)2SU [CH2]S(=O)(=O)[CH2] NaN \n", + "CH2CHSU [CH2]S(=O)(=O)[CH] NaN \n", + "IMIDAZOL [c]1:[c]:[n]:[c]:[n]:1 NaN \n", + "BTI C(F)(F)(F)S(=O)(=O)[N-]S(=O)(=O)C(F)(F)F NaN \n", + "\n", + " contribute composed molecular_weight \n", + "group \n", + "CH3 {\"CH3\": 1} n 15.03500 \n", + "CH2 {\"CH2\": 1} n 14.02700 \n", + "CH {\"CH\": 1} n 13.01900 \n", + "C {\"C\": 1} n 12.01100 \n", + "CH2=CH {\"CH2=CH\": 1} n 27.04600 \n", + "... ... ... ... \n", + "NCO {\"NCO\": 1} n 42.01700 \n", + "(CH2)2SU {\"(CH2)2SU\": 1, \"CH2\": -1, \"CH2S\": -1} n 92.11620 \n", + "CH2CHSU {\"CH2CHSU\": 1, \"CH\": -1, \"CH2S\": -1} n 91.10840 \n", + "IMIDAZOL {\"IMIDAZOL\": 1, \"ACH\": -3} n 68.07820 \n", + "BTI {\"BTI\": 1, \"CF3\": -2} n 279.91784 \n", + "\n", + "[113 rows x 5 columns]" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from ugropy import unifac\n", + "\n", + "unifac.subgroups" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For example, let's check the SMARTS representation of the alcohol group ACOH:" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'[cH0][OH]'" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "unifac.subgroups.loc[\"ACOH\", \"detection_smarts\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The SMARTS representation it's telling us that the OH group it's, of course, a\n", + "hydroxyl group bounded by a single bound to an aromatic carbon atom.\n", + "\n", + "An example of a molecule that cannot be represented by UNIFAC groups:" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAEsASwDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACikZgqlmICgZJJ4Fcbq/xS8K6Vc/Y4r59UvzwtnpkZuJGPp8vyg+xIoA7OivO/7X+I/iTjS9Es/Ddm3S51R/NnI9REvCn2aql78Hf7ZQ3Wt+L9bvdXUZgug6xx279QyRjpz2B/I80Aen0V574e8X6joerQ+FPG+yK/b5bHVBxDfqOBz/AAydMjufqM+hUAFFFFABRRRQAUUUUAFFFVdTvf7N0u6vfs89z5ETSeTbpukkwM7VHcmgC1RWT4d8SaX4q0iPUtJuBNA3DKeHjburjsw9P6VrUAFFFFABRRRQAUUUUAFFFUdY1ex0HSbnVNSnWC0t03yO38h6kngDuTQBJe6lY6cbcXt3Db/aJRDD5rhfMkPRRnqTjpVqvOPCuj33jDXIvG/iSBookB/sXTZOltGf+Wrj/no3B9uPbHo9ABRRRQAUUUUAFFFFABRRRQAUV57rPjPxNe+L77wx4P0a0nm08RfbL++mxFCZF3KNq/MePTPQjHemn4c6rr3zeMvFt/qEZ62Nj/otv9CF5ce5waANnXPiT4U0GY21xqsdxe52i0swZ5S3ptXOD9cVjf8ACS+PvEYx4f8AC8WjWrdLzXXIfHtCvzA/XIrrND8K6D4bi8vR9JtLPjBeOMb2Hux+Y/ia2KAPPF+GEusMJfGXiXUtcJOTaI/2a1/79p1+uRXZaRoGka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9su7WXWL8/eu9VlNw5/Bvl/Su0RFjRURQqqMBQMACgDzz/hH/AIg+JADrniSDQrVutnoseZce8zcg/wC7kVq6P8MfCWjym4GlpfXjcvdagTcSMfXL5AP0Arr6KAADAwOlFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAcT4u+HUXiDVINa0nVJ9C1yIFGvrVMmVCMbXXIz7HP58Yi034TeHoJo7vWmu/EOoKObnVZ2m/JCduPY5ru6KAI4IIbaFIYIkiiQYVI1Cqo9gKkoooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA/9k=", + "image/png": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAIAAAD2HxkiAAAiC0lEQVR4nO3de1hU1d4H8N8MF7mIiFCKd0Uz8VaSKaJpiseUidIYswz1iGFZjk89nePjqbcpz9PdOlPaW6QeRVMT1Gq8oK+aIYr3RAVvKHgBb1wUkDsz6/1jcSYP4DDM7NlrBr6f5/xxHmbc+3fm8B32Xuu31lYwxggAxFGKLgCgpUMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQ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MIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEOz/ARW0WWMzok8iAAAAAElFTkSuQmCC", + "text/plain": [ + "" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from ugropy import get_groups\n", + "from rdkit.Chem import Draw\n", + "\n", + "mol = get_groups(unifac, \"C1(=CC=CC=C1)OC(C)(C)C\", \"smiles\")\n", + "\n", + "Draw.MolToImage(mol.mol_object)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{}\n" + ] + } + ], + "source": [ + "print(mol.subgroups)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The library \"fails\" to obtain any functional groups to accurately represent the\n", + "molecule. This failure is represented by an empty dictionary. In this case, the\n", + "\"fail\" is correct, but it could fail due to errors in the groups SMARTS\n", + "representations or the algorithm, resulting in an empty dictionary as well.\n", + "Currently, the supported models are tested against the following numbers of\n", + "molecules:\n", + "\n", + "- Classic liquid-vapor UNIFAC: 408\n", + "- Predictive Soave-Redlich-Kwong (PSRK): 442\n", + "- Joback: 285\n", + "\n", + "If you encounter a failing representation, you can examine the structure of the\n", + "molecule and the list of functional groups of the failing model. If you\n", + "determine that the molecule can indeed be modeled, you may have discovered a\n", + "bug. Feel free to report the issue on the repository along with the failing\n", + "molecule's SMILES/name, the failing model and the `ugropy` version.\n", + "\n", + "#### More than one solution\n", + "Models like UNIFAC or PSRK can have multiple solutions to represent a molecule,\n", + "and ugropy tries its best to find them all. In such cases, you will receive a\n", + "list of dictionaries, each containing one of the solutions found. Let's take a\n", + "look." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAEsASwDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAoorG8W60fDvhHVtXTYZLS1eSMOMqXx8oPsWxQBs1y+u/ETwp4dYxX+s25uAcfZoD50pPptTJH44rldL8Fah4nsbGbxp4w1G7nu7ZZzpVtItrGFIBKsqYL4zjPFdtofg7w74aQDR9HtLRgMeYseZD9XOWP4mgDmP+E18Xa9lfC/gyeCE/dvdcf7On18sfMw+hqveeCdf1WxnuPG3ji4jsUjZ5rXS1FrCiAZO5zyy/UV6XSMquhR1DKwwQRkEUAeSaXqFx8NILe4ivJdb8AXZDQ3gbzZdPLf3sfejJ9Oh9+G9XtrmC9tYrq1mjmglUPHJGwZWU9CCOorzPVNCvvh1cXOqaBZtqPhW5JbU9Dxu8gH70kIPbHVOmPb7tDTrw+CrRPEfhSV9X8B3ZMlxZRktLp5P3njB52g/eQ9P1oA9goqppeqWOtabBqOnXMdzaTrujljOQR/Q+oPIq3QAUUUUANkkSGMySOqIvVmOAKq2+q2F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dK7gm+pOPUI4mcILSOn3aX+drhRRRWhxhRRRQAVSOj6c2srrBsoTqKRGAXOwbwhOdufw/n61dooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigArL8QeH9M8T6PNperWyz20o+jI3ZlPZh61qUUAeZ2Xw/8ZPCdO1P4hX39kw/JCLOFY7h07b5cbgccd63tH+GPhLRp/tMekpd3h5a6vmNxIx9cvkA/QCuuooAQAAAAAAdAKWiigAooooAKKKKACiiigBrtsjZsE4BOB3riUgubrwU3iJtUvBqDWjXgxO3kr8pby/K+6Vx8pyM+9dxWC3hOxZWg8+8Fgzl2sRN+5JJyRjGduf4c49qyqRctjuwdaFO/M7ap7Xule6+enk+pr2MglsLaRYxGHiVggGAuQOKno6DAorVHFJ3bYUUUUCCiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD//Z", + "image/png": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAIAAAD2HxkiAAAbYklEQVR4nO3deXjNZ9oH8Ptkl4U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QgBlCCMAMIQRghhACMEMIAZghhADMEEIAZgghADOEEIAZQgjADCEEYIYQAjBDCAGYIYQAzBBCAGYIIQAzhBCAGUIIwAwhBGCGEAIwQwgBmCGEAMwQQgBmCCEAM4QQgBlCCMAMIQRghhACMEMIAZghhADMEEIAZgghADOEEIAZQgjADCEEYIYQAjBDCAGYIYQAzBBCAGYIIQAzhBCAGUIIwAwhBGCGEAIwQwgBmCGEAMwQQgBmCCEAM4QQgBlCCMAMIQRghhACMEMIAZghhADMEEIAZgghADOEEIAZQgjADCEEYIYQAjBDCAGYIYQAzBBCAGYIIQAzhBCAGUIIwAwhBGCGEAIwQwgBmCGEAMwQQgBmCCEAM4QQgBlCCMAMIQRghhACMEMIAZghhADMEEIAZgghADOEEIAZQgjADCEEYIYQAjBDCAGYIYQAzBBCAGYIIQAzhBCAGUIIwAwhBGCGEAIwQwgBmCGEAMwQQgBmCCEAM4QQgBlCCMAMIQRghhACMEMIAZghhADMEEIAZgghADOEEIAZQgjADCEEYPb/IrzX6qjISt0AAAAASUVORK5CYII=", + "text/plain": [ + "" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from ugropy import Groups\n", + "from rdkit.Chem import Draw\n", + "\n", + "\n", + "mol = Groups(\"CCCC1=CC=C(CC(=O)OC)C=C1\", \"smiles\")\n", + "\n", + "Draw.MolToImage(mol.mol_object, highlightAtoms=[7])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This molecule can be modeled in two ways depending on how we treat the CH2\n", + "attached to the ring and the ester carbon (highlighted in red). We can either\n", + "form an ACCH2 group and model the ester group with COO, or we can use an AC\n", + "group and model the ester group with CH2COO." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "UNIFAC:\n", + "[{'CH3': 2, 'ACH': 4, 'ACCH2': 1, 'CH2COO': 1, 'CH2': 1, 'AC': 1}\n", + " {'CH3': 2, 'ACH': 4, 'ACCH2': 2, 'CH2': 1, 'COO': 1}]\n", + "PSRK:\n", + "[{'CH3': 2, 'ACH': 4, 'ACCH2': 1, 'CH2COO': 1, 'CH2': 1, 'AC': 1}\n", + " {'CH3': 2, 'ACH': 4, 'ACCH2': 2, 'CH2': 1, 'COO': 1}]\n" + ] + } + ], + "source": [ + "print(\"UNIFAC:\")\n", + "print(mol.unifac.subgroups)\n", + "print(\"PSRK:\")\n", + "print(mol.psrk.subgroups)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "svg1, svg2 = mol.unifac.draw(width=800)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "CH3ACHACCH2CH2COOCH2AC" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from IPython.display import SVG\n", + "\n", + "SVG(svg1)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "CH3ACHACCH2CH2COO" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "SVG(svg2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This could be useful in cases where some groups have more interaction\n", + "parameters than others in the mixture that you want to model with UNIFAC.\n", + "Alternatively, you can try both approaches and compare if there are any\n", + "differences." + ] + } + ], + "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 +} diff --git a/.doctrees/nbsphinx/tutorial/writers.ipynb b/.doctrees/nbsphinx/tutorial/writers.ipynb new file mode 100644 index 0000000..c6bbfbb --- /dev/null +++ b/.doctrees/nbsphinx/tutorial/writers.ipynb @@ -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": 2, + "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": 3, + "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": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1.4276025835624184, 1.3646545010104223]" + ] + }, + "execution_count": 4, + "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 +} diff --git a/.doctrees/nbsphinx/tutorial_easy_way_16_0.svg b/.doctrees/nbsphinx/tutorial_easy_way_16_0.svg new file mode 100644 index 0000000..0ca4dcd --- /dev/null +++ b/.doctrees/nbsphinx/tutorial_easy_way_16_0.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +CH3CH2CHCH2=CCH=CCH2CO \ No newline at end of file diff --git a/.doctrees/nbsphinx/tutorial_hard_way_3_0.svg b/.doctrees/nbsphinx/tutorial_hard_way_3_0.svg new file mode 100644 index 0000000..a2eb910 --- /dev/null +++ b/.doctrees/nbsphinx/tutorial_hard_way_3_0.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + +CH3CH2 \ No newline at end of file diff --git a/.doctrees/nbsphinx/tutorial_hard_way_4_0.svg b/.doctrees/nbsphinx/tutorial_hard_way_4_0.svg new file mode 100644 index 0000000..b575eb7 --- /dev/null +++ b/.doctrees/nbsphinx/tutorial_hard_way_4_0.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +CH2CH3NC5H4NCH \ No newline at end of file diff --git a/.doctrees/nbsphinx/tutorial_hard_way_5_0.svg b/.doctrees/nbsphinx/tutorial_hard_way_5_0.svg new file mode 100644 index 0000000..ba82b5d --- /dev/null +++ b/.doctrees/nbsphinx/tutorial_hard_way_5_0.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +-CH3=CH2=C<ring-CH2-ring>CH-ring=CH-ring=C< \ No newline at end of file diff --git a/.doctrees/nbsphinx/tutorial_ugropy_failing_12_0.svg b/.doctrees/nbsphinx/tutorial_ugropy_failing_12_0.svg new file mode 100644 index 0000000..5898665 --- /dev/null +++ b/.doctrees/nbsphinx/tutorial_ugropy_failing_12_0.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +CH3ACHACCH2CH2COOCH2AC \ No newline at end of file diff --git a/.doctrees/nbsphinx/tutorial_ugropy_failing_13_0.svg b/.doctrees/nbsphinx/tutorial_ugropy_failing_13_0.svg new file mode 100644 index 0000000..e962ddc --- /dev/null +++ b/.doctrees/nbsphinx/tutorial_ugropy_failing_13_0.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +CH3ACHACCH2CH2COO \ No newline at end of file diff --git a/.doctrees/nbsphinx/tutorial_ugropy_failing_5_0.jpg b/.doctrees/nbsphinx/tutorial_ugropy_failing_5_0.jpg new file mode 100644 index 0000000..6887b9c Binary files /dev/null and b/.doctrees/nbsphinx/tutorial_ugropy_failing_5_0.jpg differ diff --git a/.doctrees/nbsphinx/tutorial_ugropy_failing_5_0.png b/.doctrees/nbsphinx/tutorial_ugropy_failing_5_0.png new file mode 100644 index 0000000..80a2294 Binary files /dev/null and b/.doctrees/nbsphinx/tutorial_ugropy_failing_5_0.png differ diff --git a/.doctrees/nbsphinx/tutorial_ugropy_failing_8_0.jpg b/.doctrees/nbsphinx/tutorial_ugropy_failing_8_0.jpg new file mode 100644 index 0000000..c339762 Binary files /dev/null and b/.doctrees/nbsphinx/tutorial_ugropy_failing_8_0.jpg differ diff --git a/.doctrees/nbsphinx/tutorial_ugropy_failing_8_0.png b/.doctrees/nbsphinx/tutorial_ugropy_failing_8_0.png new file mode 100644 index 0000000..f8a42d9 Binary files /dev/null and b/.doctrees/nbsphinx/tutorial_ugropy_failing_8_0.png differ diff --git a/.doctrees/tutorial/easy_way.doctree b/.doctrees/tutorial/easy_way.doctree new file mode 100644 index 0000000..aefda5a Binary files /dev/null and b/.doctrees/tutorial/easy_way.doctree differ diff --git a/.doctrees/tutorial/hard_way.doctree b/.doctrees/tutorial/hard_way.doctree new file mode 100644 index 0000000..795d8e5 Binary files /dev/null and b/.doctrees/tutorial/hard_way.doctree differ diff --git a/.doctrees/tutorial/installation.doctree b/.doctrees/tutorial/installation.doctree new file mode 100644 index 0000000..34f8c47 Binary files /dev/null and b/.doctrees/tutorial/installation.doctree differ diff --git a/.doctrees/tutorial/tutorial.doctree b/.doctrees/tutorial/tutorial.doctree new file mode 100644 index 0000000..fea8ab5 Binary files /dev/null and b/.doctrees/tutorial/tutorial.doctree differ diff --git a/.doctrees/tutorial/ugropy_failing.doctree b/.doctrees/tutorial/ugropy_failing.doctree new file mode 100644 index 0000000..7d38e1f Binary files /dev/null and b/.doctrees/tutorial/ugropy_failing.doctree differ diff --git a/.doctrees/tutorial/writers.doctree b/.doctrees/tutorial/writers.doctree new file mode 100644 index 0000000..949a3f1 Binary files /dev/null and b/.doctrees/tutorial/writers.doctree differ diff --git a/.doctrees/ugropy.doctree b/.doctrees/ugropy.doctree new file mode 100644 index 0000000..e8b5f8e Binary files /dev/null and b/.doctrees/ugropy.doctree differ diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/README.html b/README.html new file mode 100644 index 0000000..2b2970d --- /dev/null +++ b/README.html @@ -0,0 +1,247 @@ + + + + + + + Try ugropy now — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+logo
+

Binder License Python 3.10+ Docs PyPI version

+

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 in an early development stage, leaving issues of examples +of molecules that ugropy fails solving the subgroups of a model is +very helpful.

+

ugropy is tested for Python 3.10, 3.11 and 3.12 on Linux, +Windows and Mac OS.

+
+

Try ugropy now

+

You can try ugropy from its +Binder. Open +the binder.ipynb file to explore the basic features.

+
+
+

Models supported v2.0.5

+
    +
  • Classic liquid-vapor UNIFAC

  • +
  • Predictive Soave-Redlich-Kwong (PSRK)

  • +
  • Joback

  • +
+
+
+

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

+

You can check the full tutorial +here.

+

Get groups from the molecule’s name:

+
from ugropy import Groups
+
+
+hexane = Groups("hexane")
+
+print(hexane.unifac.subgroups)
+print(hexane.psrk.subgroups)
+print(hexane.joback.subgroups)
+
+
+
{'CH3': 2, 'CH2': 4}
+{'CH3': 2, 'CH2': 4}
+{'-CH3': 2, '-CH2-': 4}
+
+
+

Get groups from molecule’s SMILES:

+
propanol = Groups("CCCO", "smiles")
+
+print(propanol.unifac.subgroups)
+print(propanol.psrk.subgroups)
+print(propanol.joback.subgroups)
+
+
+
{'CH3': 1, 'CH2': 2, 'OH': 1}
+{'CH3': 1, 'CH2': 2, 'OH': 1}
+{'-CH3': 1, '-CH2-': 2, '-OH (alcohol)': 1}
+
+
+

Estimate properties with the Joback model!

+
limonene = Groups("limonene")
+
+print(limonene.joback.subgroups)
+print(f"{limonene.joback.critical_temperature} K")
+print(f"{limonene.joback.vapor_pressure(176 + 273.15)} bar")
+
+
+
{'-CH3': 2, '=CH2': 1, '=C<': 1, 'ring-CH2-': 3, 'ring>CH-': 1, 'ring=CH-': 1, 'ring=C<': 1}
+657.4486692170663 K
+1.0254019428522743 bar
+
+
+

Visualize your results! (The next code creates the ugropy logo)

+
from IPython.display import SVG
+
+mol = Groups("CCCC1=C(COC(C)(C)COC(=O)OCC)C=C(CC2=CC=CC=C2)C=C1", "smiles")
+
+svg = mol.unifac.draw(
+    title="ugropy",
+    width=800,
+    height=450,
+    title_font_size=50,
+    legend_font_size=14
+)
+
+SVG(svg)
+
+
+

Write down the +Clapeyron.jl .csv +input files.

+
from ugropy import writers
+
+names = ["limonene", "adrenaline", "Trinitrotoluene"]
+
+grps = [Groups(n) for n in names]
+
+# Write the csv files into a database directory
+writers.to_clapeyron(
+    molecules_names=names,
+    unifac_groups=[g.unifac.subgroups for g in grps],
+    psrk_groups=[g.psrk.subgroups for g in grps],
+    joback_objects=[g.joback for g in grps],
+    path="database"
+)
+
+
+

Obtain the Caleb Bell’s Thermo +subgroups

+
from ugropy import unifac
+
+names = ["hexane", "2-butanone"]
+
+grps = [Groups(n) for n in names]
+
+[writers.to_thermo(g.unifac.subgroups, unifac) for g in grps]
+
+
+
[{1: 2, 2: 4}, {1: 1, 2: 1, 18: 1}]
+
+
+
+
+

Installation

+
pip install ugropy
+
+
+
+ + +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_images/logo.svg b/_images/logo.svg new file mode 100644 index 0000000..40be785 --- /dev/null +++ b/_images/logo.svg @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +CH3CACHACCH2CH2OCOOCH2ACugropy diff --git a/_images/tutorial_easy_way_16_0.svg b/_images/tutorial_easy_way_16_0.svg new file mode 100644 index 0000000..0ca4dcd --- /dev/null +++ b/_images/tutorial_easy_way_16_0.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +CH3CH2CHCH2=CCH=CCH2CO \ No newline at end of file diff --git a/_images/tutorial_hard_way_3_0.svg b/_images/tutorial_hard_way_3_0.svg new file mode 100644 index 0000000..a2eb910 --- /dev/null +++ b/_images/tutorial_hard_way_3_0.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + +CH3CH2 \ No newline at end of file diff --git a/_images/tutorial_hard_way_4_0.svg b/_images/tutorial_hard_way_4_0.svg new file mode 100644 index 0000000..b575eb7 --- /dev/null +++ b/_images/tutorial_hard_way_4_0.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +CH2CH3NC5H4NCH \ No newline at end of file diff --git a/_images/tutorial_hard_way_5_0.svg b/_images/tutorial_hard_way_5_0.svg new file mode 100644 index 0000000..ba82b5d --- /dev/null +++ b/_images/tutorial_hard_way_5_0.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +-CH3=CH2=C<ring-CH2-ring>CH-ring=CH-ring=C< \ No newline at end of file diff --git a/_images/tutorial_ugropy_failing_12_0.svg b/_images/tutorial_ugropy_failing_12_0.svg new file mode 100644 index 0000000..5898665 --- /dev/null +++ b/_images/tutorial_ugropy_failing_12_0.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +CH3ACHACCH2CH2COOCH2AC \ No newline at end of file diff --git a/_images/tutorial_ugropy_failing_13_0.svg b/_images/tutorial_ugropy_failing_13_0.svg new file mode 100644 index 0000000..e962ddc --- /dev/null +++ b/_images/tutorial_ugropy_failing_13_0.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +CH3ACHACCH2CH2COO \ No newline at end of file diff --git a/_images/tutorial_ugropy_failing_5_0.png b/_images/tutorial_ugropy_failing_5_0.png new file mode 100644 index 0000000..80a2294 Binary files /dev/null and b/_images/tutorial_ugropy_failing_5_0.png differ diff --git a/_images/tutorial_ugropy_failing_8_0.png b/_images/tutorial_ugropy_failing_8_0.png new file mode 100644 index 0000000..f8a42d9 Binary files /dev/null and b/_images/tutorial_ugropy_failing_8_0.png differ diff --git a/_modules/index.html b/_modules/index.html new file mode 100644 index 0000000..878161c --- /dev/null +++ b/_modules/index.html @@ -0,0 +1,123 @@ + + + + + + Overview: module code — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/_modules/ugropy/core/checks.html b/_modules/ugropy/core/checks.html new file mode 100644 index 0000000..cc59ed0 --- /dev/null +++ b/_modules/ugropy/core/checks.html @@ -0,0 +1,357 @@ + + + + + + ugropy.core.checks — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for ugropy.core.checks

+"""check module.
+
+The module contains the necessary checks to corroborate the success of the
+algorithm to obtain the molecule's FragmentationModel subgroups.
+"""
+
+import numpy as np
+
+from rdkit import Chem
+from rdkit.Chem import Descriptors
+
+from ugropy.fragmentation_models.fragmentation_model import FragmentationModel
+
+from .detect_model_groups import group_matches
+from .fit_atoms_indexes import fit_atoms
+
+
+
+[docs] +def check_has_molecular_weight_right( + mol_object: Chem.rdchem.Mol, + mol_subgroups: dict, + model: FragmentationModel, +) -> bool: + """Check the molecular weight of the molecule using its functional groups. + + Compares the RDKit molecular weight of the molecule to the computed + molecular weight from the functional groups. Returns True if both molecular + weights are equal with 0.5 u (half hydrogen atom) as atol of + numpy.allclose(). Also, the method will check if the molecule has negative + occurrences on its functional groups, also returning False in that case. + + Parameters + ---------- + mol_object : Chem.rdchem.Mol + RDKit Chem object + mol_subgroups : dict + FragmentationModel subgroups of the mol_object + model: FragmentationModel + FragmentationModel object. + + Returns + ------- + bool + True if RDKit and ugropy molecular weight are equal with a tolerance. + """ + # check for negative occurrences + if not all(occurrence > 0 for occurrence in mol_subgroups.values()): + return False + + # rdkit molecular weight + rdkit_mw = Descriptors.MolWt(mol_object) + + # Molecular weight from functional groups + mws = model.subgroups.loc[ + list(mol_subgroups.keys()), "molecular_weight" + ].to_numpy() + + func_group_mw = np.dot(mws, list(mol_subgroups.values())) + + return np.allclose(rdkit_mw, func_group_mw, atol=0.5)
+ + + +
+[docs] +def check_has_composed( + mol_subgroups: dict, + model: FragmentationModel, +) -> tuple[bool, np.ndarray]: + """Check if the molecule has composed structures. + + A composed structure is a subgroup of FragmentationModel that can be + decomposed into two or more FragmentationModel subgroups. For example, + ACCH2 can be decomposed into the AC and CH2 groups. + + Parameters + ---------- + mol_subgroups : dict + Dictionary with the detected subgroups. + model: FragmentationModel + FragmentationModel object. + + Returns + ------- + bool + True if the molecule has composed structures. + """ + composed_stru = model.subgroups[model.subgroups["composed"] == "y"].index + composed_in_mol = np.intersect1d(composed_stru, list(mol_subgroups.keys())) + return len(composed_in_mol) > 0, composed_in_mol
+ + + +
+[docs] +def check_has_hiden( + mol_object: Chem.rdchem.Mol, + mol_subgroups: dict, + model: FragmentationModel, +) -> bool: + """Check for hidden subgroups in composed structures. + + The principal subgroups that can be hidden in composed structures for the + models UNIFAC, PSRK and Dortmund are CH2 and CH. The algorithm checks that + the number of CH2 and CH groups in mol_subgroups dictionary is equal to the + number of free CH2 and CH. If these numbers are not equal reveals that the + CH2 and CH are hidden in composed structures, eg: ACCH2, ACCH. This + phenomenon occurs when two subgroups fight for the same CH2 or CH. For + example the molecule: + + CCCC1=CC=C(COC(C)(C)C)C=C1 + + Here an ACCH2 and a CH2O are fighting to have the same CH2. But since there + is a free CH2 in the molecule, the algorithm prefers to keep both ACCH2 and + CH2O groups without any free CH2 subgroup. This check counts all the CH2 + that are participating in a CH2 hideout (ACCH2 and CH2O are examples of + hideouts). The algorithm notices that there is one free CH2 and there are + zero free CH2 groups in the mol_subgroups dictionary and returns 'True' + (mol_object has a hidden CH2). + + Parameters + ---------- + mol_object : Chem.rdchem.Mol + RDKit Mol object. + mol_subgroups : dict + Subgroups of mol_object. + model: FragmentationModel + FragmentationModel object. + + Returns + ------- + bool + True if has hidden subgroups. + """ + hiden_candidates = np.unique(model.hideouts.index.to_numpy()) + + for candidate in hiden_candidates: + exposed_candidates = mol_subgroups.get(candidate, 0) + + all_candidates_atoms = group_matches(mol_object, candidate, model) + all_candidates_atoms = np.array(all_candidates_atoms).flatten() + + hideouts_atoms = np.array([]) + for hideout in model.hideouts.loc[candidate].values.flatten(): + if hideout in mol_subgroups.keys(): + atoms = group_matches(mol_object, hideout, model, "fit") + + atoms = np.array(atoms).flatten() + hideouts_atoms = np.append(hideouts_atoms, atoms) + + much_matches = len(atoms) > mol_subgroups[hideout] + no_comp = model.subgroups.loc[hideout, "composed"] == "n" + + # TODO: document this + if much_matches and no_comp: + return False + + candidate_diff = np.setdiff1d(all_candidates_atoms, hideouts_atoms) + + if len(candidate_diff) != exposed_candidates: + return True + + return False
+ + + +
+[docs] +def check_can_fit_atoms( + mol_object: Chem.rdchem.Mol, + mol_subgroups: dict, + model: FragmentationModel, +) -> bool: + """Check if a solution can be fitted in the mol_object atoms. + + Parameters + ---------- + mol_object : Chem.rdchem.Mol + RDKit Mol object. + mol_subgroups : dict + Subgroups of mol_object. + model: FragmentationModel + FragmentationModel object. + + Returns + ------- + bool + True if the solution can be fitted. + """ + if fit_atoms(mol_object, mol_subgroups, model): + return True + else: + return False
+ + + +
+[docs] +def check_has_composed_overlapping( + mol_object: Chem.rdchem.Mol, + mol_subgroups: dict, + model: FragmentationModel, +) -> bool: + """Check if in the solution are composed structures overlapping. + + Parameters + ---------- + mol_object : Chem.rdchem.Mol + RDKit Mol object. + mol_subgroups : dict + Subgroups of mol_object. + model: FragmentationModel + FragmentationModel object. + + Returns + ------- + bool + Treu if the solution has overlapping composed structures. + """ + # ========================================================================= + # Count total number of composed in mol_subgroups + # ========================================================================= + _, composed = check_has_composed(mol_subgroups=mol_subgroups, model=model) + composed_in_subgroups = np.sum([mol_subgroups[gr] for gr in composed]) + + # ========================================================================= + # Get atoms of composed and check overlaps + # ========================================================================= + composed_atoms = [group_matches(mol_object, c, model) for c in composed] + total_composed_matches = np.sum([len(c) for c in composed_atoms]) + + overlapping_count = 0 + + # Self overlapping + for c_atoms in composed_atoms: + atoms_array = np.array(c_atoms).flatten() + _, counts = np.unique(atoms_array, return_counts=True) + overlapping_count += np.sum(counts - 1) + + # Cross overlapping + for i, i_atoms in enumerate(composed_atoms): + for j_atoms in composed_atoms[i + 1 :]: # noqa + overlapping_count += np.sum(np.isin(i_atoms, j_atoms)) + + response = composed_in_subgroups > ( + total_composed_matches - overlapping_count + ) + + return response
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/core/composed.html b/_modules/ugropy/core/composed.html new file mode 100644 index 0000000..aae32c8 --- /dev/null +++ b/_modules/ugropy/core/composed.html @@ -0,0 +1,307 @@ + + + + + + ugropy.core.composed — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for ugropy.core.composed

+"""correct_composed module."""
+
+import json
+from itertools import combinations
+
+import numpy as np
+
+from rdkit import Chem
+
+from ugropy.fragmentation_models.fragmentation_model import FragmentationModel
+
+from .checks import (
+    check_can_fit_atoms,
+    check_has_composed_overlapping,
+    check_has_hiden,
+    check_has_molecular_weight_right,
+)
+
+
+
+[docs] +def correct_composed( + mol_object: Chem.rdchem.Mol, + mol_subgroups: dict, + model: FragmentationModel, +) -> dict: + """Correct composed structures. + + A priori is not easy to recognize what composed structures in + mol_subgroups need to be decomposed to correct the solution. By that, all + the combinations are tried. For example, a molecule that can't be solved + has one ACCH2 and two ACCH composed structures. The decomposition + combinatory will be: + + [[ACCH2], [ACCH], [ACCH2, ACCH], [ACCH, ACCH], [ACCH2, ACCH, ACCH]] + + Parameters + ---------- + mol_object : Chem.rdchem.Mol + RDKit Mol object. + mol_subgroups : dict + Molecule's FragmentationModel subgroups. + model: FragmentationModel + FragmentationModel object. + + Returns + ------- + dict or list[dict] + Corrected subgroups due to decomposing composed structures. + """ + # ========================================================================= + # A list with all the composed structures present in mol_subgroups + # ========================================================================= + composed_structures = [ + stru + for stru in mol_subgroups.keys() + if model.subgroups.loc[stru, "composed"] == "y" + ] + + # ========================================================================= + # Creates a list with the composed structures in mol_subgroups but each + # composed structure is repetead a number of times equals to the occurences + # In te molecule. For example in UNIFAC {"ACCH2": 3, "CH3": 1, "ACCH": 1} + # should generate: + # + # ["ACCH2", "ACCH2", "ACCH2", "ACCH"] + # ========================================================================= + composed_in_mol = np.array( + [ + stru + for stru in composed_structures + for _ in range(mol_subgroups[stru]) + ] + ) + + # ========================================================================= + # Create the combinatory list as explainde in the funcion documentation. + # ========================================================================= + combinatory_list = [] + for i in range(1, len(composed_in_mol) + 1): + combinatory_list.extend(set(combinations(composed_in_mol, i))) + + # ========================================================================= + # Try by brute force all combinatories and store the successfull ones + # ========================================================================= + successfull_corrections = [] + + for combination in combinatory_list: + # Get subgroups with decomposed structures + correction = apply_decompose_correction( + mol_subgroups=mol_subgroups, + groups_to_decompose=combination, + model=model, + ) + + # Did the correction work? + right_mw = check_has_molecular_weight_right( + mol_object=mol_object, + mol_subgroups=correction, + model=model, + ) + + if not right_mw: + continue + + has_overlap = check_has_composed_overlapping( + mol_object, correction, model + ) + + if has_overlap: + continue + + has_hiden = check_has_hiden(mol_object, correction, model) + + if has_hiden: + continue + + can_fit = check_can_fit_atoms( + mol_object=mol_object, + mol_subgroups=correction, + model=model, + ) + + if can_fit: + successfull_corrections.append(correction) + + successfull_corrections = np.array(successfull_corrections) + + # No posible correction found, can't represent molecule with func groups + if len(successfull_corrections) == 0: + return {} + + # ========================================================================= + # Get rid of duplicated successfull_corrections + # ========================================================================= + dict_strs = np.array([str(d) for d in successfull_corrections]) + unique_indices = np.unique(dict_strs, return_index=True)[1] + unique_corrections = successfull_corrections[unique_indices] + + # ========================================================================= + # Return decomposed subgroup solution + # ========================================================================= + if len(unique_corrections) == 1: + # Unique solution found + return unique_corrections[0] + else: + # Find the solution/s that uses the minimun number of functional groups + subgroups_used = np.array( + [np.sum(list(d.values())) for d in unique_corrections] + ) + min_subgroups_used = np.min(subgroups_used) + idx_min_lens = np.where(subgroups_used == min_subgroups_used)[0] + dicts_with_min_len = unique_corrections[idx_min_lens] + + if len(dicts_with_min_len) == 1: + # Solutions number turn into one + return dicts_with_min_len[0] + else: + return dicts_with_min_len
+ + + +def apply_decompose_correction( + mol_subgroups: dict, + groups_to_decompose: tuple, + model: FragmentationModel, +) -> dict: + """Decompose composed structures in mol_subgroups. + + The function receives a tuple of groups to decompose and applies the + corresponding correction. For example, if the function receives the order + of decomposing an ACCH2, the function subtracts an ACCH2 group from + mol_subgroups, and then adds an AC and a CH2 group. + + Parameters + ---------- + mol_subgroups : dict + Molecule's FragmentationModel subgroups. + groups_to_decompose : tuple[str] + Tuple with all the composed structures to decompose. + model: FragmentationModel + FragmentationModel object. + + Returns + ------- + dict + Functional groups dictionary with decomposed structures. + """ + chm_grps = mol_subgroups.copy() + + for group in groups_to_decompose: + contribute_dict = json.loads(model.subgroups.loc[group, "contribute"]) + for grp, contribution in contribute_dict.items(): + chm_grps[grp] = chm_grps.get(grp, 0) - 1 * contribution + + # Eliminate occurrences == 0 + groups_corrected = { + key: value for key, value in chm_grps.items() if value != 0 + } + + return groups_corrected +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/core/draw_molecule.html b/_modules/ugropy/core/draw_molecule.html new file mode 100644 index 0000000..2122b9b --- /dev/null +++ b/_modules/ugropy/core/draw_molecule.html @@ -0,0 +1,251 @@ + + + + + + ugropy.core.draw_molecule — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for ugropy.core.draw_molecule

+"""draw_molecule module."""
+
+from typing import List
+
+import numpy as np
+
+from rdkit import Chem
+from rdkit.Chem.Draw import rdMolDraw2D
+
+from ugropy.core.fit_atoms_indexes import fit_atoms
+from ugropy.fragmentation_models.fragmentation_model import FragmentationModel
+
+
+
+[docs] +def draw( + mol_object: Chem.rdchem.Mol, + subgroups: dict, + model: FragmentationModel, + title: str = "", + width: float = 400, + height: float = 200, + title_font_size: float = 12, + legend_font_size: float = 12, + font: str = "Helvetica", +) -> str: + """Create a svg representation of the fragmentation result. + + Parameters + ---------- + mol_object : Chem.rdchem.Mol + RDKit Mol object. + mol_subgroups : Union[dict, List[dict]] + Subgroups of mol_object. + model: FragmentationModel + FragmentationModel object. + title : str, optional + Graph title, by default "" + width : int, optional + Graph width, by default 400 + height : int, optional + Graph height, by default 200 + title_font_size : int, optional + Font size of graph's title, by default 12 + legend_font_size : int, optional + Legend font size, by default 12 + font : str, optional + Text font, by default "Helvetica" + + Returns + ------- + str + SVG string. + """ + # ===================================================================== + # Fit subgroups into the mol's atoms + # ===================================================================== + fit = fit_atoms(mol_object, subgroups, model) + + # ===================================================================== + # Generate the colors for each subgroup (max 10 TODO) + # ===================================================================== + how_many_subgroups = len(fit.keys()) + + colors_rgb = _generate_distinct_colors(how_many_subgroups) + + highlight = [] + atoms_colors = {} + subgroups_colors = {} + + for idx, (subgroup, atoms) in enumerate(fit.items()): + atms = np.array(atoms).flatten() + + subgroups_colors[subgroup] = colors_rgb[idx] + highlight.extend(atms.tolist()) + + for at in atms: + atoms_colors[int(at)] = colors_rgb[idx] + + drawer = rdMolDraw2D.MolDraw2DSVG(width, height) + drawer.DrawMolecule( + mol_object, + highlightAtoms=highlight, + highlightBonds=[], + highlightAtomColors=atoms_colors, + ) + drawer.FinishDrawing() + svg = drawer.GetDrawingText().replace("svg:", "") + + # ===================================================================== + # Create legend + # ===================================================================== + legend = "" + i = 0 + for i, (name, color) in enumerate(subgroups_colors.items()): + r, g, b, _ = color + rect_color = f"rgb({int(r * 255)}, {int(g * 255)}, {int(b * 255)})" + name = name.replace("<", "&lt;").replace(">", "&gt;") + legend += f'<rect x="1" y="{5 + i * 25}" width="{legend_font_size * 1.5}" height="{legend_font_size * 1.5}" fill="{rect_color}" />' # noqa + legend += f'<text x="{legend_font_size * 1.6}" y="{20 + i * 25}" font-family="{font}" font-size="{legend_font_size}" fill="black">{name}</text>' # noqa + + # ===================================================================== + # Create title + # ===================================================================== + title = f'<text x="{width/2}" y="40" font-family="{font}" font-size="{title_font_size}" font-weight="bold" fill="black" text-anchor="middle">{title}</text>' # noqa + + # ===================================================================== + # Set title and legend to figure + # ===================================================================== + svg_with_legend = svg.replace("</svg>", f"{legend}{title}</svg>") + + return svg_with_legend
+ + + +def _generate_distinct_colors(n: int) -> List[tuple]: + """Return distinguishable colors in (r,g,b,a) format (10 different max). + + Parameters + ---------- + n : int + Number of colors desired. + + Returns + ------- + List[tuple] + Colors. + """ + base_colors = np.array( + [ + [0.12156863, 0.46666667, 0.70588235], # blue + [1.0, 0.49803922, 0.05490196], # orange + [0.17254902, 0.62745098, 0.17254902], # green + [0.83921569, 0.15294118, 0.15686275], # red + [0.58039216, 0.40392157, 0.74117647], # purple + [0.54901961, 0.3372549, 0.29411765], # brown + [0.89019608, 0.46666667, 0.76078431], # pink + [0.49803922, 0.49803922, 0.49803922], # gray + [0.7372549, 0.74117647, 0.13333333], # yellow + [0.09019608, 0.74509804, 0.81176471], # cyan + ] + ) + colors = [base_colors[i % len(base_colors)] for i in range(n)] + colors_rgb = [(color[0], color[1], color[2], 0.65) for color in colors] + return colors_rgb +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/core/fit_atoms_indexes.html b/_modules/ugropy/core/fit_atoms_indexes.html new file mode 100644 index 0000000..e12c521 --- /dev/null +++ b/_modules/ugropy/core/fit_atoms_indexes.html @@ -0,0 +1,178 @@ + + + + + + ugropy.core.fit_atoms_indexes — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for ugropy.core.fit_atoms_indexes

+"""fit_atoms_indexes module."""
+
+from itertools import chain, combinations, product
+
+from rdkit import Chem
+
+from ugropy.core.detect_model_groups import group_matches
+from ugropy.fragmentation_models.fragmentation_model import FragmentationModel
+
+
+
+[docs] +def fit_atoms( + mol_object: Chem.rdchem.Mol, mol_subgroups: dict, model: FragmentationModel +) -> dict: + """Assign the atoms indexes for each mol_subgroup. + + Parameters + ---------- + mol_object : Chem.rdchem.Mol + RDKit Mol object. + mol_subgroups : dict + Subgroups of mol_object. + model: FragmentationModel + FragmentationModel object. + + Returns + ------- + dict + Atom indexes in mol_object of each subgroup. + """ + # ========================================================================= + # Number of atoms in mol_object and subgroups. + # ========================================================================= + total_atom_num = mol_object.GetNumAtoms() + subgroups = list(mol_subgroups.keys()) + + # import ipdb; ipdb.set_trace() + + # ========================================================================= + # Getting atoms candidates for each group. + # ========================================================================= + groups_atoms = {} + for group in mol_subgroups.keys(): + atoms = group_matches(mol_object, group, model, "fit") + groups_atoms[group] = atoms + + # ========================================================================= + # Getting combinations for each subgroup according to the number of the + # number of occurences in the mol_subgroups tentative solution. + # ========================================================================= + atoms_combinations = { + group: list(combinations(groups_atoms[group], mol_subgroups[group])) + for group in mol_subgroups + } + + # ========================================================================= + # Check all possible combinations of solutions + # TODO: can be optimized? Probably not, but with an algorithm change maybe + # ========================================================================= + for comb in product(*atoms_combinations.values()): + plain_tuple = chain(*chain(*comb)) + + if len(set(plain_tuple)) == total_atom_num: + sol_comb_dict = { + subgroups[i]: (comb[i][0] if len(comb[i]) == 1 else comb[i]) + for i in range(len(subgroups)) + } + return sol_comb_dict + + return {}
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/core/get_model_groups.html b/_modules/ugropy/core/get_model_groups.html new file mode 100644 index 0000000..20160d2 --- /dev/null +++ b/_modules/ugropy/core/get_model_groups.html @@ -0,0 +1,255 @@ + + + + + + ugropy.core.get_model_groups — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for ugropy.core.get_model_groups

+"""get_groups module.
+
+Get the groups from a FragmentationModel.
+"""
+
+from typing import Union
+
+import pandas as pd
+
+from rdkit import Chem
+
+from ugropy.fragmentation_models.fragmentation_model import FragmentationModel
+
+from .checks import (
+    check_can_fit_atoms,
+    check_has_composed,
+    check_has_hiden,
+    check_has_molecular_weight_right,
+)
+from .composed import correct_composed
+from .detect_model_groups import detect_groups
+from .fragmentation_object import Fragmentation
+from .get_rdkit_object import instantiate_mol_object
+from .problematics import correct_problematics
+
+
+
+[docs] +def get_groups( + model: FragmentationModel, + identifier: Union[str, Chem.rdchem.Mol], + identifier_type: str = "name", +) -> Fragmentation: + """Obtain the FragmentationModel's subgroups of an RDkit Mol object. + + Parameters + ---------- + model: FragmentationModel + FragmentationModel object. + identifier : str or rdkit.Chem.rdchem.Mol + Identifier of a molecule (name, SMILES or Chem.rdchem.Mol). Example: + hexane or CCCCCC. + identifier_type : str, optional + Use 'name' to search a molecule by name, 'smiles' to provide the + molecule SMILES representation or 'mol' to provide a + rdkit.Chem.rdchem.Mol object, by default "name". + + Returns + ------- + Fragmentation + FragmentationModel's subgroups + """ + # RDKit Mol object + mol_object = instantiate_mol_object(identifier, identifier_type) + + # ========================================================================= + # Direct detection of groups presence and occurences + # ========================================================================= + groups, groups_ocurrences = detect_groups( + mol_object=mol_object, model=model + ) + + # ========================================================================= + # Filter the contribution matrix and sum over row to cancel the contribs + # ========================================================================= + group_contributions = model.contribution_matrix.loc[groups, groups] + group_contributions = group_contributions.mul(groups_ocurrences, axis=0) + group_total_contributions = group_contributions.sum(axis=0) + group_total_contributions.replace(0, pd.NA, inplace=True) + + mol_subgroups = group_total_contributions.dropna().to_dict() + + # ========================================================================= + # Check for the presence of problematic structures and correct. + # ========================================================================= + mol_subgroups_corrected = correct_problematics( + mol_object=mol_object, + mol_subgroups=mol_subgroups, + model=model, + ) + + # First exit + if mol_subgroups_corrected == {}: + # No functional groups were detected for the molecule. Example: H2O2 + return Fragmentation({}, mol_object, model) + + # ========================================================================= + # Check the presence of composed structures and check if the molecular + # weight of the molecule is equals than the RDKit molecular weight. + # ========================================================================= + right_mw = check_has_molecular_weight_right( + mol_object=mol_object, + mol_subgroups=mol_subgroups_corrected, + model=model, + ) + + has_composed, _ = check_has_composed( + mol_subgroups=mol_subgroups_corrected, + model=model, + ) + + # ========================================================================= + # What to do according to the previous checks + # ========================================================================= + if right_mw and not has_composed: + # No need to do more, the solution was obtained. + return Fragmentation(mol_subgroups_corrected, mol_object, model) + elif not right_mw and not has_composed: + # Nothing to do, the moelcule can't be modeled with FragmentationModel + return Fragmentation({}, mol_object, model) + elif not right_mw and has_composed: + # Try fix the problem, the decomposition could still fail and return {} + mol_subgroups_decomposed = correct_composed( + mol_object=mol_object, + mol_subgroups=mol_subgroups_corrected, + model=model, + ) + return Fragmentation(mol_subgroups_decomposed, mol_object, model) + elif right_mw and has_composed: + # Worst scenario, right mw and has composed, need check if has hidden + has_hiden = check_has_hiden(mol_object, mol_subgroups_corrected, model) + + if has_hiden: + mol_subgroups_decomposed = correct_composed( + mol_object=mol_object, + mol_subgroups=mol_subgroups_corrected, + model=model, + ) + + fr = Fragmentation(mol_subgroups_decomposed, mol_object, model) + + return fr + else: + can_fit = check_can_fit_atoms( + mol_object, mol_subgroups_corrected, model + ) + + if can_fit: + fr = Fragmentation(mol_subgroups_corrected, mol_object, model) + return fr + else: + mol_subgroups_decomposed = correct_composed( + mol_object=mol_object, + mol_subgroups=mol_subgroups_corrected, + model=model, + ) + fr = Fragmentation(mol_subgroups_decomposed, mol_object, model) + return fr
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/core/get_rdkit_object.html b/_modules/ugropy/core/get_rdkit_object.html new file mode 100644 index 0000000..0c85915 --- /dev/null +++ b/_modules/ugropy/core/get_rdkit_object.html @@ -0,0 +1,165 @@ + + + + + + ugropy.core.get_rdkit_object — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for ugropy.core.get_rdkit_object

+"""get_rdkit_object module."""
+
+from functools import cache
+from typing import Union
+
+import pubchempy as pcp
+
+from rdkit import Chem
+
+
+
+[docs] +@cache +def instantiate_mol_object( + identifier: Union[str, Chem.rdchem.Mol], identifier_type: str = "name" +) -> Chem.rdchem.Mol: + """Instantiate a RDKit Mol object from molecule's name or SMILES. + + Parameters + ---------- + identifier : str or rdkit.Chem.rdchem.Mol + Identifier of a molecule (name, SMILES or rdkit.Chem.rdchem.Mol). + Example: hexane or CCCCCC for name or SMILES respectively. + identifier_type : str, optional + Use 'name' to search a molecule by name, 'smiles' to provide the + molecule SMILES representation or 'mol' to provide a + rdkit.Chem.rdchem.Mol object, by default "name". + + Returns + ------- + rdkit.Chem.rdchem.Mol + RDKit Mol object. + """ + if identifier_type.lower() == "smiles": + smiles = identifier + chem_object = Chem.MolFromSmiles(smiles) + + elif identifier_type.lower() == "name": + pcp_object = pcp.get_compounds(identifier, identifier_type)[0] + smiles = pcp_object.canonical_smiles + chem_object = Chem.MolFromSmiles(smiles) + + elif identifier_type.lower() == "mol": + chem_object = identifier + + if not isinstance(chem_object, Chem.rdchem.Mol): + raise ValueError( + "If 'mol' identifier type is used, the identifier must be a " + "rdkit.Chem.Chem.rdchem.Mol object." + ) + + else: + raise ValueError( + f"Identifier type: {identifier_type} not valid, use: 'name', " + "'smiles' or 'mol'" + ) + + return chem_object
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/core/problematics.html b/_modules/ugropy/core/problematics.html new file mode 100644 index 0000000..2ab39e0 --- /dev/null +++ b/_modules/ugropy/core/problematics.html @@ -0,0 +1,183 @@ + + + + + + ugropy.core.problematics — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for ugropy.core.problematics

+"""Correct problematic structures module.
+
+The algorithm of the function detect_groups may have some troubles with some
+chemical structures. For example, in an ester group, it will detect also an
+ether group. This problem can be handled by changing the SMARTS representation
+of the ether group to something like:
+
+[CH3][O][[#6]&!$([C]=O)]
+
+With this SMARTS representation of the CH3O UNIFAC group, we are specifying
+that this functional group it's a methyl group (CH3) bounded to oxygen by a
+simple covalent bond, and that oxygen is bonded to any carbon but a carbon that
+it's double bonded to an oxygen. This should avoid detecting an ether group in
+an ester group. But, consider the structure of the molecule ethyl methyl
+carbonate (PubChem CID 522046). That molecule has both an ester group and an
+ether group, and the previous smarts representation will not detect the ether
+group that we want to be detected. This problem defines what a problematic
+structure is for the ugropy library. Maybe there is a SMARTS representation
+that well behaves in these situations, but it's easier to make a list of these
+problematic structures and correct them with a function than generate a complex
+SMARTS representation of a functional group.
+"""
+
+import json
+
+from rdkit import Chem
+
+from ugropy.fragmentation_models.fragmentation_model import FragmentationModel
+
+
+
+[docs] +def correct_problematics( + mol_object: Chem.rdchem.Mol, + mol_subgroups: dict, + model: FragmentationModel, +) -> dict: + """Correct problematic structures in mol_object. + + Parameters + ---------- + mol_object : Chem.rdchem.Mol + RDKit Chem object + mol_subgroups : dict + Dictionary with the subgroups not problematics corrected in mol_object. + model: FragmentationModel + FragmentationModel object. + + Returns + ------- + dict + Molecule's subrgoups corrected with the problematic structures list. + """ + corrected_subgroups = mol_subgroups.copy() + + for smarts in model.problematic_structures.index: + structure = Chem.MolFromSmarts(smarts) + matches = mol_object.GetSubstructMatches(structure) + how_many_problems = len(matches) + + if how_many_problems > 0: + problematic_dict = json.loads( + model.problematic_structures.loc[smarts, "contribute"] + ) + + for subgroup, contribution in problematic_dict.items(): + corrected_subgroups[subgroup] = ( + corrected_subgroups.get(subgroup, 0) + + contribution * how_many_problems + ) + + # Eliminate occurrences == 0 + corrected_subgroups = { + key: value for key, value in corrected_subgroups.items() if value != 0 + } + return corrected_subgroups
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/fragmentation_models/fragmentation_model.html b/_modules/ugropy/fragmentation_models/fragmentation_model.html new file mode 100644 index 0000000..cdfe6ce --- /dev/null +++ b/_modules/ugropy/fragmentation_models/fragmentation_model.html @@ -0,0 +1,317 @@ + + + + + + ugropy.fragmentation_models.fragmentation_model — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for ugropy.fragmentation_models.fragmentation_model

+"""FragmentationModel module.
+
+All ugropy models (joback, unifac, psrk) are instances of the
+FragmentationModule class.
+"""
+
+import json
+from typing import List, Union
+
+import numpy as np
+
+import pandas as pd
+
+from rdkit import Chem
+
+
+
+[docs] +class FragmentationModel: + """FragmentationModel class. + + All ugropy supported models are an instance of this class. This class can + be used by the user to create their own FragmentationModels. + + Parameters + ---------- + subgroups : pd.DataFrame + Model's subgroups. Index: 'group' (groups names). Mandatory columns: + 'detection_smarts' (SMARTS representations of the group to detect its + precense in the molecule), 'smarts' (true SMARTS of the group witouht + additional atom detections), 'contribute' (dictionary as a string with + the group contribution), 'composed' (y or n if it is or is not a + composed structure), 'molecular_weight' (molecular weight of the + subgroups). + split_detection_smarts : List[str], optional + List of subgroups that have different SMARTS representations. by + default [] + problematic_structures : Union[pd.DataFrame, None], optional + Model's problematic/ambiguous structures. Index: 'smarts' (SMARTS of + the problematic structure). Mandatory columns: 'contribute' (dictionary + as a string with the structure contribution), by default None + hideouts : Union[pd.DataFrame, None], optional + Hideouts for each group. Index: 'group' (Group of the model that can be + hiden). Mandatory columns: 'hideout' (other subgroups to find the hiden + subgroup), by defautl None + + Attributes + ---------- + subgroups : pd.DataFrame + Model's subgroups. Index: 'group' (groups names). Mandatory columns: + 'detection_smarts' (SMARTS representations of the group to detect its + precense in the molecule), 'smarts' (true SMARTS of the group witouht + additional atom detections. If a value is missing uses the + corresponding detection_smarts), 'contribute' (dictionary as a string + with the group contribution), 'composed' (y or n if it is or is not a + composed structure), 'molecular_weight' (molecular weight of the + subgroups). + split_detection_smarts : List[str] + List of subgroups that have different SMARTS representations. + problematic_structures : pd.Dataframe + Model's problematic/ambiguous structures. Index: 'smarts' (SMARTS of + the problematic structure). Mandatory columns: 'contribute' (dictionary + as a string with the structure contribution) + hideouts : pd.DataFrame + Hideouts for each group. Index: 'group' (Group of the model that can be + hiden). Mandatory columns: 'hideout' (other subgroups to find the hiden + subgroup) + detection_mols : dict + Dictionary cotaining all the rdkit Mol object from the detection_smarts + subgroups column. + fit_mols : dict + Dictionary cotaining all the rdkit Mol object from the smarts subgroups + column. + contribution_matrix : pd.Dataframe + Contribution matrix of the model built from the subgroups contribute. + """ + + def __init__( + self, + subgroups: pd.DataFrame, + split_detection_smarts: List[str] = [], + problematic_structures: Union[pd.DataFrame, None] = None, + hideouts: Union[pd.DataFrame, None] = None, + ) -> None: + self.subgroups = subgroups + self.split_detection_smarts = split_detection_smarts + + # ===================================================================== + # Empty problematics template + # ===================================================================== + if problematic_structures is None: + self.problematic_structures = pd.DataFrame( + [], columns=["smarts", "contribute"] + ).set_index("smarts") + else: + self.problematic_structures = problematic_structures + + # ===================================================================== + # Hideouts + # ===================================================================== + if hideouts is None: + self.hideouts = pd.DataFrame( + [], columns=["group", "hideout"] + ).set_index("group") + else: + self.hideouts = hideouts + + # ===================================================================== + # Contribution matrix build + # ===================================================================== + self.contribution_matrix = self._build_contrib_matrix() + + # ===================================================================== + # Instantiate all de mol object from their smarts + # ===================================================================== + self.detection_mols = self._instantiate_detection_mol() + self.fit_mols = self._instantiate_fit_mols() + + def _build_contrib_matrix(self) -> pd.DataFrame: + """Build the contribution matrix of the model. + + Returns + ------- + pd.DataFrame + The contribution matrix of the model built from the contribute + column of the subgroups DataFrame. + + Raises + ------ + ValueError + Bad contribution parsing of a group + TypeError + Bad contribution parsing of a group + """ + index = self.subgroups.index.to_numpy() + matrix = np.zeros((len(index), len(index)), dtype=int) + + # Build the matrix + dfm = pd.DataFrame(matrix, index=index, columns=index).rename_axis( + "group" + ) + + # Fill the matrix + for group in index: + str_contribution = self.subgroups.loc[group, "contribute"] + + try: + contribution = json.loads(str_contribution) + except json.JSONDecodeError: + raise ValueError( + f"Bad contribute parsing of the group: {group}" + ) + except TypeError: + raise TypeError( + f"Bad contribution parsing of the group: {group}." + ) + + for k in contribution.keys(): + dfm.loc[group, k] = contribution[k] + + return dfm + + def _instantiate_detection_mol(self) -> dict: + """Instantiate all the rdkit Mol object from the detection_smarts. + + Returns + ------- + dict + Mol objects. + """ + mols = {} + + for group in self.subgroups.index: + if group not in self.split_detection_smarts: + mols[group] = [ + Chem.MolFromSmarts( + self.subgroups.loc[group, "detection_smarts"] + ) + ] + else: + smarts = self.subgroups.loc[group, "detection_smarts"].split( + "," + ) + + mol_smarts = [] + for sms in smarts: + mol_smarts.append(Chem.MolFromSmarts(sms)) + + mols[group] = mol_smarts + return mols + + def _instantiate_fit_mols(self) -> dict: + """Instantiate all the rdkit Mol object from the smarts. + + Returns + ------- + dict + Mol object to fit the subgroups in the molecule's atoms. + """ + mols = {} + + for group in self.subgroups.index: + smarts = self.subgroups.loc[group, "smarts"] + + if isinstance(smarts, str): + mols[group] = [Chem.MolFromSmarts(smarts)] + else: + mols[group] = self.detection_mols[group] + + return mols
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/fragmentation_models/gibbs_model.html b/_modules/ugropy/fragmentation_models/gibbs_model.html new file mode 100644 index 0000000..9e822f1 --- /dev/null +++ b/_modules/ugropy/fragmentation_models/gibbs_model.html @@ -0,0 +1,220 @@ + + + + + + ugropy.fragmentation_models.gibbs_model — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for ugropy.fragmentation_models.gibbs_model

+"""GibbsModel module."""
+
+from typing import List, Union
+
+import pandas as pd
+
+from ugropy.fragmentation_models.fragmentation_model import FragmentationModel
+
+
+
+[docs] +class GibbsModel(FragmentationModel): + """GibbsModel it's a fragmentation model dedicated to Gibbs excess models. + + unifac, psrk, dortmund are instances of this class. + + Parameters + ---------- + subgroups : pd.DataFrame + Model's subgroups. Index: 'group' (groups names). Mandatory columns: + 'detection_smarts' (SMARTS representations of the group to detect its + precense in the molecule), 'smarts' (true SMARTS of the group witouht + additional atom detections), 'contribute' (dictionary as a string with + the group contribution), 'composed' (y or n if it is or is not a + composed structure), 'molecular_weight' (molecular weight of the + subgroups). + split_detection_smarts : List[str], optional + List of subgroups that have different SMARTS representations. by + default [] + problematic_structures : Union[pd.DataFrame, None], optional + Model's problematic/ambiguous structures. Index: 'smarts' (SMARTS of + the problematic structure). Mandatory columns: 'contribute' (dictionary + as a string with the structure contribution), by default None + hideouts : Union[pd.DataFrame, None], optional + Hideouts for each group. Index: 'group' (Group of the model that can be + hiden). Mandatory columns: 'hideout' (other subgroups to find the hiden + subgroup), by defautl None + subgroups_info : Union[pd.DataFrame, None], optional + Information of the model's subgroups (R, Q, subgroup_number, + main_group), by default None + main_groups : Union[pd.DataFrame, None], optional + Main groups information (no., maingroup_name, subgroups), by default + None + + Attributes + ---------- + subgroups : pd.DataFrame + Model's subgroups. Index: 'group' (groups names). Mandatory columns: + 'detection_smarts' (SMARTS representations of the group to detect its + precense in the molecule), 'smarts' (true SMARTS of the group witouht + additional atom detections. If a value is missing uses the + corresponding detection_smarts), 'contribute' (dictionary as a string + with the group contribution), 'composed' (y or n if it is or is not a + composed structure), 'molecular_weight' (molecular weight of the + subgroups). + split_detection_smarts : List[str] + List of subgroups that have different SMARTS representations. + problematic_structures : pd.Dataframe + Model's problematic/ambiguous structures. Index: 'smarts' (SMARTS of + the problematic structure). Mandatory columns: 'contribute' (dictionary + as a string with the structure contribution) + hideouts : pd.DataFrame + Hideouts for each group. Index: 'group' (Group of the model that can be + hiden). Mandatory columns: 'hideout' (other subgroups to find the hiden + subgroup) + detection_mols : dict + Dictionary cotaining all the rdkit Mol object from the detection_smarts + subgroups column. + fit_mols : dict + Dictionary cotaining all the rdkit Mol object from the smarts subgroups + column. + contribution_matrix : pd.Dataframe + Contribution matrix of the model built from the subgroups contribute. + subgroups_info : pd.DataFrame + Information of the model's subgroups (R, Q, subgroup_number, + main_group). + main_groups : pd.DataFrame + Main groups information (no., maingroup_name, subgroups). + """ + + def __init__( + self, + subgroups: pd.DataFrame, + split_detection_smarts: List[str] = [], + problematic_structures: Union[pd.DataFrame, None] = None, + hideouts: Union[pd.DataFrame, None] = None, + subgroups_info: Union[pd.DataFrame, None] = None, + main_groups: Union[pd.DataFrame, None] = None, + ) -> None: + super().__init__( + subgroups, split_detection_smarts, problematic_structures, hideouts + ) + + # ===================================================================== + # Empty main_groups DataFrame template + # ===================================================================== + if main_groups is None: + self.main_groups = pd.DataFrame( + [], columns=["no.", "main group name", "subgroups"] + ).set_index("no.") + else: + self.main_groups = main_groups + + # ===================================================================== + # subgroups info + # ===================================================================== + if subgroups_info is None: + self.subgroups_info = pd.DataFrame( + [], + columns=["group", "subgroup_number", "main_group", "R", "Q"], + ).set_index("group") + else: + self.subgroups_info = subgroups_info
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/fragmentation_models/prop_estimator.html b/_modules/ugropy/fragmentation_models/prop_estimator.html new file mode 100644 index 0000000..758cbe9 --- /dev/null +++ b/_modules/ugropy/fragmentation_models/prop_estimator.html @@ -0,0 +1,196 @@ + + + + + + ugropy.fragmentation_models.prop_estimator — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for ugropy.fragmentation_models.prop_estimator

+"""PropertiesEstimator module."""
+
+from typing import List, Union
+
+import pandas as pd
+
+from ugropy.fragmentation_models.fragmentation_model import FragmentationModel
+
+
+
+[docs] +class PropertiesEstimator(FragmentationModel): + """Fragmentation model dedicated to properties estimation models. + + joback is a instance of this class. + + Parameters + ---------- + subgroups : pd.DataFrame + Model's subgroups. Index: 'group' (groups names). Mandatory columns: + 'detection_smarts' (SMARTS representations of the group to detect its + precense in the molecule), 'smarts' (true SMARTS of the group witouht + additional atom detections), 'contribute' (dictionary as a string with + the group contribution), 'composed' (y or n if it is or is not a + composed structure), 'molecular_weight' (molecular weight of the + subgroups). + split_detection_smarts : List[str], optional + List of subgroups that have different SMARTS representations. by + default [] + problematic_structures : Union[pd.DataFrame, None], optional + Model's problematic/ambiguous structures. Index: 'smarts' (SMARTS of + the problematic structure). Mandatory columns: 'contribute' (dictionary + as a string with the structure contribution), by default None + hideouts : Union[pd.DataFrame, None], optional + Hideouts for each group. Index: 'group' (Group of the model that can be + hiden). Mandatory columns: 'hideout' (other subgroups to find the hiden + subgroup), by defautl None + properties_contributions : pd.DataFrame, optional + Group's properties contributions, by default None + + Attributes + ---------- + subgroups : pd.DataFrame + Model's subgroups. Index: 'group' (groups names). Mandatory columns: + 'detection_smarts' (SMARTS representations of the group to detect its + precense in the molecule), 'smarts' (true SMARTS of the group witouht + additional atom detections. If a value is missing uses the + corresponding detection_smarts), 'contribute' (dictionary as a string + with the group contribution), 'composed' (y or n if it is or is not a + composed structure), 'molecular_weight' (molecular weight of the + subgroups). + split_detection_smarts : List[str] + List of subgroups that have different SMARTS representations. + problematic_structures : pd.Dataframe + Model's problematic/ambiguous structures. Index: 'smarts' (SMARTS of + the problematic structure). Mandatory columns: 'contribute' (dictionary + as a string with the structure contribution) + hideouts : pd.DataFrame + Hideouts for each group. Index: 'group' (Group of the model that can be + hiden). Mandatory columns: 'hideout' (other subgroups to find the hiden + subgroup) + detection_mols : dict + Dictionary cotaining all the rdkit Mol object from the detection_smarts + subgroups column. + fit_mols : dict + Dictionary cotaining all the rdkit Mol object from the smarts subgroups + column. + contribution_matrix : pd.Dataframe + Contribution matrix of the model built from the subgroups contribute. + properties_contributions : pd.DataFrame + Group's properties contributions. + """ + + def __init__( + self, + subgroups: pd.DataFrame, + split_detection_smarts: List[str] = [], + problematic_structures: Union[pd.DataFrame, None] = None, + hideouts: Union[pd.DataFrame, None] = None, + properties_contributions: Union[pd.DataFrame, None] = None, + ): + super().__init__( + subgroups, split_detection_smarts, problematic_structures, hideouts + ) + + # ===================================================================== + # Properties contributions + # ===================================================================== + self.properties_contributions = properties_contributions
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/groups.html b/_modules/ugropy/groups.html new file mode 100644 index 0000000..dd0114b --- /dev/null +++ b/_modules/ugropy/groups.html @@ -0,0 +1,179 @@ + + + + + + ugropy.groups — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for ugropy.groups

+"""Groups module."""
+
+from rdkit.Chem import Descriptors
+
+from ugropy.core.get_model_groups import get_groups
+from ugropy.core.get_rdkit_object import instantiate_mol_object
+from ugropy.fragmentation_models.models import psrk, unifac
+from ugropy.properties.joback_properties import JobackProperties
+
+
+
+[docs] +class Groups: + """Group class. + + Stores the solved FragmentationModels subgroups of a molecule. + + Parameters + ---------- + identifier : str or rdkit.Chem.rdchem.Mol + Identifier of a molecule (name, SMILES or Chem.rdchem.Mol). Example: + hexane or CCCCCC. + identifier_type : str, optional + Use 'name' to search a molecule by name, 'smiles' to provide the + molecule SMILES representation or 'mol' to provide a + rdkit.Chem.rdchem.Mol object, by default "name". + normal_boiling_temperature : float, optional + If provided, will be used to estimate critical temperature, acentric + factor, and vapor pressure instead of the estimated normal boiling + point in the Joback group contribution model, by default None. + + Attributes + ---------- + identifier : str + Identifier of a molecule. Example: hexane or CCCCCC. + identifier_type : str, optional + Use 'name' to search a molecule by name or 'smiles' to provide the + molecule SMILES representation, by default "name". + mol_object : rdkit.Chem.rdchem.Mol + RDKit Mol object. + molecular_weight : float + Molecule's molecular weight from rdkit.Chem.Descriptors.MolWt [g/mol]. + unifac : Fragmentation + Classic LV-UNIFAC subgroups. + psrk : Fragmentation + Predictive Soave-Redlich-Kwong subgroups. + joback : JobackProperties + JobackProperties object that contains the Joback subgroups and the + estimated properties of the molecule. + """ + + def __init__( + self, + identifier: str, + identifier_type: str = "name", + normal_boiling_temperature: float = None, + ) -> None: + self.identifier_type = identifier_type.lower() + self.identifier = identifier + self.mol_object = instantiate_mol_object(identifier, identifier_type) + self.molecular_weight = Descriptors.MolWt(self.mol_object) + + # UNIFAC + self.unifac = get_groups(unifac, self.identifier, self.identifier_type) + + # PSRK + self.psrk = get_groups(psrk, self.identifier, self.identifier_type) + + # Joback + self.joback = JobackProperties( + self.identifier, self.identifier_type, normal_boiling_temperature + )
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/properties/joback_properties.html b/_modules/ugropy/properties/joback_properties.html new file mode 100644 index 0000000..614d36f --- /dev/null +++ b/_modules/ugropy/properties/joback_properties.html @@ -0,0 +1,469 @@ + + + + + + ugropy.properties.joback_properties — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for ugropy.properties.joback_properties

+"""Joback's properties module."""
+
+from typing import Union
+
+import numpy as np
+from numpy.typing import NDArray
+
+from ugropy.constants import R
+from ugropy.core.get_model_groups import get_groups
+from ugropy.fragmentation_models.models import joback
+
+
+
+[docs] +class JobackProperties: + """Joback group contribution properties estimator. + + The class recieves either the Joback and Reid model's :cite:p:`joback1, + joback2` groups, name or smiles of a molecule and estimates the its + properties. + + Parameters + ---------- + identifier : str or rdkit.Chem.rdchem.Mol + Identifier of a molecule (name, SMILES, groups, or Chem.rdchem.Mol). + Example: you can use hexane, CCCCCC, {"-CH3": 2, "-CH2-": 4} for name, + SMILES and groups respectively. + identifier_type : str, optional + Use 'name' to search a molecule by name, 'smiles' to provide the + molecule SMILES representation, 'groups' to provide Joback groups or + 'mol' to provide a rdkit.Chem.rdchem.Mol object, by default "name". + normal_boiling_point : float, optional + If provided, will be used to estimate critical temperature, acentric + factor, and vapor pressure instead of the estimated normal boiling + point, by default None. + + Attributes + ---------- + subgroups : dict + Joback functional groups of the molecule. + experimental_boiling_temperature : float + User provided experimental normal boiling point [K]. + critical_temperature : float + Joback estimated critical temperature [K]. + critical_pressure : float + Joback estimated critical pressure [bar]. + critical_volume : float + Joback estimated critical volume [cm³/mol]. + normal_boiling_point : float + Joback estimated normal boiling point [K]. + fusion_temperature : float + Joback estimated fusion temperature [K]. + h_formation : float + Joback estimated enthalpy of formation ideal gas at 298 K [kJ/mol]. + g_formation : float + Joback estimated Gibbs energy of formation ideal gas at 298 K [K]. + heat_capacity_ideal_gas_params : dict + Joback estimated Reid's ideal gas heat capacity equation parameters + [J/mol/K]. + h_fusion : float + Joback estimated fusion enthalpy [kJ/mol]. + h_vaporization : float + Joback estimated vaporization enthalpy at the normal boiling point + [kJ/mol]. + sum_na : float + Joback n_A contribution to liquid viscosity [N/s/m²]. + sum_nb : float + Joback n_B contribution to liquid viscosity [N/s/m²]. + molecular_weight : float + Molecular weight from Joback's subgroups [g/mol]. + acentric_factor : float + Acentric factor from Lee and Kesler's equation :cite:p:`joback1`. + vapor_pressure_params : dict + Vapor pressure G and k parameters for the Riedel-Plank-Miller + :cite:p:`joback1` equation [bar]. + """ + + def __init__( + self, + identifier: str, + identifier_type: str = "name", + normal_boiling_point: float = None, + ) -> None: + # Skip if instantiation from groups is made. + if identifier_type in ["name", "smiles", "mol"]: + self.subgroups = get_groups( + joback, identifier, identifier_type + ).subgroups + elif identifier_type == "groups": + self.subgroups = identifier + else: + raise ValueError( + f"Identifier type ''{identifier_type}'' is incorrect. Use " + "'name', 'smiles', 'mol' or 'groups'." + ) + + # experimental boiling temperature + self.experimental_boiling_temperature = normal_boiling_point + + # Original Joback properties + self.critical_temperature = None + self.critical_pressure = None + self.critical_volume = None + self.normal_boiling_point = None + self.fusion_temperature = None + self.h_formation = None + self.g_formation = None + self.heat_capacity_ideal_gas_params = np.array([]) + self.h_fusion = None + self.h_vaporization = None + self.sum_na = None + self.sum_nb = None + self.molecular_weight = None + + # Extra properties + self.acentric_factor = None + self.vapor_pressure_params = {} + + # Fill the properties' values + if self.subgroups != {}: + self._calculate_properties() + +
+[docs] + def heat_capacity_ideal_gas( + self, temperature: Union[float, NDArray] + ) -> Union[float, NDArray]: + """Calculate the ideal gas heat capacity [J/mol/K]. + + Uses the Joback estimated Reid's ideal gas heat capacity equation + parameters [J/mol/K]. + + Parameters + ---------- + temperature : Union[float, NDArray] + Temperature [K] + + Returns + ------- + Union[float, NDArray] + Ideal gas heat capacity [J/mol/K]. + """ + a, b, c, d = self.heat_capacity_ideal_gas_params + + t = temperature + + return a + b * t + c * t**2 + d * t**3
+ + +
+[docs] + def heat_capacity_liquid( + self, temperature: Union[float, NDArray] + ) -> Union[float, NDArray]: + """Calculate the liquid heat capacity [J/mol/K]. + + Uses the Rowlinson-Bondi :cite:p:`joback1` equation with the Joback + estimated properties. + + Parameters + ---------- + temperature : Union[float, NDArray] + Temperature [K] + + Returns + ------- + Union[float, NDArray] + Ideal gas heat capacity [J/mol/K]. + """ + tr = temperature / self.critical_temperature + w = self.acentric_factor + + c_p0 = self.heat_capacity_ideal_gas(temperature) + + c_pl = c_p0 + R * ( + 2.56 + + 0.436 * (1 - tr) ** (-1) + + w + * ( + 2.91 + + 4.28 * (1 - tr) ** (-1 / 3) * tr ** (-1) + + 0.296 * (1 - tr) ** (-1) + ) + ) + + return c_pl
+ + +
+[docs] + def viscosity_liquid( + self, temperature: Union[float, NDArray] + ) -> Union[float, NDArray]: + """Calculate the Joback estimated liquid viscosity [N/s/m²]. + + Parameters + ---------- + temperature : Union[float, NDArray] + Temperature [K] + + Returns + ------- + Union[float, NDArray] + Liquid viscosity [N/s/m²]. + """ + t = temperature + + n_l = self.molecular_weight * np.exp( + (self.sum_na - 597.82) / t + self.sum_nb - 11.202 + ) + return n_l
+ + +
+[docs] + def vapor_pressure( + self, temperature: Union[float, NDArray] + ) -> Union[float, NDArray]: + """Calculate the vapor pressure [bar]. + + Uses the Riedel-Plank-Miller :cite:p:`joback1` equation with the Joback + estimated properties. + + Parameters + ---------- + temperature : Union[float, NDArray] + Temperature [K] + + Returns + ------- + Union[float, NDArray] + Vapor pressure [bar] + """ + tr = temperature / self.critical_temperature + + g = self.vapor_pressure_params["G"] + k = self.vapor_pressure_params["k"] + + vp_r = np.exp(-g / tr * (1 - tr**2 + k * (3 + tr) * (1 - tr) ** 3)) + + vp = vp_r * self.critical_pressure + + return vp
+ + + def _calculate_properties(self) -> None: + """Obtain the molecule properties from Joback's groups.""" + groups = list(self.subgroups.keys()) + ocurr = list(self.subgroups.values()) + + df = joback.properties_contributions.loc[groups] + + # ===================================================================== + # Calculate complete contribution properties (no contribution missing) + # ===================================================================== + tc_c = df["Tc"].to_numpy() + pc_c = df["Pc"].to_numpy() + vc_c = df["Vc"].to_numpy() + tb_c = df["Tb"].to_numpy() + tf_c = df["Tf"].to_numpy() + hform_c = df["Hform"].to_numpy() + gform_c = df["Gform"].to_numpy() + hvap_c = df["Hvap"].to_numpy() + numa_c = df["num_of_atoms"].to_numpy() + mw_c = joback.subgroups.loc[groups, "molecular_weight"].to_numpy() + + # Molecular weight + self.molecular_weight = np.dot(ocurr, mw_c) + + # Joback normal boiling point (Tb) + self.normal_boiling_point = 198.2 + np.dot(ocurr, tb_c) + + # Fusion temperature (Tf) + self.fusion_temperature = 122.5 + np.dot(ocurr, tf_c) + + # Used normal boiling point for calculations + if self.experimental_boiling_temperature is not None: + tb = self.experimental_boiling_temperature + else: + tb = self.normal_boiling_point + + # Critical temperature (Tc) normal boiling temperature for calculations + self.critical_temperature = tb * ( + 0.584 + 0.965 * np.dot(ocurr, tc_c) - (np.dot(ocurr, tc_c)) ** 2 + ) ** (-1) + + # Critical pressure (Pc) + self.critical_pressure = ( + 0.113 + 0.0032 * np.dot(ocurr, numa_c) - np.dot(ocurr, pc_c) + ) ** (-2) + + # Critical volume (Vc) + self.critical_volume = 17.5 + np.dot(ocurr, vc_c) + + # Standard enthalpy of formation (298 K) + self.h_formation = 68.29 + np.dot(ocurr, hform_c) + + # Standard Gibbs energy of formation (298 K) + self.g_formation = 53.88 + np.dot(ocurr, gform_c) + + # Enthalpy of vaporization + self.h_vaporization = 15.30 + np.dot(ocurr, hvap_c) + + # ===================================================================== + # Incomplete contribution properties (some contribution missing) + # ===================================================================== + # Heat capacity + if "-N= (ring)" not in groups: + a_c = df["a"].to_numpy() + b_c = df["b"].to_numpy() + c_c = df["c"].to_numpy() + d_c = df["d"].to_numpy() + + a = np.dot(ocurr, a_c) - 37.93 + b = np.dot(ocurr, b_c) + 0.21 + c = np.dot(ocurr, c_c) - 3.91e-4 + d = np.dot(ocurr, d_c) + 2.06e-7 + + self.heat_capacity_ideal_gas_params = np.array([a, b, c, d]) + + # Enthalpy of fusion + if all(df["Hfusion"].notnull()): + hfusion_c = df["Hfusion"].to_numpy() + self.h_fusion = -0.88 + np.dot(ocurr, hfusion_c) + + # Liquid viscosity + if all(df["na"].notnull()): + na_c = df["na"].to_numpy() + nb_c = df["nb"].to_numpy() + + self.sum_na = np.dot(ocurr, na_c) + self.sum_nb = np.dot(ocurr, nb_c) + + # ===================================================================== + # Extra properties + # ===================================================================== + # Reduced normal boiling point temperature + t_br = tb / self.critical_temperature + + # Lee and Kesler's equation (acentric factor) + pc = self.critical_pressure + self.acentric_factor = ( + -np.log(pc) + - 5.92714 + + 6.09648 / t_br + + 1.28862 * np.log(t_br) + - 0.169347 * t_br**6 + ) / ( + 15.2518 + - 15.6875 / t_br + - 13.4721 * np.log(t_br) + + 0.43577 * t_br**6 + ) + + # Riedel-Plank-Miller equation (vapor pressure [bar]) + h = t_br * np.log(self.critical_pressure / 1.01325) / (1 - t_br) + + g = 0.4835 + 0.4605 * h + + k = (h / g - (1 + t_br)) / ((3 + t_br) * (1 - t_br) ** 2) + + self.vapor_pressure_params = {"G": g, "k": k}
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/writers/clapeyron.html b/_modules/ugropy/writers/clapeyron.html new file mode 100644 index 0000000..89d6f61 --- /dev/null +++ b/_modules/ugropy/writers/clapeyron.html @@ -0,0 +1,207 @@ + + + + + + ugropy.writers.clapeyron — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for ugropy.writers.clapeyron

+"""to_clapeyron module."""
+
+import pathlib
+from typing import List
+
+from ugropy.properties.joback_properties import JobackProperties
+
+from .clapeyron_writers import (
+    write_critical,
+    write_molar_mass,
+    write_psrk,
+    write_unifac,
+)
+
+
+
+[docs] +def to_clapeyron( + molecules_names: List[str], + unifac_groups: List[dict] = [], + psrk_groups: List[dict] = [], + joback_objects: List[JobackProperties] = [], + path: str = "database", + batch_name: str = "", +) -> None: + """Write the .csv input files for Clapeyron.jl. + + The provided lists must have the same length. If one of the model lists is + left empty, that model will not be writen in the .csv. + + Parameters + ---------- + molecules_names : List[str] + List of names for each chemical to write in the .csv files. + unifac_groups : List[dict], optional + List of classic liquid-vapor UNIFAC groups, by default []. + psrk_groups : List[dict], optional + List of Predictive Soave-Redlich-Kwong groups, by default []. + joback_objects : List[JobackProperties], optional + List of ugropy.properties.JobackProperties objects, by default []. + path : str, optional + Path to the directory to store de .csv files, by default "./database". + batch_name : str, optional + Name of the writing batch. For example, if you name the batch with + "batch1", the output of the UNIFAC groups will be: + "batch1_ogUNIFAC_groups.csv". With the default value will be + "ogUNIFAC_groups.csv", by default "". + """ + # Use pathlib's Path internally + path_pathlib = pathlib.Path(path) + + # Check if all list have correct data: + if len(molecules_names) == 0: + raise ValueError("No names provided for the molecules.") + + if unifac_groups and len(unifac_groups) != len(molecules_names): + raise ValueError( + "UNIFAC groups list must have the same amount of elements than" + "the molecules name list." + ) + + if psrk_groups and len(psrk_groups) != len(molecules_names): + raise ValueError( + "PSRK groups list must have the same amount of elements than" + "the molecules name list." + ) + + if joback_objects and len(joback_objects) != len(molecules_names): + raise ValueError( + "Joback objects list must have the same amount of elements than" + "the molecules name list." + ) + + # Create dir if not created + if not path_pathlib.is_dir(): + path_pathlib.mkdir(parents=True) + + # Molar mass + write_molar_mass( + path_pathlib, + batch_name, + molecules_names, + unifac_groups, + psrk_groups, + joback_objects, + ) + + # LV-UNIFAC + if unifac_groups: + write_unifac(path_pathlib, batch_name, molecules_names, unifac_groups) + + # PSRK + if psrk_groups: + write_psrk(path_pathlib, batch_name, molecules_names, psrk_groups) + + # Critical + if joback_objects: + write_critical( + path_pathlib, batch_name, molecules_names, joback_objects + )
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/writers/clapeyron_writers/critical.html b/_modules/ugropy/writers/clapeyron_writers/critical.html new file mode 100644 index 0000000..38c12c7 --- /dev/null +++ b/_modules/ugropy/writers/clapeyron_writers/critical.html @@ -0,0 +1,187 @@ + + + + + + ugropy.writers.clapeyron_writers.critical — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for ugropy.writers.clapeyron_writers.critical

+"""Joback critical properties writer module."""
+
+import pathlib
+from io import StringIO
+from typing import List
+
+import pandas as pd
+
+from ugropy.properties.joback_properties import JobackProperties
+
+
+
+[docs] +def write_critical( + path: pathlib.Path, + batch_name: str, + molecules_names: List[str], + joback_objects: List[JobackProperties] = [], +) -> None: + """Create the DataFrame with the critical properties for Clapeyron.jl. + + Uses the Joback to estimate the critical properties of the molecules. + + Parameters + ---------- + path : pathlib.Path, optional + Path to the directory to store de .csv files, by default "./database". + batch_name : str, optional + Name of the writing batch. For example, if you name the batch with + "batch1", the output of the UNIFAC groups will be: + "batch1_ogUNIFAC_groups.csv". With the default value will be + "ogUNIFAC_groups.csv", by default "". + molecules_names : List[str] + List of names for each chemical to write in the .csv files. + joback_objects : List[Joback], optional + List of ugropy.properties.JobackProperties objects, by default []. + + Returns + ------- + pd.DataFrame + DataFrame with the molecular weights for Clapeyron.jl + """ + data_str = ( + "Clapeyron Database File,,,,,\n" + "Critical Single Parameters,,,,,\n" + "species,CAS,Tc,Pc,Vc,acentricfactor\n" + ) + path_critical = pathlib.Path(path) + # ========================================================================= + # Build dataframe + # ========================================================================= + df = pd.read_csv(StringIO(data_str)) + + for idx, name in enumerate(molecules_names): + new_row = { + "Clapeyron Database File": name, + "Unnamed: 1": "", + "Unnamed: 2": joback_objects[idx].critical_temperature, + "Unnamed: 3": joback_objects[idx].critical_pressure * 1e5, + "Unnamed: 4": joback_objects[idx].critical_volume * 1e-6, + "Unnamed: 5": joback_objects[idx].acentric_factor, + } + df.loc[len(df)] = new_row + + df.columns = ["" if "Unnamed" in col else col for col in df.columns] + + if batch_name == "": + with open( + path_critical / "critical.csv", "w", newline="", encoding="utf-8" + ) as file: + df.to_csv(file, index=False) + + else: + with open( + path_critical / f"{batch_name}_critical.csv", + "w", + newline="", + encoding="utf-8", + ) as file: + df.to_csv(file, index=False)
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/writers/clapeyron_writers/molar_mass.html b/_modules/ugropy/writers/clapeyron_writers/molar_mass.html new file mode 100644 index 0000000..75c7ee4 --- /dev/null +++ b/_modules/ugropy/writers/clapeyron_writers/molar_mass.html @@ -0,0 +1,218 @@ + + + + + + ugropy.writers.clapeyron_writers.molar_mass — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for ugropy.writers.clapeyron_writers.molar_mass

+"""Molar mass writer module."""
+
+import pathlib
+from io import StringIO
+from typing import List
+
+import numpy as np
+
+import pandas as pd
+
+from ugropy.fragmentation_models.models import psrk, unifac
+from ugropy.properties.joback_properties import JobackProperties
+
+
+
+[docs] +def write_molar_mass( + path: pathlib.Path, + batch_name: str, + molecules_names: List[str], + unifac_groups: List[dict] = [], + psrk_groups: List[dict] = [], + joback_objects: List[JobackProperties] = [], +) -> None: + """Create the DataFrame with the molecular weights for Clapeyron.jl. + + Parameters + ---------- + path : pathlib.Path + Path to the directory to store de .csv files, by default "./database". + batch_name : str, optional + Name of the writing batch. For example, if you name the batch with + "batch1", the output of the UNIFAC groups will be: + "batch1_ogUNIFAC_groups.csv". With the default value will be + "ogUNIFAC_groups.csv", by default "". + molecules_names : List[str] + List of names for each chemical to write in the .csv files. + unifac_groups : List[dict], optional + List of classic liquid-vapor UNIFAC groups, by default []. + psrk_groups : List[dict], optional + List of Predictive Soave-Redlich-Kwong groups, by default []. + joback_objects : List[Joback], optional + List of ugropy.properties.JobackProperties objects, by default []. + + Returns + ------- + pd.DataFrame + DataFrame with the molecular weights for Clapeyron.jl + """ + data_str = ( + "Clapeyron Database File,,\n" + "Molar Mases Single Params,,\n" + "species,CAS,Mw\n" + ) + path_molar_mass = pathlib.Path(path) + # ========================================================================= + # Get molecular weights + # ========================================================================= + if joback_objects: + molecular_weigths = [j.molecular_weight for j in joback_objects] + elif unifac_groups: + df = unifac.subgroups.copy() + molecular_weigths = [] + for groups in unifac_groups: + contribution = df.loc[groups.keys(), "molecular_weight"].to_numpy() + molecular_weigths.append( + np.dot(contribution, list(groups.values())) + ) + elif psrk_groups: + df = psrk.subgroups.copy() + molecular_weigths = [] + for groups in psrk_groups: + contribution = df.loc[groups.keys(), "molecular_weight"].to_numpy() + molecular_weigths.append( + np.dot(contribution, list(groups.values())) + ) + else: + raise ValueError("Joback, UNIFAC or PSRK groups must be provided.") + + # ========================================================================= + # Build dataframe + # ========================================================================= + df = pd.read_csv(StringIO(data_str)) + + for idx, name in enumerate(molecules_names): + new_row = { + "Clapeyron Database File": name, + "Unnamed: 1": "", + "Unnamed: 2": molecular_weigths[idx], + } + df.loc[len(df)] = new_row + + df.columns = ["" if "Unnamed" in col else col for col in df.columns] + + if batch_name == "": + with open( + path_molar_mass / "molarmass.csv", + "w", + newline="", + encoding="utf-8", + ) as file: + df.to_csv(file, index=False) + + else: + with open( + path_molar_mass / f"{batch_name}_molarmass.csv", + "w", + newline="", + encoding="utf-8", + ) as file: + df.to_csv(file, index=False)
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/writers/clapeyron_writers/psrk_groups.html b/_modules/ugropy/writers/clapeyron_writers/psrk_groups.html new file mode 100644 index 0000000..0b50244 --- /dev/null +++ b/_modules/ugropy/writers/clapeyron_writers/psrk_groups.html @@ -0,0 +1,175 @@ + + + + + + ugropy.writers.clapeyron_writers.psrk_groups — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for ugropy.writers.clapeyron_writers.psrk_groups

+"""PSRK groups writer module."""
+
+import pathlib
+from typing import List
+
+
+
+[docs] +def write_psrk( + path: pathlib.Path, + batch_name: str, + molecules_names: List[str], + psrk_groups: List[dict], +) -> None: + """Create the DataFrame with the PSRK groups for Clapeyron.jl. + + Parameters + ---------- + path : pathlib.Path + Path to the directory to store de .csv files, by default "./database". + batch_name : str, optional + Name of the writing batch. For example, if you name the batch with + "batch1", the output of the UNIFAC groups will be: + "batch1_ogUNIFAC_groups.csv". With the default value will be + "ogUNIFAC_groups.csv", by default "". + molecules_names : List[str] + List of names for each chemical to write in the .csv files. + psrk_groups : List[dict], optional + List of Predictive Soave-Redlich-Kwong groups. + + Returns + ------- + pd.DataFrame + DataFrame with the LV-UNIFAC groups for Clapeyron.jl + """ + lines = [ + "Clapeyron Database File,\n" + "PSRK Groups [csvtype = groups,grouptype = PSRK]\n" + "species,groups\n" + ] + + path_psrk = path / "PSRK" + + for name, groups in zip(molecules_names, psrk_groups): + groups_str = '"[' + + for group in groups.keys(): + groups_str += f'""{group}"" => {groups[group]}, ' + + groups_str = groups_str[: len(groups_str) - 2] + groups_str += ']"\n' + + new_line = [f"{name},{groups_str}"] + + lines.extend(new_line) + + # Create folder for PSRK groups + if not path_psrk.is_dir(): + path_psrk.mkdir(parents=True) + + # Write .csv + if batch_name == "": + write_path = path_psrk / "PSRK_groups.csv" + else: + write_path = path_psrk / f"{batch_name}_PSRK_groups.csv" + + with open(write_path, "w", encoding="utf-8", newline="\n") as file: + file.writelines(lines)
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/writers/clapeyron_writers/unifac_groups.html b/_modules/ugropy/writers/clapeyron_writers/unifac_groups.html new file mode 100644 index 0000000..7ae2ee5 --- /dev/null +++ b/_modules/ugropy/writers/clapeyron_writers/unifac_groups.html @@ -0,0 +1,170 @@ + + + + + + ugropy.writers.clapeyron_writers.unifac_groups — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for ugropy.writers.clapeyron_writers.unifac_groups

+"""UNIFAC groups writer module."""
+
+import pathlib
+from typing import List
+
+
+
+[docs] +def write_unifac( + path: pathlib.Path, + batch_name: str, + molecules_names: List[str], + unifac_groups: List[dict], +) -> None: + """Create the DataFrame with the classic LV-UNIFAC groups for Clapeyron.jl. + + Parameters + ---------- + path : pathlib.Path + Path to the directory to store de .csv files, by default "./database". + batch_name : str, optional + Name of the writing batch. For example, if you name the batch with + "batch1", the output of the UNIFAC groups will be: + "batch1_ogUNIFAC_groups.csv". With the default value will be + "ogUNIFAC_groups.csv", by default "". + molecules_names : List[str] + List of names for each chemical to write in the .csv files. + unifac_groups : List[dict], optional + List of classic liquid-vapor UNIFAC groups. + """ + lines = [ + "Clapeyron Database File,\n" + "original UNIFAC Groups,[csvtype = groups,grouptype = originalUNIFAC]\n" # noqa + "species,groups\n" + ] + + path_ogunifac = path / "ogUNIFAC" + + for name, groups in zip(molecules_names, unifac_groups): + groups_str = '"[' + + for group in groups.keys(): + groups_str += f'""{group}"" => {groups[group]}, ' + + groups_str = groups_str[: len(groups_str) - 2] + groups_str += ']"\n' + + new_line = [f"{name},{groups_str}"] + + lines.extend(new_line) + + # Create folder for ogUNIFAC groups + if not path_ogunifac.is_dir(): + path_ogunifac.mkdir(parents=True) + + # Write .csv + if batch_name == "": + write_path = path_ogunifac / "ogUNIFAC_groups.csv" + else: + write_path = path_ogunifac / f"{batch_name}_ogUNIFAC_groups.csv" + + with open(write_path, "w", encoding="utf-8", newline="\n") as file: + file.writelines(lines)
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/ugropy/writers/thermo.html b/_modules/ugropy/writers/thermo.html new file mode 100644 index 0000000..723330f --- /dev/null +++ b/_modules/ugropy/writers/thermo.html @@ -0,0 +1,138 @@ + + + + + + ugropy.writers.thermo — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for ugropy.writers.thermo

+"""to_thermo module."""
+
+from ugropy.fragmentation_models.gibbs_model import GibbsModel
+
+
+
+[docs] +def to_thermo(mol_subgroups: dict, model: GibbsModel) -> dict: + """Obtain the subgroups dictionary to the Caleb Bell's Thermo library. + + Thermo: https://github.com/CalebBell/thermo + + Parameters + ---------- + mol_subgroups : dict + ugropy subgroups. + model : GibbsModel + Gibbs excess FragmentationModel (unifac or psrk). + + Returns + ------- + dict + Thermo fragmentation subgroups. + """ + thermo_groups = {} + for group, occurrence in mol_subgroups.items(): + group_num = model.subgroups_info.loc[group, "subgroup_number"] + + thermo_groups[group_num] = occurrence + + return thermo_groups
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_sources/README.rst.txt b/_sources/README.rst.txt new file mode 100644 index 0000000..3d3e112 --- /dev/null +++ b/_sources/README.rst.txt @@ -0,0 +1,173 @@ +.. figure:: logo.svg + :alt: logo + +|Binder| |License| |Python 3.10+| |Docs| |PyPI version| + +``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 in an early development stage, leaving issues of examples +of molecules that ``ugropy`` fails solving the subgroups of a model is +very helpful. + +``ugropy`` is tested for ``Python`` 3.10, 3.11 and 3.12 on Linux, +Windows and Mac OS. + +Try ugropy now +============== + +You can try ugropy from its +`Binder `__. Open +the binder.ipynb file to explore the basic features. + +Models supported v2.0.5 +======================= + +- Classic liquid-vapor UNIFAC +- Predictive Soave-Redlich-Kwong (PSRK) +- Joback + +Writers +======= + +``ugropy`` allows you to convert the obtained functional groups or +estimated properties to the input format required by the following +thermodynamic libraries: + +- `Clapeyron.jl `__ +- `Thermo `__ + +Example of use +============== + +You can check the full tutorial +`here `__. + +Get groups from the molecule’s name: + +.. code:: python + + from ugropy import Groups + + + hexane = Groups("hexane") + + print(hexane.unifac.subgroups) + print(hexane.psrk.subgroups) + print(hexane.joback.subgroups) + +:: + + {'CH3': 2, 'CH2': 4} + {'CH3': 2, 'CH2': 4} + {'-CH3': 2, '-CH2-': 4} + +Get groups from molecule’s SMILES: + +.. code:: python + + propanol = Groups("CCCO", "smiles") + + print(propanol.unifac.subgroups) + print(propanol.psrk.subgroups) + print(propanol.joback.subgroups) + +:: + + {'CH3': 1, 'CH2': 2, 'OH': 1} + {'CH3': 1, 'CH2': 2, 'OH': 1} + {'-CH3': 1, '-CH2-': 2, '-OH (alcohol)': 1} + +Estimate properties with the Joback model! + +.. code:: python + + limonene = Groups("limonene") + + print(limonene.joback.subgroups) + print(f"{limonene.joback.critical_temperature} K") + print(f"{limonene.joback.vapor_pressure(176 + 273.15)} bar") + +:: + + {'-CH3': 2, '=CH2': 1, '=C<': 1, 'ring-CH2-': 3, 'ring>CH-': 1, 'ring=CH-': 1, 'ring=C<': 1} + 657.4486692170663 K + 1.0254019428522743 bar + +Visualize your results! (The next code creates the ``ugropy`` logo) + +.. code:: python + + from IPython.display import SVG + + mol = Groups("CCCC1=C(COC(C)(C)COC(=O)OCC)C=C(CC2=CC=CC=C2)C=C1", "smiles") + + svg = mol.unifac.draw( + title="ugropy", + width=800, + height=450, + title_font_size=50, + legend_font_size=14 + ) + + SVG(svg) + +Write down the +`Clapeyron.jl `__ .csv +input files. + +.. code:: 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.to_clapeyron( + molecules_names=names, + unifac_groups=[g.unifac.subgroups for g in grps], + psrk_groups=[g.psrk.subgroups for g in grps], + joback_objects=[g.joback for g in grps], + path="database" + ) + +Obtain the `Caleb Bell’s Thermo `__ +subgroups + +.. code:: python + + from ugropy import unifac + + names = ["hexane", "2-butanone"] + + grps = [Groups(n) for n in names] + + [writers.to_thermo(g.unifac.subgroups, unifac) for g in grps] + +:: + + [{1: 2, 2: 4}, {1: 1, 2: 1, 18: 1}] + +Installation +============ + +:: + + pip install ugropy + +.. |Binder| image:: https://mybinder.org/badge_logo.svg + :target: https://mybinder.org/v2/gh/ipqa-research/ugropy/main +.. |License| image:: https://img.shields.io/badge/License-MIT-blue.svg + :target: https://tldrlegal.com/license/mit-license +.. |Python 3.10+| image:: https://img.shields.io/badge/Python-3.10%2B-blue +.. |Docs| image:: https://img.shields.io/badge/docs%20-%20green?style=flat&label=Sphinx&link=https%3A%2F%2Fipqa-research.github.io%2Fugropy%2Findex.html + :target: https://salvadorbrandolin.github.io/ugropy/ +.. |PyPI version| image:: https://badge.fury.io/py/ugropy.svg + :target: https://badge.fury.io/py/ugropy diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt new file mode 100644 index 0000000..c12e668 --- /dev/null +++ b/_sources/index.rst.txt @@ -0,0 +1,28 @@ +.. ugropy documentation master file, created by + sphinx-quickstart on Mon Nov 27 19:27:24 2023. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +.. include:: README.rst + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + tutorial/tutorial + modules + +References +========== + +.. bibliography:: + :style: unsrt + :cited: + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/_sources/modules.rst.txt b/_sources/modules.rst.txt new file mode 100644 index 0000000..4f0e4ee --- /dev/null +++ b/_sources/modules.rst.txt @@ -0,0 +1,7 @@ +API +=== + +.. toctree:: + :maxdepth: 1 + + ugropy \ No newline at end of file diff --git a/_sources/tutorial/easy_way.ipynb.txt b/_sources/tutorial/easy_way.ipynb.txt new file mode 100644 index 0000000..64f285b --- /dev/null +++ b/_sources/tutorial/easy_way.ipynb.txt @@ -0,0 +1,473 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### The easy way\n", + "\n", + "#### The Groups class\n", + "`ugropy` is relatively straightforward to use, but let's explore what it has to \n", + "offer. Now, let's start with the easy methods...\n", + "\n", + "We'll utilize the Groups class to retrieve the subgroups of all the models \n", + "supported by `ugropy`." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from ugropy import Groups\n", + "\n", + "carvone = Groups(\"carvone\")\n", + "\n", + "carvone.unifac.subgroups" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Well, that was easy... `ugropy` utilizes `PubChemPy` \n", + "([link](https://github.com/mcs07/PubChemPy)) to access `PubChem` and \n", + "retrieve the SMILES representation of the molecule. `ugropy` then employs the \n", + "SMILES representation along with the `rdkit` \n", + "([link](https://github.com/rdkit/rdkit)) library to identify the \n", + "functional groups of the molecules.\n", + "\n", + "The complete signature of the Groups class is as follows:" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "carvone = Groups(\n", + " identifier=\"carvone\",\n", + " identifier_type=\"name\",\n", + " normal_boiling_temperature=None\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The identifier_type argument (default: \"name\") can be set to \"name\", \"smiles\"\n", + "or \"mol\".\n", + "\n", + "When \"name\" is set, `ugropy` will use the identifier argument to search in\n", + "pubchem for the canonical SMILES of the molecule.\n", + "\n", + "When \"smiles\" is set, `ugropy` uses it directly, this also means that the \n", + "library will not suffer the overhead of searching on pubchem. Try it yourself:" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "carvone = Groups(\n", + " identifier=\"CC1=CCC(CC1=O)C(=C)C\",\n", + " identifier_type=\"smiles\",\n", + " normal_boiling_temperature=None\n", + ")\n", + "\n", + "carvone.unifac.subgroups" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If you are familiar with the `rdkit` library, you'll know that there are\n", + "numerous ways to define a molecule (e.g., SMILES, SMARTS, PDB file, InChIKey,\n", + "etc.). `ugropy` supports the provision of a Mol object from the `rdkit`\n", + "library." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from rdkit import Chem\n", + "\n", + "mol_obj = Chem.MolFromInchi(\"InChI=1S/C10H14O/c1-7(2)9-5-4-8(3)10(11)6-9/h4,9H,1,5-6H2,2-3H3\")\n", + "\n", + "carvone = Groups(\n", + " identifier=mol_obj,\n", + " identifier_type=\"mol\",\n", + " normal_boiling_temperature=None\n", + ")\n", + "\n", + "carvone.unifac.subgroups" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The current supported models are the classic liquid-vapor UNIFAC, Predictive\n", + "Soave-Redlich-Kwong (PSRK) and Joback. You can access the functional groups\n", + "this way:" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}\n", + "{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}\n", + "{'-CH3': 2, '=CH2': 1, '=C<': 1, 'ring-CH2-': 2, 'ring>CH-': 1, 'ring=CH-': 1, 'ring=C<': 1, '>C=O (ring)': 1}\n" + ] + } + ], + "source": [ + "carvone = Groups(\"carvone\")\n", + "\n", + "print(carvone.unifac.subgroups)\n", + "\n", + "print(carvone.psrk.subgroups)\n", + "\n", + "print(carvone.joback.subgroups)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You may notice that the joback attribute is a different object. That's because\n", + "it's a JobackProperties object, which contains all the properties that the\n", + "Joback model can estimate. This will be discussed later in the Joback tutorial.\n", + "As an example:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "516.47" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "carvone.joback.normal_boiling_point" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finally, if the normal_boiling_temperature parameter is provided, it is used in\n", + "the Joback properties calculations instead of the Joback-estimated normal\n", + "boiling temperature (refer to the Joback tutorial)." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The full documentation of the `Groups` class may be accessed in the API\n", + "documentation. Or you can do..." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[0;31mInit signature:\u001b[0m\n", + "\u001b[0mGroups\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0midentifier\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0midentifier_type\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'name'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mnormal_boiling_temperature\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m \n", + "Group class.\n", + "\n", + "Stores the solved FragmentationModels subgroups of a molecule.\n", + "\n", + "Parameters\n", + "----------\n", + "identifier : str or rdkit.Chem.rdchem.Mol\n", + " Identifier of a molecule (name, SMILES or Chem.rdchem.Mol). Example:\n", + " hexane or CCCCCC.\n", + "identifier_type : str, optional\n", + " Use 'name' to search a molecule by name, 'smiles' to provide the\n", + " molecule SMILES representation or 'mol' to provide a\n", + " rdkit.Chem.rdchem.Mol object, by default \"name\".\n", + "normal_boiling_temperature : float, optional\n", + " If provided, will be used to estimate critical temperature, acentric\n", + " factor, and vapor pressure instead of the estimated normal boiling\n", + " point in the Joback group contribution model, by default None.\n", + "\n", + "Attributes\n", + "----------\n", + "identifier : str\n", + " Identifier of a molecule. Example: hexane or CCCCCC.\n", + "identifier_type : str, optional\n", + " Use 'name' to search a molecule by name or 'smiles' to provide the\n", + " molecule SMILES representation, by default \"name\".\n", + "mol_object : rdkit.Chem.rdchem.Mol\n", + " RDKit Mol object.\n", + "molecular_weight : float\n", + " Molecule's molecular weight from rdkit.Chem.Descriptors.MolWt [g/mol].\n", + "unifac : Fragmentation\n", + " Classic LV-UNIFAC subgroups.\n", + "psrk : Fragmentation\n", + " Predictive Soave-Redlich-Kwong subgroups.\n", + "joback : JobackProperties\n", + " JobackProperties object that contains the Joback subgroups and the\n", + " estimated properties of the molecule.\n", + "\u001b[0;31mFile:\u001b[0m ~/code/ugropy/ugropy/groups.py\n", + "\u001b[0;31mType:\u001b[0m type\n", + "\u001b[0;31mSubclasses:\u001b[0m " + ] + } + ], + "source": [ + "Groups?" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Also, you can visualize the fragmentation result simply doing:" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "CH3CH2CHCH2=CCH=CCH2CO" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from IPython.display import SVG\n", + "\n", + "svg = carvone.unifac.draw(width=600)\n", + "\n", + "SVG(svg)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You can save the figure by doing:" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "with open(\"figure.svg\", \"w\") as f:\n", + " f.write(svg)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Check the full documentation of the draw funcion:" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[0;31mSignature:\u001b[0m\n", + "\u001b[0mcarvone\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0munifac\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdraw\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mtitle\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m''\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mwidth\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m400\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mheight\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m200\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mtitle_font_size\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m12\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mlegend_font_size\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m12\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mfont\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'Helvetica'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mUnion\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mList\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m\n", + "Create a svg representation of the fragmentation result.\n", + "\n", + "Parameters\n", + "----------\n", + "title : str, optional\n", + " Graph title, by default \"\"\n", + "width : int, optional\n", + " Graph width, by default 400\n", + "height : int, optional\n", + " Graph height, by default 200\n", + "title_font_size : int, optional\n", + " Font size of graph's title, by default 12\n", + "legend_font_size : int, optional\n", + " Legend font size, by default 12\n", + "font : str, optional\n", + " Text font, by default \"Helvetica\"\n", + "\n", + "Returns\n", + "-------\n", + "Union[str, List[str]]\n", + " SVG of the fragmentation solution/s.\n", + "\u001b[0;31mFile:\u001b[0m ~/code/ugropy/ugropy/core/fragmentation_object.py\n", + "\u001b[0;31mType:\u001b[0m method" + ] + } + ], + "source": [ + "carvone.unifac.draw?" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### WARNING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For the UNIFAC, and PSRK groups the aldehyde group is change to HCO according\n", + "to the discussion: https://github.com/ClapeyronThermo/Clapeyron.jl/issues/225\n", + "\n", + "This is more consistent with the ether groups and formate group." + ] + } + ], + "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 +} diff --git a/_sources/tutorial/hard_way.ipynb.txt b/_sources/tutorial/hard_way.ipynb.txt new file mode 100644 index 0000000..180cd58 --- /dev/null +++ b/_sources/tutorial/hard_way.ipynb.txt @@ -0,0 +1,516 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### The Hard? way\n", + "\n", + "#### The get_groups function\n", + "\n", + "In some situation you may not require to instantiate all the models supported\n", + "by `ugropy`, for that, you can search the model's groups individually." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'CH3': 2, 'CH2': 4}\n", + "{'CH2': 3, 'CH3N': 1, 'C5H4N': 1, 'CH': 1}\n", + "{'-CH3': 2, '=CH2': 1, '=C<': 1, 'ring-CH2-': 3, 'ring>CH-': 1, 'ring=CH-': 1, 'ring=C<': 1}\n" + ] + } + ], + "source": [ + "from ugropy import joback, psrk, unifac, get_groups\n", + "\n", + "hexane = get_groups(unifac, \"hexane\")\n", + "nicotine = get_groups(psrk, \"nicotine\")\n", + "limonene = get_groups(joback, \"limonene\")\n", + "\n", + "print(hexane.subgroups)\n", + "print(nicotine.subgroups)\n", + "print(limonene.subgroups)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Also, you can visualize the fragmentation results as in the \"easy way\" tutorial" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "CH3CH2" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from IPython.display import SVG\n", + "\n", + "SVG(hexane.draw())" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "CH2CH3NC5H4NCH" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "SVG(nicotine.draw())" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "-CH3=CH2=C<ring-CH2-ring>CH-ring=CH-ring=C<" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "SVG(limonene.draw(width=600))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The `get_groups` function have the signature:" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "get_groups(\n", + " model=psrk,\n", + " identifier=\"nicotine\",\n", + " identifier_type=\"name\"\n", + ");" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "As in the `Groups` class you can use \"name\", \"smiles\" or \"mol\" as identifier\n", + "type. This can be useful for whatever you are doing and skip the overhead of\n", + "setting models that you don't want. The `Groups` class is pretended to be used\n", + "when you think: \"I want all of this molecule\". The fragmentation_model \n", + "parameters represents an ugropy fragmentation model." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "from ugropy import FragmentationModel" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Joback\n", + "\n", + "For context, check the Joback's article:\n", + "https://doi.org/10.1080/00986448708960487\n", + "\n", + "The `JobackProperties` object is instantiated by the Group object, as we saw in\n", + "the previous tutorial. However, a `JobackProperties` object can also be\n", + "instantiated individually:" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "34.800000000000004" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from ugropy.properties import JobackProperties\n", + "\n", + "joback_carvone = JobackProperties(\"carvone\")\n", + "\n", + "joback_carvone.g_formation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "As with a `Groups` object, the signature of a `Joback` object is as follows\n", + "similarly, in the `Groups` class, you can use \"name,\" \"smiles,\" or \"mol\" as the\n", + "identifier type with the addition that you can provide the Joback's functional\n", + "groups as a dictionary directly:" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "carvone = JobackProperties(\n", + " identifier=\"carvone\",\n", + " identifier_type=\"name\",\n", + " normal_boiling_point=None\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "31.070992245923176\n", + "31.070992245923176\n" + ] + } + ], + "source": [ + "hex_g = JobackProperties(identifier={\"-CH3\": 2, \"-CH2-\": 4}, identifier_type=\"groups\")\n", + "\n", + "hex_n = JobackProperties(identifier=\"hexane\", identifier_type=\"name\")\n", + "\n", + "print(hex_g.critical_pressure)\n", + "print(hex_n.critical_pressure)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The normal_boiling_temperature parameter, if provided, is used in the Joback\n", + "properties calculations instead of the Joback-estimated normal boiling\n", + "temperature. Let's examine an example from the original Joback's article:" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Estimated normal boiling point: 443.4 K\n", + "Critical temperature: 675.1671746814928 K\n" + ] + } + ], + "source": [ + "mol = JobackProperties(\"p-dichlorobenzene\")\n", + "\n", + "print(f\"Estimated normal boiling point: {mol.normal_boiling_point} K\")\n", + "print(f\"Critical temperature: {mol.critical_temperature} K\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The critical temperature necessitates the estimation of the normal boiling\n", + "point. Joback recommends that if the experimental value of the normal boiling\n", + "point is known, it should be used instead of the estimated value." + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Experimental normal boiling point: 447.3 K\n", + "Estimated normal boiling point: 443.4 K\n", + "Critical temperature: 681.1057222260526 K\n" + ] + } + ], + "source": [ + "mol = JobackProperties(\"p-dichlorobenzene\", normal_boiling_point=447.3)\n", + "\n", + "print(f\"Experimental normal boiling point: {mol.exp_nbt} K\")\n", + "print(f\"Estimated normal boiling point: {mol.normal_boiling_point} K\")\n", + "print(f\"Critical temperature: {mol.critical_temperature} K\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The experimental value of the critical temperature for p-dichlorobenzene is 685\n", + "K. In this example, the error is not significant, but Joback warns that errors\n", + "could be more significant in other cases.\n", + "\n", + "Refer to the full documentation of the Joback object for information on units\n", + "and further explanation." + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[0;31mInit signature:\u001b[0m\n", + "\u001b[0mJobackProperties\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0midentifier\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0midentifier_type\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'name'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mnormal_boiling_point\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m \n", + "Joback [1] group contribution properties estimator.\n", + "\n", + "Parameters\n", + "----------\n", + "identifier : str or rdkit.Chem.rdchem.Mol\n", + " Identifier of a molecule (name, SMILES, groups, or Chem.rdchem.Mol).\n", + " Example: you can use hexane, CCCCCC, {\"-CH3\": 2, \"-CH2-\": 4} for name,\n", + " SMILES and groups respectively.\n", + "identifier_type : str, optional\n", + " Use 'name' to search a molecule by name, 'smiles' to provide the\n", + " molecule SMILES representation, 'groups' to provide Joback groups or\n", + " 'mol' to provide a rdkit.Chem.rdchem.Mol object, by default \"name\".\n", + "normal_boiling_point : float, optional\n", + " If provided, will be used to estimate critical temperature, acentric\n", + " factor, and vapor pressure instead of the estimated normal boiling\n", + " point, by default None.\n", + "\n", + "Attributes\n", + "----------\n", + "subgroups : dict\n", + " Joback functional groups of the molecule.\n", + "exp_nbt : float\n", + " User provided experimental normal boiling point [K].\n", + "critical_temperature : float\n", + " Joback estimated critical temperature [K].\n", + "critical_pressure : float\n", + " Joback estimated critical pressure [bar].\n", + "critical_volume : float\n", + " Joback estimated critical volume [cm³/mol].\n", + "normal_boiling_point : float\n", + " Joback estimated normal boiling point [K].\n", + "fusion_temperature : float\n", + " Joback estimated fusion temperature [K].\n", + "h_formation : float\n", + " Joback estimated enthalpy of formation ideal gas at 298 K [kJ/mol].\n", + "g_formation : float\n", + " Joback estimated Gibbs energy of formation ideal gas at 298 K [K].\n", + "heat_capacity_ideal_gas_params : dict\n", + " Joback estimated Reid's ideal gas heat capacity equation parameters\n", + " [J/mol/K].\n", + "h_fusion : float\n", + " Joback estimated fusion enthalpy [kJ/mol].\n", + "h_vaporization : float\n", + " Joback estimated vaporization enthalpy at the normal boiling point\n", + " [kJ/mol].\n", + "sum_na : float\n", + " Joback n_A contribution to liquid viscosity [N/s/m²].\n", + "sum_nb : float\n", + " Joback n_B contribution to liquid viscosity [N/s/m²].\n", + "molecular_weight : float\n", + " Molecular weight from Joback's subgroups [g/mol].\n", + "acentric_factor : float\n", + " Acentric factor from Lee and Kesler's equation [2].\n", + "vapor_pressure_params : dict\n", + " Vapor pressure G and k parameters for the Riedel-Plank-Miller [2]\n", + " equation [bar].\n", + "\u001b[0;31mFile:\u001b[0m ~/code/ugropy/ugropy/properties/joback_properties.py\n", + "\u001b[0;31mType:\u001b[0m type\n", + "\u001b[0;31mSubclasses:\u001b[0m " + ] + } + ], + "source": [ + "JobackProperties?" + ] + } + ], + "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 +} diff --git a/_sources/tutorial/installation.ipynb.txt b/_sources/tutorial/installation.ipynb.txt new file mode 100644 index 0000000..ebcb173 --- /dev/null +++ b/_sources/tutorial/installation.ipynb.txt @@ -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 +} diff --git a/_sources/tutorial/tutorial.rst.txt b/_sources/tutorial/tutorial.rst.txt new file mode 100644 index 0000000..df9b538 --- /dev/null +++ b/_sources/tutorial/tutorial.rst.txt @@ -0,0 +1,11 @@ +Tutorial +======== + +.. toctree:: + :maxdepth: 1 + + installation.ipynb + easy_way.ipynb + hard_way.ipynb + ugropy_failing.ipynb + writers.ipynb \ No newline at end of file diff --git a/_sources/tutorial/ugropy_failing.ipynb.txt b/_sources/tutorial/ugropy_failing.ipynb.txt new file mode 100644 index 0000000..e6cc3ce --- /dev/null +++ b/_sources/tutorial/ugropy_failing.ipynb.txt @@ -0,0 +1,555 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Failing\n", + "\n", + "`ugropy` may fail to obtain the subgroups of a molecule for a certain model for\n", + "two reasons: either there is a bug in the code, or the molecule cannot be\n", + "represented by the subgroups of the failing model.\n", + "\n", + "`ugropy` utilizes SMARTS for the representation of functional groups to inquire\n", + "whether the molecule contains those structures. Let's examine the functional\n", + "group list for the classic liquid-vapor UNIFAC model." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
detection_smartssmartscontributecomposedmolecular_weight
group
CH3[CX4H3]NaN{\"CH3\": 1}n15.03500
CH2[CX4H2]NaN{\"CH2\": 1}n14.02700
CH[CX4H]NaN{\"CH\": 1}n13.01900
C[CX4H0]NaN{\"C\": 1}n12.01100
CH2=CH[CH2]=[CH]NaN{\"CH2=CH\": 1}n27.04600
..................
NCO[NX2H0]=[CX2H0]=[OX1H0]NaN{\"NCO\": 1}n42.01700
(CH2)2SU[CH2]S(=O)(=O)[CH2]NaN{\"(CH2)2SU\": 1, \"CH2\": -1, \"CH2S\": -1}n92.11620
CH2CHSU[CH2]S(=O)(=O)[CH]NaN{\"CH2CHSU\": 1, \"CH\": -1, \"CH2S\": -1}n91.10840
IMIDAZOL[c]1:[c]:[n]:[c]:[n]:1NaN{\"IMIDAZOL\": 1, \"ACH\": -3}n68.07820
BTIC(F)(F)(F)S(=O)(=O)[N-]S(=O)(=O)C(F)(F)FNaN{\"BTI\": 1, \"CF3\": -2}n279.91784
\n", + "

113 rows × 5 columns

\n", + "
" + ], + "text/plain": [ + " detection_smarts smarts \\\n", + "group \n", + "CH3 [CX4H3] NaN \n", + "CH2 [CX4H2] NaN \n", + "CH [CX4H] NaN \n", + "C [CX4H0] NaN \n", + "CH2=CH [CH2]=[CH] NaN \n", + "... ... ... \n", + "NCO [NX2H0]=[CX2H0]=[OX1H0] NaN \n", + "(CH2)2SU [CH2]S(=O)(=O)[CH2] NaN \n", + "CH2CHSU [CH2]S(=O)(=O)[CH] NaN \n", + "IMIDAZOL [c]1:[c]:[n]:[c]:[n]:1 NaN \n", + "BTI C(F)(F)(F)S(=O)(=O)[N-]S(=O)(=O)C(F)(F)F NaN \n", + "\n", + " contribute composed molecular_weight \n", + "group \n", + "CH3 {\"CH3\": 1} n 15.03500 \n", + "CH2 {\"CH2\": 1} n 14.02700 \n", + "CH {\"CH\": 1} n 13.01900 \n", + "C {\"C\": 1} n 12.01100 \n", + "CH2=CH {\"CH2=CH\": 1} n 27.04600 \n", + "... ... ... ... \n", + "NCO {\"NCO\": 1} n 42.01700 \n", + "(CH2)2SU {\"(CH2)2SU\": 1, \"CH2\": -1, \"CH2S\": -1} n 92.11620 \n", + "CH2CHSU {\"CH2CHSU\": 1, \"CH\": -1, \"CH2S\": -1} n 91.10840 \n", + "IMIDAZOL {\"IMIDAZOL\": 1, \"ACH\": -3} n 68.07820 \n", + "BTI {\"BTI\": 1, \"CF3\": -2} n 279.91784 \n", + "\n", + "[113 rows x 5 columns]" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from ugropy import unifac\n", + "\n", + "unifac.subgroups" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For example, let's check the SMARTS representation of the alcohol group ACOH:" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'[cH0][OH]'" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "unifac.subgroups.loc[\"ACOH\", \"detection_smarts\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The SMARTS representation it's telling us that the OH group it's, of course, a\n", + "hydroxyl group bounded by a single bound to an aromatic carbon atom.\n", + "\n", + "An example of a molecule that cannot be represented by UNIFAC groups:" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAEsASwDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACikZgqlmICgZJJ4Fcbq/xS8K6Vc/Y4r59UvzwtnpkZuJGPp8vyg+xIoA7OivO/7X+I/iTjS9Es/Ddm3S51R/NnI9REvCn2aql78Hf7ZQ3Wt+L9bvdXUZgug6xx279QyRjpz2B/I80Aen0V574e8X6joerQ+FPG+yK/b5bHVBxDfqOBz/AAydMjufqM+hUAFFFFABRRRQAUUUUAFFFVdTvf7N0u6vfs89z5ETSeTbpukkwM7VHcmgC1RWT4d8SaX4q0iPUtJuBNA3DKeHjburjsw9P6VrUAFFFFABRRRQAUUUUAFFFUdY1ex0HSbnVNSnWC0t03yO38h6kngDuTQBJe6lY6cbcXt3Db/aJRDD5rhfMkPRRnqTjpVqvOPCuj33jDXIvG/iSBookB/sXTZOltGf+Wrj/no3B9uPbHo9ABRRRQAUUUUAFFFFABRRRQAUV57rPjPxNe+L77wx4P0a0nm08RfbL++mxFCZF3KNq/MePTPQjHemn4c6rr3zeMvFt/qEZ62Nj/otv9CF5ce5waANnXPiT4U0GY21xqsdxe52i0swZ5S3ptXOD9cVjf8ACS+PvEYx4f8AC8WjWrdLzXXIfHtCvzA/XIrrND8K6D4bi8vR9JtLPjBeOMb2Hux+Y/ia2KAPPF+GEusMJfGXiXUtcJOTaI/2a1/79p1+uRXZaRoGkaBbfZ9J021sou4gjClvqep/GtGigArlfGPiPV/C/wBk1KDSRf6LHu/tEwkmeFeMOq9Co5z/AExmu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cg/wC7kVq6P8MfCWjym4GlpfXjcvdagTcSMfXL5AP0Arr6KAADAwOlFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAcT4u+HUXiDVINa0nVJ9C1yIFGvrVMmVCMbXXIz7HP58Yi034TeHoJo7vWmu/EOoKObnVZ2m/JCduPY5ru6KAI4IIbaFIYIkiiQYVI1Cqo9gKkoooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA/9k=", + "image/png": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAIAAAD2HxkiAAAiC0lEQVR4nO3de1hU1d4H8N8MF7mIiFCKd0Uz8VaSKaJpiseUidIYswz1iGFZjk89nePjqbcpz9PdOlPaW6QeRVMT1Gq8oK+aIYr3RAVvKHgBb1wUkDsz6/1jcSYP4DDM7NlrBr6f5/xxHmbc+3fm8B32Xuu31lYwxggAxFGKLgCgpUMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCA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QDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEOz/ARW0WWMzok8iAAAAAElFTkSuQmCC", + "text/plain": [ + "" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from ugropy import get_groups\n", + "from rdkit.Chem import Draw\n", + "\n", + "mol = get_groups(unifac, \"C1(=CC=CC=C1)OC(C)(C)C\", \"smiles\")\n", + "\n", + "Draw.MolToImage(mol.mol_object)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{}\n" + ] + } + ], + "source": [ + "print(mol.subgroups)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The library \"fails\" to obtain any functional groups to accurately represent the\n", + "molecule. This failure is represented by an empty dictionary. In this case, the\n", + "\"fail\" is correct, but it could fail due to errors in the groups SMARTS\n", + "representations or the algorithm, resulting in an empty dictionary as well.\n", + "Currently, the supported models are tested against the following numbers of\n", + "molecules:\n", + "\n", + "- Classic liquid-vapor UNIFAC: 408\n", + "- Predictive Soave-Redlich-Kwong (PSRK): 442\n", + "- Joback: 285\n", + "\n", + "If you encounter a failing representation, you can examine the structure of the\n", + "molecule and the list of functional groups of the failing model. If you\n", + "determine that the molecule can indeed be modeled, you may have discovered a\n", + "bug. Feel free to report the issue on the repository along with the failing\n", + "molecule's SMILES/name, the failing model and the `ugropy` version.\n", + "\n", + "#### More than one solution\n", + "Models like UNIFAC or PSRK can have multiple solutions to represent a molecule,\n", + "and ugropy tries its best to find them all. In such cases, you will receive a\n", + "list of dictionaries, each containing one of the solutions found. Let's take a\n", + "look." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAEsASwDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAoorG8W60fDvhHVtXTYZLS1eSMOMqXx8oPsWxQBs1y+u/ETwp4dYxX+s25uAcfZoD50pPptTJH44rldL8Fah4nsbGbxp4w1G7nu7ZZzpVtItrGFIBKsqYL4zjPFdtofg7w74aQDR9HtLRgMeYseZD9XOWP4mgDmP+E18Xa9lfC/gyeCE/dvdcf7On18sfMw+hqveeCdf1WxnuPG3ji4jsUjZ5rXS1FrCiAZO5zyy/UV6XSMquhR1DKwwQRkEUAeSaXqFx8NILe4ivJdb8AXZDQ3gbzZdPLf3sfejJ9Oh9+G9XtrmC9tYrq1mjmglUPHJGwZWU9CCOorzPVNCvvh1cXOqaBZtqPhW5JbU9Dxu8gH70kIPbHVOmPb7tDTrw+CrRPEfhSV9X8B3ZMlxZRktLp5P3njB52g/eQ9P1oA9goqppeqWOtabBqOnXMdzaTrujljOQR/Q+oPIq3QAUUUUANkkSGMySOqIvVmOAKq2+q2F1L5cN1E79lB5P09a88+IPjvQ9PvYrGXVYXKLuMFu3mvvJIwQucHjv61y2h+MLLV9QezWG7sbx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ooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigArL8QeH9M8T6PNperWyz20o+jI3ZlPZh61qUUAeZ2Xw/8ZPCdO1P4hX39kw/JCLOFY7h07b5cbgccd63tH+GPhLRp/tMekpd3h5a6vmNxIx9cvkA/QCuuooAQAAAAAAdAKWiigAooooAKKKKACiiigBrtsjZsE4BOB3riUgubrwU3iJtUvBqDWjXgxO3kr8pby/K+6Vx8pyM+9dxWC3hOxZWg8+8Fgzl2sRN+5JJyRjGduf4c49qyqRctjuwdaFO/M7ap7Xule6+enk+pr2MglsLaRYxGHiVggGAuQOKno6DAorVHFJ3bYUUUUCCiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD//Z", + "image/png": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAIAAAD2HxkiAAAbYklEQVR4nO3deXjNZ9oH8Ptkl4UkllheSSRaxDaqJYSqSUpVFkkdM9KG0RKlEjVTjNFWTS9KhwpDizaIvbIgiUjEMq4oMrTWSG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YIIQAzhBCAGUIIwAwhBGCGEAIwQwgBmCGEAMwQQgBmCCEAM4QQgBlCCMAMIQRghhACMEMIAZghhADMEEIAZgghADOEEIAZQgjADCEEYIYQAjBDCAGYIYQAzBBCAGYIIQAzhBCAGUIIwAwhBGCGEAIwQwgBmCGEAMwQQgBmCCEAM4QQgBlCCMAMIQRghhACMEMIAZghhADMEEIAZgghADOEEIAZQgjADCEEYIYQAjBDCAGYIYQAzBBCAGYIIQAzhBCAGUIIwAwhBGCGEAIwQwgBmCGEAMwQQgBmCCEAM4QQgBlCCMAMIQRghhACMEMIAZghhADMEEIAZgghADOEEIAZQgjADCEEYIYQAjBDCAGYIYQAzBBCAGYIIQAzhBCAGUIIwAwhBGCGEAIwQwgBmCGEAMwQQgBmCCEAM4QQgBlCCMAMIQRghhACMEMIAZghhADMEEIAZgghADOEEIAZQgjADCEEYPb/IrzX6qjISt0AAAAASUVORK5CYII=", + "text/plain": [ + "" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from ugropy import Groups\n", + "from rdkit.Chem import Draw\n", + "\n", + "\n", + "mol = Groups(\"CCCC1=CC=C(CC(=O)OC)C=C1\", \"smiles\")\n", + "\n", + "Draw.MolToImage(mol.mol_object, highlightAtoms=[7])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This molecule can be modeled in two ways depending on how we treat the CH2\n", + "attached to the ring and the ester carbon (highlighted in red). We can either\n", + "form an ACCH2 group and model the ester group with COO, or we can use an AC\n", + "group and model the ester group with CH2COO." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "UNIFAC:\n", + "[{'CH3': 2, 'ACH': 4, 'ACCH2': 1, 'CH2COO': 1, 'CH2': 1, 'AC': 1}\n", + " {'CH3': 2, 'ACH': 4, 'ACCH2': 2, 'CH2': 1, 'COO': 1}]\n", + "PSRK:\n", + "[{'CH3': 2, 'ACH': 4, 'ACCH2': 1, 'CH2COO': 1, 'CH2': 1, 'AC': 1}\n", + " {'CH3': 2, 'ACH': 4, 'ACCH2': 2, 'CH2': 1, 'COO': 1}]\n" + ] + } + ], + "source": [ + "print(\"UNIFAC:\")\n", + "print(mol.unifac.subgroups)\n", + "print(\"PSRK:\")\n", + "print(mol.psrk.subgroups)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "svg1, svg2 = mol.unifac.draw(width=800)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "CH3ACHACCH2CH2COOCH2AC" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from IPython.display import SVG\n", + "\n", + "SVG(svg1)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "CH3ACHACCH2CH2COO" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "SVG(svg2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This could be useful in cases where some groups have more interaction\n", + "parameters than others in the mixture that you want to model with UNIFAC.\n", + "Alternatively, you can try both approaches and compare if there are any\n", + "differences." + ] + } + ], + "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 +} diff --git a/_sources/tutorial/writers.ipynb.txt b/_sources/tutorial/writers.ipynb.txt new file mode 100644 index 0000000..c6bbfbb --- /dev/null +++ b/_sources/tutorial/writers.ipynb.txt @@ -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": 2, + "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": 3, + "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": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1.4276025835624184, 1.3646545010104223]" + ] + }, + "execution_count": 4, + "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 +} diff --git a/_sources/ugropy.rst.txt b/_sources/ugropy.rst.txt new file mode 100644 index 0000000..393584f --- /dev/null +++ b/_sources/ugropy.rst.txt @@ -0,0 +1,77 @@ +Available Models +================ +.. automodule:: ugropy.fragmentation_models.models + :members: + :undoc-members: + :show-inheritance: + + +Core +==== +.. automodule:: ugropy.core + :members: + :undoc-members: + :show-inheritance: + + +Constants +========= +.. automodule:: ugropy.constants + :members: + :undoc-members: + :show-inheritance: + + +Groups +====== +.. automodule:: ugropy.groups + :members: + :undoc-members: + :show-inheritance: + + +Properties +========== +.. automodule:: ugropy.properties + :members: + :undoc-members: + :show-inheritance: + + +Fragmentation Models +==================== +.. automodule:: ugropy.fragmentation_models.fragmentation_model + :members: + :undoc-members: + :show-inheritance: + + +Gibbs Models +============ +.. automodule:: ugropy.fragmentation_models.gibbs_model + :members: + :undoc-members: + :show-inheritance: + + +Properties Estimators +===================== +.. automodule:: ugropy.fragmentation_models.prop_estimator + :members: + :undoc-members: + :show-inheritance: + + +Writers +======= +.. automodule:: ugropy.writers + :members: + :undoc-members: + :show-inheritance: + +Clapeyron writers +================= +.. automodule:: ugropy.writers.clapeyron_writers + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/_static/basic.css b/_static/basic.css new file mode 100644 index 0000000..f316efc --- /dev/null +++ b/_static/basic.css @@ -0,0 +1,925 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +a:visited { + color: #551A8B; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/_static/check-solid.svg b/_static/check-solid.svg new file mode 100644 index 0000000..92fad4b --- /dev/null +++ b/_static/check-solid.svg @@ -0,0 +1,4 @@ + + + + diff --git a/_static/clipboard.min.js b/_static/clipboard.min.js new file mode 100644 index 0000000..54b3c46 --- /dev/null +++ b/_static/clipboard.min.js @@ -0,0 +1,7 @@ +/*! + * clipboard.js v2.0.8 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var e,n,o,r=1 + + + + diff --git a/_static/copybutton.css b/_static/copybutton.css new file mode 100644 index 0000000..f1916ec --- /dev/null +++ b/_static/copybutton.css @@ -0,0 +1,94 @@ +/* Copy buttons */ +button.copybtn { + position: absolute; + display: flex; + top: .3em; + right: .3em; + width: 1.7em; + height: 1.7em; + opacity: 0; + transition: opacity 0.3s, border .3s, background-color .3s; + user-select: none; + padding: 0; + border: none; + outline: none; + border-radius: 0.4em; + /* The colors that GitHub uses */ + border: #1b1f2426 1px solid; + background-color: #f6f8fa; + color: #57606a; +} + +button.copybtn.success { + border-color: #22863a; + color: #22863a; +} + +button.copybtn svg { + stroke: currentColor; + width: 1.5em; + height: 1.5em; + padding: 0.1em; +} + +div.highlight { + position: relative; +} + +/* Show the copybutton */ +.highlight:hover button.copybtn, button.copybtn.success { + opacity: 1; +} + +.highlight button.copybtn:hover { + background-color: rgb(235, 235, 235); +} + +.highlight button.copybtn:active { + background-color: rgb(187, 187, 187); +} + +/** + * A minimal CSS-only tooltip copied from: + * https://codepen.io/mildrenben/pen/rVBrpK + * + * To use, write HTML like the following: + * + *

Short

+ */ + .o-tooltip--left { + position: relative; + } + + .o-tooltip--left:after { + opacity: 0; + visibility: hidden; + position: absolute; + content: attr(data-tooltip); + padding: .2em; + font-size: .8em; + left: -.2em; + background: grey; + color: white; + white-space: nowrap; + z-index: 2; + border-radius: 2px; + transform: translateX(-102%) translateY(0); + transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); +} + +.o-tooltip--left:hover:after { + display: block; + opacity: 1; + visibility: visible; + transform: translateX(-100%) translateY(0); + transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); + transition-delay: .5s; +} + +/* By default the copy button shouldn't show up when printing a page */ +@media print { + button.copybtn { + display: none; + } +} diff --git a/_static/copybutton.js b/_static/copybutton.js new file mode 100644 index 0000000..2ea7ff3 --- /dev/null +++ b/_static/copybutton.js @@ -0,0 +1,248 @@ +// Localization support +const messages = { + 'en': { + 'copy': 'Copy', + 'copy_to_clipboard': 'Copy to clipboard', + 'copy_success': 'Copied!', + 'copy_failure': 'Failed to copy', + }, + 'es' : { + 'copy': 'Copiar', + 'copy_to_clipboard': 'Copiar al portapapeles', + 'copy_success': '¡Copiado!', + 'copy_failure': 'Error al copiar', + }, + 'de' : { + 'copy': 'Kopieren', + 'copy_to_clipboard': 'In die Zwischenablage kopieren', + 'copy_success': 'Kopiert!', + 'copy_failure': 'Fehler beim Kopieren', + }, + 'fr' : { + 'copy': 'Copier', + 'copy_to_clipboard': 'Copier dans le presse-papier', + 'copy_success': 'Copié !', + 'copy_failure': 'Échec de la copie', + }, + 'ru': { + 'copy': 'Скопировать', + 'copy_to_clipboard': 'Скопировать в буфер', + 'copy_success': 'Скопировано!', + 'copy_failure': 'Не удалось скопировать', + }, + 'zh-CN': { + 'copy': '复制', + 'copy_to_clipboard': '复制到剪贴板', + 'copy_success': '复制成功!', + 'copy_failure': '复制失败', + }, + 'it' : { + 'copy': 'Copiare', + 'copy_to_clipboard': 'Copiato negli appunti', + 'copy_success': 'Copiato!', + 'copy_failure': 'Errore durante la copia', + } +} + +let locale = 'en' +if( document.documentElement.lang !== undefined + && messages[document.documentElement.lang] !== undefined ) { + locale = document.documentElement.lang +} + +let doc_url_root = DOCUMENTATION_OPTIONS.URL_ROOT; +if (doc_url_root == '#') { + doc_url_root = ''; +} + +/** + * SVG files for our copy buttons + */ +let iconCheck = ` + ${messages[locale]['copy_success']} + + +` + +// If the user specified their own SVG use that, otherwise use the default +let iconCopy = ``; +if (!iconCopy) { + iconCopy = ` + ${messages[locale]['copy_to_clipboard']} + + + +` +} + +/** + * Set up copy/paste for code blocks + */ + +const runWhenDOMLoaded = cb => { + if (document.readyState != 'loading') { + cb() + } else if (document.addEventListener) { + document.addEventListener('DOMContentLoaded', cb) + } else { + document.attachEvent('onreadystatechange', function() { + if (document.readyState == 'complete') cb() + }) + } +} + +const codeCellId = index => `codecell${index}` + +// Clears selected text since ClipboardJS will select the text when copying +const clearSelection = () => { + if (window.getSelection) { + window.getSelection().removeAllRanges() + } else if (document.selection) { + document.selection.empty() + } +} + +// Changes tooltip text for a moment, then changes it back +// We want the timeout of our `success` class to be a bit shorter than the +// tooltip and icon change, so that we can hide the icon before changing back. +var timeoutIcon = 2000; +var timeoutSuccessClass = 1500; + +const temporarilyChangeTooltip = (el, oldText, newText) => { + el.setAttribute('data-tooltip', newText) + el.classList.add('success') + // Remove success a little bit sooner than we change the tooltip + // So that we can use CSS to hide the copybutton first + setTimeout(() => el.classList.remove('success'), timeoutSuccessClass) + setTimeout(() => el.setAttribute('data-tooltip', oldText), timeoutIcon) +} + +// Changes the copy button icon for two seconds, then changes it back +const temporarilyChangeIcon = (el) => { + el.innerHTML = iconCheck; + setTimeout(() => {el.innerHTML = iconCopy}, timeoutIcon) +} + +const addCopyButtonToCodeCells = () => { + // If ClipboardJS hasn't loaded, wait a bit and try again. This + // happens because we load ClipboardJS asynchronously. + if (window.ClipboardJS === undefined) { + setTimeout(addCopyButtonToCodeCells, 250) + return + } + + // Add copybuttons to all of our code cells + const COPYBUTTON_SELECTOR = 'div.highlight pre'; + const codeCells = document.querySelectorAll(COPYBUTTON_SELECTOR) + codeCells.forEach((codeCell, index) => { + const id = codeCellId(index) + codeCell.setAttribute('id', id) + + const clipboardButton = id => + `` + codeCell.insertAdjacentHTML('afterend', clipboardButton(id)) + }) + +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string +} + +/** + * Removes excluded text from a Node. + * + * @param {Node} target Node to filter. + * @param {string} exclude CSS selector of nodes to exclude. + * @returns {DOMString} Text from `target` with text removed. + */ +function filterText(target, exclude) { + const clone = target.cloneNode(true); // clone as to not modify the live DOM + if (exclude) { + // remove excluded nodes + clone.querySelectorAll(exclude).forEach(node => node.remove()); + } + return clone.innerText; +} + +// Callback when a copy button is clicked. Will be passed the node that was clicked +// should then grab the text and replace pieces of text that shouldn't be used in output +function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { + var regexp; + var match; + + // Do we check for line continuation characters and "HERE-documents"? + var useLineCont = !!lineContinuationChar + var useHereDoc = !!hereDocDelim + + // create regexp to capture prompt and remaining line + if (isRegexp) { + regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)') + } else { + regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)') + } + + const outputLines = []; + var promptFound = false; + var gotLineCont = false; + var gotHereDoc = false; + const lineGotPrompt = []; + for (const line of textContent.split('\n')) { + match = line.match(regexp) + if (match || gotLineCont || gotHereDoc) { + promptFound = regexp.test(line) + lineGotPrompt.push(promptFound) + if (removePrompts && promptFound) { + outputLines.push(match[2]) + } else { + outputLines.push(line) + } + gotLineCont = line.endsWith(lineContinuationChar) & useLineCont + if (line.includes(hereDocDelim) & useHereDoc) + gotHereDoc = !gotHereDoc + } else if (!onlyCopyPromptLines) { + outputLines.push(line) + } else if (copyEmptyLines && line.trim() === '') { + outputLines.push(line) + } + } + + // If no lines with the prompt were found then just use original lines + if (lineGotPrompt.some(v => v === true)) { + textContent = outputLines.join('\n'); + } + + // Remove a trailing newline to avoid auto-running when pasting + if (textContent.endsWith("\n")) { + textContent = textContent.slice(0, -1) + } + return textContent +} + + +var copyTargetText = (trigger) => { + var target = document.querySelector(trigger.attributes['data-clipboard-target'].value); + + // get filtered text + let exclude = '.linenos'; + + let text = filterText(target, exclude); + return formatCopyText(text, '', false, true, true, true, '', '') +} + + // Initialize with a callback so we can modify the text before copy + const clipboard = new ClipboardJS('.copybtn', {text: copyTargetText}) + + // Update UI with error/success messages + clipboard.on('success', event => { + clearSelection() + temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_success']) + temporarilyChangeIcon(event.trigger) + }) + + clipboard.on('error', event => { + temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_failure']) + }) +} + +runWhenDOMLoaded(addCopyButtonToCodeCells) \ No newline at end of file diff --git a/_static/copybutton_funcs.js b/_static/copybutton_funcs.js new file mode 100644 index 0000000..dbe1aaa --- /dev/null +++ b/_static/copybutton_funcs.js @@ -0,0 +1,73 @@ +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string +} + +/** + * Removes excluded text from a Node. + * + * @param {Node} target Node to filter. + * @param {string} exclude CSS selector of nodes to exclude. + * @returns {DOMString} Text from `target` with text removed. + */ +export function filterText(target, exclude) { + const clone = target.cloneNode(true); // clone as to not modify the live DOM + if (exclude) { + // remove excluded nodes + clone.querySelectorAll(exclude).forEach(node => node.remove()); + } + return clone.innerText; +} + +// Callback when a copy button is clicked. Will be passed the node that was clicked +// should then grab the text and replace pieces of text that shouldn't be used in output +export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { + var regexp; + var match; + + // Do we check for line continuation characters and "HERE-documents"? + var useLineCont = !!lineContinuationChar + var useHereDoc = !!hereDocDelim + + // create regexp to capture prompt and remaining line + if (isRegexp) { + regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)') + } else { + regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)') + } + + const outputLines = []; + var promptFound = false; + var gotLineCont = false; + var gotHereDoc = false; + const lineGotPrompt = []; + for (const line of textContent.split('\n')) { + match = line.match(regexp) + if (match || gotLineCont || gotHereDoc) { + promptFound = regexp.test(line) + lineGotPrompt.push(promptFound) + if (removePrompts && promptFound) { + outputLines.push(match[2]) + } else { + outputLines.push(line) + } + gotLineCont = line.endsWith(lineContinuationChar) & useLineCont + if (line.includes(hereDocDelim) & useHereDoc) + gotHereDoc = !gotHereDoc + } else if (!onlyCopyPromptLines) { + outputLines.push(line) + } else if (copyEmptyLines && line.trim() === '') { + outputLines.push(line) + } + } + + // If no lines with the prompt were found then just use original lines + if (lineGotPrompt.some(v => v === true)) { + textContent = outputLines.join('\n'); + } + + // Remove a trailing newline to avoid auto-running when pasting + if (textContent.endsWith("\n")) { + textContent = textContent.slice(0, -1) + } + return textContent +} diff --git a/_static/css/badge_only.css b/_static/css/badge_only.css new file mode 100644 index 0000000..c718cee --- /dev/null +++ b/_static/css/badge_only.css @@ -0,0 +1 @@ +.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} \ No newline at end of file diff --git a/_static/css/fonts/Roboto-Slab-Bold.woff b/_static/css/fonts/Roboto-Slab-Bold.woff new file mode 100644 index 0000000..6cb6000 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Bold.woff differ diff --git a/_static/css/fonts/Roboto-Slab-Bold.woff2 b/_static/css/fonts/Roboto-Slab-Bold.woff2 new file mode 100644 index 0000000..7059e23 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Bold.woff2 differ diff --git a/_static/css/fonts/Roboto-Slab-Regular.woff b/_static/css/fonts/Roboto-Slab-Regular.woff new file mode 100644 index 0000000..f815f63 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Regular.woff differ diff --git a/_static/css/fonts/Roboto-Slab-Regular.woff2 b/_static/css/fonts/Roboto-Slab-Regular.woff2 new file mode 100644 index 0000000..f2c76e5 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Regular.woff2 differ diff --git a/_static/css/fonts/fontawesome-webfont.eot b/_static/css/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..e9f60ca Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.eot differ diff --git a/_static/css/fonts/fontawesome-webfont.svg b/_static/css/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..855c845 --- /dev/null +++ b/_static/css/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_static/css/fonts/fontawesome-webfont.ttf b/_static/css/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..35acda2 Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.ttf differ diff --git a/_static/css/fonts/fontawesome-webfont.woff b/_static/css/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..400014a Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.woff differ diff --git a/_static/css/fonts/fontawesome-webfont.woff2 b/_static/css/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..4d13fc6 Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.woff2 differ diff --git a/_static/css/fonts/lato-bold-italic.woff b/_static/css/fonts/lato-bold-italic.woff new file mode 100644 index 0000000..88ad05b Binary files /dev/null and b/_static/css/fonts/lato-bold-italic.woff differ diff --git a/_static/css/fonts/lato-bold-italic.woff2 b/_static/css/fonts/lato-bold-italic.woff2 new file mode 100644 index 0000000..c4e3d80 Binary files /dev/null and b/_static/css/fonts/lato-bold-italic.woff2 differ diff --git a/_static/css/fonts/lato-bold.woff b/_static/css/fonts/lato-bold.woff new file mode 100644 index 0000000..c6dff51 Binary files /dev/null and b/_static/css/fonts/lato-bold.woff differ diff --git a/_static/css/fonts/lato-bold.woff2 b/_static/css/fonts/lato-bold.woff2 new file mode 100644 index 0000000..bb19504 Binary files /dev/null and b/_static/css/fonts/lato-bold.woff2 differ diff --git a/_static/css/fonts/lato-normal-italic.woff b/_static/css/fonts/lato-normal-italic.woff new file mode 100644 index 0000000..76114bc Binary files /dev/null and b/_static/css/fonts/lato-normal-italic.woff differ diff --git a/_static/css/fonts/lato-normal-italic.woff2 b/_static/css/fonts/lato-normal-italic.woff2 new file mode 100644 index 0000000..3404f37 Binary files /dev/null and b/_static/css/fonts/lato-normal-italic.woff2 differ diff --git a/_static/css/fonts/lato-normal.woff b/_static/css/fonts/lato-normal.woff new file mode 100644 index 0000000..ae1307f Binary files /dev/null and b/_static/css/fonts/lato-normal.woff differ diff --git a/_static/css/fonts/lato-normal.woff2 b/_static/css/fonts/lato-normal.woff2 new file mode 100644 index 0000000..3bf9843 Binary files /dev/null and b/_static/css/fonts/lato-normal.woff2 differ diff --git a/_static/css/theme.css b/_static/css/theme.css new file mode 100644 index 0000000..19a446a --- /dev/null +++ b/_static/css/theme.css @@ -0,0 +1,4 @@ +html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .eqno .headerlink:before,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .eqno .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a button.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-left.toctree-expand,.wy-menu-vertical li button.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .eqno .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a button.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-right.toctree-expand,.wy-menu-vertical li button.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .eqno .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a button.pull-left.toctree-expand,.wy-menu-vertical li.on a button.pull-left.toctree-expand,.wy-menu-vertical li button.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .eqno .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.download span.pull-right:first-child,.wy-menu-vertical li.current>a button.pull-right.toctree-expand,.wy-menu-vertical li.on a button.pull-right.toctree-expand,.wy-menu-vertical li button.pull-right.toctree-expand{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before,.icon-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before,.icon-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before,.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before,.icon-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:""}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before,.rst-content .admonition-title:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before,.icon-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before,.icon-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:""}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before,.icon-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before,.icon-caret-down:before,.wy-dropdown .caret:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before,.icon-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before,.wy-menu-vertical li button.toctree-expand:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before,.icon-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{font-family:inherit}.fa:before,.icon:before,.rst-content .admonition-title:before,.rst-content .code-block-caption .headerlink:before,.rst-content .eqno .headerlink:before,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before{font-family:FontAwesome;display:inline-block;font-style:normal;font-weight:400;line-height:1;text-decoration:inherit}.rst-content .code-block-caption a .headerlink,.rst-content .eqno a .headerlink,.rst-content a .admonition-title,.rst-content code.download a span:first-child,.rst-content dl dt a .headerlink,.rst-content h1 a .headerlink,.rst-content h2 a .headerlink,.rst-content h3 a .headerlink,.rst-content h4 a .headerlink,.rst-content h5 a .headerlink,.rst-content h6 a .headerlink,.rst-content p.caption a .headerlink,.rst-content p a .headerlink,.rst-content table>caption a .headerlink,.rst-content tt.download a span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li a button.toctree-expand,a .fa,a .icon,a .rst-content .admonition-title,a .rst-content .code-block-caption .headerlink,a .rst-content .eqno .headerlink,a .rst-content code.download span:first-child,a .rst-content dl dt .headerlink,a .rst-content h1 .headerlink,a .rst-content h2 .headerlink,a .rst-content h3 .headerlink,a .rst-content h4 .headerlink,a .rst-content h5 .headerlink,a .rst-content h6 .headerlink,a .rst-content p.caption .headerlink,a .rst-content p .headerlink,a .rst-content table>caption .headerlink,a .rst-content tt.download span:first-child,a .wy-menu-vertical li button.toctree-expand{display:inline-block;text-decoration:inherit}.btn .fa,.btn .icon,.btn .rst-content .admonition-title,.btn .rst-content .code-block-caption .headerlink,.btn .rst-content .eqno .headerlink,.btn .rst-content code.download span:first-child,.btn .rst-content dl dt .headerlink,.btn .rst-content h1 .headerlink,.btn .rst-content h2 .headerlink,.btn .rst-content h3 .headerlink,.btn .rst-content h4 .headerlink,.btn .rst-content h5 .headerlink,.btn .rst-content h6 .headerlink,.btn .rst-content p .headerlink,.btn .rst-content table>caption .headerlink,.btn .rst-content tt.download span:first-child,.btn .wy-menu-vertical li.current>a button.toctree-expand,.btn .wy-menu-vertical li.on a button.toctree-expand,.btn .wy-menu-vertical li button.toctree-expand,.nav .fa,.nav .icon,.nav .rst-content .admonition-title,.nav .rst-content .code-block-caption .headerlink,.nav .rst-content .eqno .headerlink,.nav .rst-content code.download span:first-child,.nav .rst-content dl dt .headerlink,.nav .rst-content h1 .headerlink,.nav .rst-content h2 .headerlink,.nav .rst-content h3 .headerlink,.nav .rst-content h4 .headerlink,.nav .rst-content h5 .headerlink,.nav .rst-content h6 .headerlink,.nav .rst-content p .headerlink,.nav .rst-content table>caption .headerlink,.nav .rst-content tt.download span:first-child,.nav .wy-menu-vertical li.current>a button.toctree-expand,.nav .wy-menu-vertical li.on a button.toctree-expand,.nav .wy-menu-vertical li button.toctree-expand,.rst-content .btn .admonition-title,.rst-content .code-block-caption .btn .headerlink,.rst-content .code-block-caption .nav .headerlink,.rst-content .eqno .btn .headerlink,.rst-content .eqno .nav .headerlink,.rst-content .nav .admonition-title,.rst-content code.download .btn span:first-child,.rst-content code.download .nav span:first-child,.rst-content dl dt .btn .headerlink,.rst-content dl dt .nav .headerlink,.rst-content h1 .btn .headerlink,.rst-content h1 .nav .headerlink,.rst-content h2 .btn .headerlink,.rst-content h2 .nav .headerlink,.rst-content h3 .btn .headerlink,.rst-content h3 .nav .headerlink,.rst-content h4 .btn .headerlink,.rst-content h4 .nav .headerlink,.rst-content h5 .btn .headerlink,.rst-content h5 .nav .headerlink,.rst-content h6 .btn .headerlink,.rst-content h6 .nav .headerlink,.rst-content p .btn .headerlink,.rst-content p .nav .headerlink,.rst-content table>caption .btn .headerlink,.rst-content table>caption .nav .headerlink,.rst-content tt.download .btn span:first-child,.rst-content tt.download .nav span:first-child,.wy-menu-vertical li .btn button.toctree-expand,.wy-menu-vertical li.current>a .btn button.toctree-expand,.wy-menu-vertical li.current>a .nav button.toctree-expand,.wy-menu-vertical li .nav button.toctree-expand,.wy-menu-vertical li.on a .btn button.toctree-expand,.wy-menu-vertical li.on a .nav button.toctree-expand{display:inline}.btn .fa-large.icon,.btn .fa.fa-large,.btn .rst-content .code-block-caption .fa-large.headerlink,.btn .rst-content .eqno .fa-large.headerlink,.btn .rst-content .fa-large.admonition-title,.btn .rst-content code.download span.fa-large:first-child,.btn .rst-content dl dt .fa-large.headerlink,.btn .rst-content h1 .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.btn .rst-content p .fa-large.headerlink,.btn .rst-content table>caption .fa-large.headerlink,.btn .rst-content tt.download span.fa-large:first-child,.btn .wy-menu-vertical li button.fa-large.toctree-expand,.nav .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .code-block-caption .fa-large.headerlink,.nav .rst-content .eqno .fa-large.headerlink,.nav .rst-content .fa-large.admonition-title,.nav .rst-content code.download span.fa-large:first-child,.nav .rst-content dl dt .fa-large.headerlink,.nav .rst-content h1 .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.nav .rst-content p .fa-large.headerlink,.nav .rst-content table>caption .fa-large.headerlink,.nav .rst-content tt.download span.fa-large:first-child,.nav .wy-menu-vertical li button.fa-large.toctree-expand,.rst-content .btn .fa-large.admonition-title,.rst-content .code-block-caption .btn .fa-large.headerlink,.rst-content .code-block-caption .nav .fa-large.headerlink,.rst-content .eqno .btn .fa-large.headerlink,.rst-content .eqno .nav .fa-large.headerlink,.rst-content .nav .fa-large.admonition-title,.rst-content code.download .btn span.fa-large:first-child,.rst-content code.download .nav span.fa-large:first-child,.rst-content dl dt .btn .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.rst-content p .btn .fa-large.headerlink,.rst-content p .nav .fa-large.headerlink,.rst-content table>caption .btn .fa-large.headerlink,.rst-content table>caption .nav .fa-large.headerlink,.rst-content tt.download .btn span.fa-large:first-child,.rst-content tt.download .nav span.fa-large:first-child,.wy-menu-vertical li .btn button.fa-large.toctree-expand,.wy-menu-vertical li .nav button.fa-large.toctree-expand{line-height:.9em}.btn .fa-spin.icon,.btn .fa.fa-spin,.btn .rst-content .code-block-caption .fa-spin.headerlink,.btn .rst-content .eqno .fa-spin.headerlink,.btn .rst-content .fa-spin.admonition-title,.btn .rst-content code.download span.fa-spin:first-child,.btn .rst-content dl dt .fa-spin.headerlink,.btn .rst-content h1 .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.btn .rst-content p .fa-spin.headerlink,.btn .rst-content table>caption .fa-spin.headerlink,.btn .rst-content tt.download span.fa-spin:first-child,.btn .wy-menu-vertical li button.fa-spin.toctree-expand,.nav .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .code-block-caption .fa-spin.headerlink,.nav .rst-content .eqno .fa-spin.headerlink,.nav .rst-content .fa-spin.admonition-title,.nav .rst-content code.download span.fa-spin:first-child,.nav .rst-content dl dt .fa-spin.headerlink,.nav .rst-content h1 .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.nav .rst-content p .fa-spin.headerlink,.nav .rst-content table>caption .fa-spin.headerlink,.nav .rst-content tt.download span.fa-spin:first-child,.nav .wy-menu-vertical li button.fa-spin.toctree-expand,.rst-content .btn .fa-spin.admonition-title,.rst-content .code-block-caption .btn .fa-spin.headerlink,.rst-content .code-block-caption .nav .fa-spin.headerlink,.rst-content .eqno .btn .fa-spin.headerlink,.rst-content .eqno .nav .fa-spin.headerlink,.rst-content .nav .fa-spin.admonition-title,.rst-content code.download .btn span.fa-spin:first-child,.rst-content code.download .nav span.fa-spin:first-child,.rst-content dl dt .btn .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.rst-content p .btn .fa-spin.headerlink,.rst-content p .nav .fa-spin.headerlink,.rst-content table>caption .btn .fa-spin.headerlink,.rst-content table>caption .nav .fa-spin.headerlink,.rst-content tt.download .btn span.fa-spin:first-child,.rst-content tt.download .nav span.fa-spin:first-child,.wy-menu-vertical li .btn button.fa-spin.toctree-expand,.wy-menu-vertical li .nav button.fa-spin.toctree-expand{display:inline-block}.btn.fa:before,.btn.icon:before,.rst-content .btn.admonition-title:before,.rst-content .code-block-caption .btn.headerlink:before,.rst-content .eqno .btn.headerlink:before,.rst-content code.download span.btn:first-child:before,.rst-content dl dt .btn.headerlink:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content p .btn.headerlink:before,.rst-content table>caption .btn.headerlink:before,.rst-content tt.download span.btn:first-child:before,.wy-menu-vertical li button.btn.toctree-expand:before{opacity:.5;-webkit-transition:opacity .05s ease-in;-moz-transition:opacity .05s ease-in;transition:opacity .05s ease-in}.btn.fa:hover:before,.btn.icon:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content .code-block-caption .btn.headerlink:hover:before,.rst-content .eqno .btn.headerlink:hover:before,.rst-content code.download span.btn:first-child:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content p .btn.headerlink:hover:before,.rst-content table>caption .btn.headerlink:hover:before,.rst-content tt.download span.btn:first-child:hover:before,.wy-menu-vertical li button.btn.toctree-expand:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .icon:before,.btn-mini .rst-content .admonition-title:before,.btn-mini .rst-content .code-block-caption .headerlink:before,.btn-mini .rst-content .eqno .headerlink:before,.btn-mini .rst-content code.download span:first-child:before,.btn-mini .rst-content dl dt .headerlink:before,.btn-mini .rst-content h1 .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.btn-mini .rst-content p .headerlink:before,.btn-mini .rst-content table>caption .headerlink:before,.btn-mini .rst-content tt.download span:first-child:before,.btn-mini .wy-menu-vertical li button.toctree-expand:before,.rst-content .btn-mini .admonition-title:before,.rst-content .code-block-caption .btn-mini .headerlink:before,.rst-content .eqno .btn-mini .headerlink:before,.rst-content code.download .btn-mini span:first-child:before,.rst-content dl dt .btn-mini .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.rst-content p .btn-mini .headerlink:before,.rst-content table>caption .btn-mini .headerlink:before,.rst-content tt.download .btn-mini span:first-child:before,.wy-menu-vertical li .btn-mini button.toctree-expand:before{font-size:14px;vertical-align:-15%}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.wy-alert{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.rst-content .admonition-title,.wy-alert-title{font-weight:700;display:block;color:#fff;background:#6ab0de;padding:6px 12px;margin:-12px -12px 12px}.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.admonition,.rst-content .wy-alert-danger.admonition-todo,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.seealso,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.wy-alert.wy-alert-danger{background:#fdf3f2}.rst-content .danger .admonition-title,.rst-content .danger .wy-alert-title,.rst-content .error .admonition-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.admonition-todo .admonition-title,.rst-content .wy-alert-danger.admonition-todo .wy-alert-title,.rst-content .wy-alert-danger.admonition .admonition-title,.rst-content .wy-alert-danger.admonition .wy-alert-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.seealso .admonition-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.wy-alert.wy-alert-danger .wy-alert-title{background:#f29f97}.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .warning,.rst-content .wy-alert-warning.admonition,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.note,.rst-content .wy-alert-warning.seealso,.rst-content .wy-alert-warning.tip,.wy-alert.wy-alert-warning{background:#ffedcc}.rst-content .admonition-todo .admonition-title,.rst-content .admonition-todo .wy-alert-title,.rst-content .attention .admonition-title,.rst-content .attention .wy-alert-title,.rst-content .caution .admonition-title,.rst-content .caution .wy-alert-title,.rst-content .warning .admonition-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.admonition .admonition-title,.rst-content .wy-alert-warning.admonition .wy-alert-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .wy-alert-warning.seealso .admonition-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.wy-alert.wy-alert-warning .wy-alert-title{background:#f0b37e}.rst-content .note,.rst-content .seealso,.rst-content .wy-alert-info.admonition,.rst-content .wy-alert-info.admonition-todo,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.wy-alert.wy-alert-info{background:#e7f2fa}.rst-content .note .admonition-title,.rst-content .note .wy-alert-title,.rst-content .seealso .admonition-title,.rst-content .seealso .wy-alert-title,.rst-content .wy-alert-info.admonition-todo .admonition-title,.rst-content .wy-alert-info.admonition-todo .wy-alert-title,.rst-content .wy-alert-info.admonition .admonition-title,.rst-content .wy-alert-info.admonition .wy-alert-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.wy-alert.wy-alert-info .wy-alert-title{background:#6ab0de}.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.admonition,.rst-content .wy-alert-success.admonition-todo,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.seealso,.rst-content .wy-alert-success.warning,.wy-alert.wy-alert-success{background:#dbfaf4}.rst-content .hint .admonition-title,.rst-content .hint .wy-alert-title,.rst-content .important .admonition-title,.rst-content .important .wy-alert-title,.rst-content .tip .admonition-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.admonition-todo .admonition-title,.rst-content .wy-alert-success.admonition-todo .wy-alert-title,.rst-content .wy-alert-success.admonition .admonition-title,.rst-content .wy-alert-success.admonition .wy-alert-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.seealso .admonition-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.wy-alert.wy-alert-success .wy-alert-title{background:#1abc9c}.rst-content .wy-alert-neutral.admonition,.rst-content .wy-alert-neutral.admonition-todo,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.seealso,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.wy-alert.wy-alert-neutral{background:#f3f6f6}.rst-content .wy-alert-neutral.admonition-todo .admonition-title,.rst-content .wy-alert-neutral.admonition-todo .wy-alert-title,.rst-content .wy-alert-neutral.admonition .admonition-title,.rst-content .wy-alert-neutral.admonition .wy-alert-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.seealso .admonition-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.wy-alert.wy-alert-neutral .wy-alert-title{color:#404040;background:#e1e4e5}.rst-content .wy-alert-neutral.admonition-todo a,.rst-content .wy-alert-neutral.admonition a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.seealso a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.wy-alert.wy-alert-neutral a{color:#2980b9}.rst-content .admonition-todo p:last-child,.rst-content .admonition p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .note p:last-child,.rst-content .seealso p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.wy-alert p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:56px;overflow:hidden;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;transition:all .3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:56px}@media screen and (max-width:768px){.wy-tray-container{bottom:auto;top:0;width:100%}.wy-tray-container li{width:100%}}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px;color:#fff;border:1px solid rgba(0,0,0,.1);background-color:#27ae60;text-decoration:none;font-weight:400;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 2px -1px hsla(0,0%,100%,.5),inset 0 -2px 0 0 rgba(0,0,0,.1);outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .1s linear;-moz-transition:all .1s linear;transition:all .1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.05),inset 0 2px 0 0 rgba(0,0,0,.1);padding:8px 12px 6px}.btn:visited{color:#fff}.btn-disabled,.btn-disabled:active,.btn-disabled:focus,.btn-disabled:hover,.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9!important}.btn-info:hover{background-color:#2e8ece!important}.btn-neutral{background-color:#f3f6f6!important;color:#404040!important}.btn-neutral:hover{background-color:#e5ebeb!important;color:#404040}.btn-neutral:visited{color:#404040!important}.btn-success{background-color:#27ae60!important}.btn-success:hover{background-color:#295!important}.btn-danger{background-color:#e74c3c!important}.btn-danger:hover{background-color:#ea6153!important}.btn-warning{background-color:#e67e22!important}.btn-warning:hover{background-color:#e98b39!important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f!important}.btn-link{background-color:transparent!important;color:#2980b9;box-shadow:none;border-color:transparent!important}.btn-link:active,.btn-link:hover{background-color:transparent!important;color:#409ad5!important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:after,.wy-btn-group:before{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:1px solid #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:1px solid #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type=search]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;left:auto;text-align:right}.wy-dropdown-arrow:before{content:" ";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned .wy-help-inline,.wy-form-aligned input,.wy-form-aligned label,.wy-form-aligned select,.wy-form-aligned textarea{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:6px 12px 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:6px}fieldset{margin:0}fieldset,legend{border:0;padding:0}legend{width:100%;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label,legend{display:block}label{margin:0 0 .3125em;color:#333;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;max-width:1200px;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:after,.wy-control-group:before{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:" *";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full input[type=color],.wy-control-group .wy-form-full input[type=date],.wy-control-group .wy-form-full input[type=datetime-local],.wy-control-group .wy-form-full input[type=datetime],.wy-control-group .wy-form-full input[type=email],.wy-control-group .wy-form-full input[type=month],.wy-control-group .wy-form-full input[type=number],.wy-control-group .wy-form-full input[type=password],.wy-control-group .wy-form-full input[type=search],.wy-control-group .wy-form-full input[type=tel],.wy-control-group .wy-form-full input[type=text],.wy-control-group .wy-form-full input[type=time],.wy-control-group .wy-form-full input[type=url],.wy-control-group .wy-form-full input[type=week],.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves input[type=color],.wy-control-group .wy-form-halves input[type=date],.wy-control-group .wy-form-halves input[type=datetime-local],.wy-control-group .wy-form-halves input[type=datetime],.wy-control-group .wy-form-halves input[type=email],.wy-control-group .wy-form-halves input[type=month],.wy-control-group .wy-form-halves input[type=number],.wy-control-group .wy-form-halves input[type=password],.wy-control-group .wy-form-halves input[type=search],.wy-control-group .wy-form-halves input[type=tel],.wy-control-group .wy-form-halves input[type=text],.wy-control-group .wy-form-halves input[type=time],.wy-control-group .wy-form-halves input[type=url],.wy-control-group .wy-form-halves input[type=week],.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds input[type=color],.wy-control-group .wy-form-thirds input[type=date],.wy-control-group .wy-form-thirds input[type=datetime-local],.wy-control-group .wy-form-thirds input[type=datetime],.wy-control-group .wy-form-thirds input[type=email],.wy-control-group .wy-form-thirds input[type=month],.wy-control-group .wy-form-thirds input[type=number],.wy-control-group .wy-form-thirds input[type=password],.wy-control-group .wy-form-thirds input[type=search],.wy-control-group .wy-form-thirds input[type=tel],.wy-control-group .wy-form-thirds input[type=text],.wy-control-group .wy-form-thirds input[type=time],.wy-control-group .wy-form-thirds input[type=url],.wy-control-group .wy-form-thirds input[type=week],.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full{float:left;display:block;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{float:left;display:block;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child,.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(odd){clear:left}.wy-control-group .wy-form-thirds{float:left;display:block;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child,.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control,.wy-control-no-input{margin:6px 0 0;font-size:90%}.wy-control-no-input{display:inline-block}.wy-control-group.fluid-input input[type=color],.wy-control-group.fluid-input input[type=date],.wy-control-group.fluid-input input[type=datetime-local],.wy-control-group.fluid-input input[type=datetime],.wy-control-group.fluid-input input[type=email],.wy-control-group.fluid-input input[type=month],.wy-control-group.fluid-input input[type=number],.wy-control-group.fluid-input input[type=password],.wy-control-group.fluid-input input[type=search],.wy-control-group.fluid-input input[type=tel],.wy-control-group.fluid-input input[type=text],.wy-control-group.fluid-input input[type=time],.wy-control-group.fluid-input input[type=url],.wy-control-group.fluid-input input[type=week]{width:100%}.wy-form-message-inline{padding-left:.3em;color:#666;font-size:90%}.wy-form-message{display:block;color:#999;font-size:70%;margin-top:.3125em;font-style:italic}.wy-form-message p{font-size:inherit;font-style:italic;margin-bottom:6px}.wy-form-message p:last-child{margin-bottom:0}input{line-height:normal}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;*overflow:visible}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}input[type=datetime-local]{padding:.34375em .625em}input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{padding:0;margin-right:.3125em;*height:13px;*width:13px}input[type=checkbox],input[type=radio],input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus{outline:0;outline:thin dotted\9;border-color:#333}input.no-focus:focus{border-color:#ccc!important}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled]{cursor:not-allowed;background-color:#fafafa}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e74c3c}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif}select,textarea{padding:.5em .625em;display:inline-block;border:1px solid #ccc;font-size:80%;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#fafafa}input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap;padding:6px}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{line-height:27px;padding:0 8px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:1px solid #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-switch{position:relative;display:block;height:24px;margin-top:12px;cursor:pointer}.wy-switch:before{left:0;top:0;width:36px;height:12px;background:#ccc}.wy-switch:after,.wy-switch:before{position:absolute;content:"";display:block;border-radius:4px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wy-switch:after{width:18px;height:18px;background:#999;left:-3px;top:-3px}.wy-switch span{position:absolute;left:48px;display:block;font-size:12px;color:#ccc;line-height:1}.wy-switch.active:before{background:#1e8449}.wy-switch.active:after{left:24px;background:#27ae60}.wy-switch.disabled{cursor:not-allowed;opacity:.8}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type=color],.wy-control-group.wy-control-group-error input[type=date],.wy-control-group.wy-control-group-error input[type=datetime-local],.wy-control-group.wy-control-group-error input[type=datetime],.wy-control-group.wy-control-group-error input[type=email],.wy-control-group.wy-control-group-error input[type=month],.wy-control-group.wy-control-group-error input[type=number],.wy-control-group.wy-control-group-error input[type=password],.wy-control-group.wy-control-group-error input[type=search],.wy-control-group.wy-control-group-error input[type=tel],.wy-control-group.wy-control-group-error input[type=text],.wy-control-group.wy-control-group-error input[type=time],.wy-control-group.wy-control-group-error input[type=url],.wy-control-group.wy-control-group-error input[type=week],.wy-control-group.wy-control-group-error textarea{border:1px solid #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:.5em .625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width:480px){.wy-form button[type=submit]{margin:.7em 0 0}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=text],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week],.wy-form label{margin-bottom:.3em;display:block}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0}.wy-form-message,.wy-form-message-inline,.wy-form .wy-help-inline{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width:768px){.tablet-hide{display:none}}@media screen and (max-width:480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.rst-content table.docutils,.rst-content table.field-list,.wy-table{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.rst-content table.docutils caption,.rst-content table.field-list caption,.wy-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.rst-content table.docutils td,.rst-content table.docutils th,.rst-content table.field-list td,.rst-content table.field-list th,.wy-table td,.wy-table th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.rst-content table.docutils td:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list td:first-child,.rst-content table.field-list th:first-child,.wy-table td:first-child,.wy-table th:first-child{border-left-width:0}.rst-content table.docutils thead,.rst-content table.field-list thead,.wy-table thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.rst-content table.docutils thead th,.rst-content table.field-list thead th,.wy-table thead th{font-weight:700;border-bottom:2px solid #e1e4e5}.rst-content table.docutils td,.rst-content table.field-list td,.wy-table td{background-color:transparent;vertical-align:middle}.rst-content table.docutils td p,.rst-content table.field-list td p,.wy-table td p{line-height:18px}.rst-content table.docutils td p:last-child,.rst-content table.field-list td p:last-child,.wy-table td p:last-child{margin-bottom:0}.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min,.wy-table .wy-table-cell-min{width:1%;padding-right:0}.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:grey;font-size:90%}.wy-table-tertiary{color:grey;font-size:80%}.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,.wy-table-backed,.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td{background-color:#f3f6f6}.rst-content table.docutils,.wy-table-bordered-all{border:1px solid #e1e4e5}.rst-content table.docutils td,.wy-table-bordered-all td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.rst-content table.docutils tbody>tr:last-child td,.wy-table-bordered-all tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0!important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none;cursor:pointer}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%}body,html{overflow-x:hidden}body{font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-weight:400;color:#404040;min-height:100%;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22!important}a.wy-text-warning:hover{color:#eb9950!important}.wy-text-info{color:#2980b9!important}a.wy-text-info:hover{color:#409ad5!important}.wy-text-success{color:#27ae60!important}a.wy-text-success:hover{color:#36d278!important}.wy-text-danger{color:#e74c3c!important}a.wy-text-danger:hover{color:#ed7669!important}.wy-text-neutral{color:#404040!important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.rst-content section ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.rst-content section ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.rst-content section ul li p:last-child,.rst-content section ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.rst-content section ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.rst-content section ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.rst-content section ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content .section ol.arabic,.rst-content .toctree-wrapper ol,.rst-content .toctree-wrapper ol.arabic,.rst-content section ol,.rst-content section ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol.arabic li,.rst-content .section ol li,.rst-content .toctree-wrapper ol.arabic li,.rst-content .toctree-wrapper ol li,.rst-content section ol.arabic li,.rst-content section ol li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol.arabic li ul,.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content .toctree-wrapper ol.arabic li ul,.rst-content .toctree-wrapper ol li p:last-child,.rst-content .toctree-wrapper ol li ul,.rst-content section ol.arabic li ul,.rst-content section ol li p:last-child,.rst-content section ol li ul,.wy-plain-list-decimal li p:last-child,.wy-plain-list-decimal li ul,article ol li p:last-child,article ol li ul{margin-bottom:0}.rst-content .section ol.arabic li ul li,.rst-content .section ol li ul li,.rst-content .toctree-wrapper ol.arabic li ul li,.rst-content .toctree-wrapper ol li ul li,.rst-content section ol.arabic li ul li,.rst-content section ol li ul li,.wy-plain-list-decimal li ul li,article ol li ul li{list-style:disc}.wy-breadcrumbs{*zoom:1}.wy-breadcrumbs:after,.wy-breadcrumbs:before{display:table;content:""}.wy-breadcrumbs:after{clear:both}.wy-breadcrumbs>li{display:inline-block;padding-top:5px}.wy-breadcrumbs>li.wy-breadcrumbs-aside{float:right}.rst-content .wy-breadcrumbs>li code,.rst-content .wy-breadcrumbs>li tt,.wy-breadcrumbs>li .rst-content tt,.wy-breadcrumbs>li code{all:inherit;color:inherit}.breadcrumb-item:before{content:"/";color:#bbb;font-size:13px;padding:0 6px 0 3px}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width:480px){.wy-breadcrumbs-extra,.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}html{font-size:16px}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:after,.wy-menu-horiz:before{display:table;content:""}.wy-menu-horiz:after{clear:both}.wy-menu-horiz li,.wy-menu-horiz ul{display:inline-block}.wy-menu-horiz li:hover{background:hsla(0,0%,100%,.1)}.wy-menu-horiz li.divide-left{border-left:1px solid #404040}.wy-menu-horiz li.divide-right{border-right:1px solid #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical{width:300px}.wy-menu-vertical header,.wy-menu-vertical p.caption{color:#55a5d9;height:32px;line-height:32px;padding:0 1.618em;margin:12px 0 0;display:block;font-weight:700;text-transform:uppercase;font-size:85%;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:1px solid #404040}.wy-menu-vertical li.divide-bottom{border-bottom:1px solid #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:grey;border-right:1px solid #c9c9c9;padding:.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.rst-content .wy-menu-vertical li tt,.wy-menu-vertical li .rst-content tt,.wy-menu-vertical li code{border:none;background:inherit;color:inherit;padding-left:0;padding-right:0}.wy-menu-vertical li button.toctree-expand{display:block;float:left;margin-left:-1.2em;line-height:18px;color:#4d4d4d;border:none;background:none;padding:0}.wy-menu-vertical li.current>a,.wy-menu-vertical li.on a{color:#404040;font-weight:700;position:relative;background:#fcfcfc;border:none;padding:.4045em 1.618em}.wy-menu-vertical li.current>a:hover,.wy-menu-vertical li.on a:hover{background:#fcfcfc}.wy-menu-vertical li.current>a:hover button.toctree-expand,.wy-menu-vertical li.on a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand{display:block;line-height:18px;color:#333}.wy-menu-vertical li.toctree-l1.current>a{border-bottom:1px solid #c9c9c9;border-top:1px solid #c9c9c9}.wy-menu-vertical .toctree-l1.current .toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .toctree-l11>ul{display:none}.wy-menu-vertical .toctree-l1.current .current.toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .current.toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .current.toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .current.toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .current.toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .current.toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .current.toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .current.toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .current.toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .current.toctree-l11>ul{display:block}.wy-menu-vertical li.toctree-l3,.wy-menu-vertical li.toctree-l4{font-size:.9em}.wy-menu-vertical li.toctree-l2 a,.wy-menu-vertical li.toctree-l3 a,.wy-menu-vertical li.toctree-l4 a,.wy-menu-vertical li.toctree-l5 a,.wy-menu-vertical li.toctree-l6 a,.wy-menu-vertical li.toctree-l7 a,.wy-menu-vertical li.toctree-l8 a,.wy-menu-vertical li.toctree-l9 a,.wy-menu-vertical li.toctree-l10 a{color:#404040}.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l3 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l4 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l5 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l6 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l7 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l8 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l9 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l10 a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a,.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a,.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a,.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a,.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a,.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{display:block}.wy-menu-vertical li.toctree-l2.current>a{padding:.4045em 2.427em}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{padding:.4045em 1.618em .4045em 4.045em}.wy-menu-vertical li.toctree-l3.current>a{padding:.4045em 4.045em}.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{padding:.4045em 1.618em .4045em 5.663em}.wy-menu-vertical li.toctree-l4.current>a{padding:.4045em 5.663em}.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a{padding:.4045em 1.618em .4045em 7.281em}.wy-menu-vertical li.toctree-l5.current>a{padding:.4045em 7.281em}.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a{padding:.4045em 1.618em .4045em 8.899em}.wy-menu-vertical li.toctree-l6.current>a{padding:.4045em 8.899em}.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a{padding:.4045em 1.618em .4045em 10.517em}.wy-menu-vertical li.toctree-l7.current>a{padding:.4045em 10.517em}.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a{padding:.4045em 1.618em .4045em 12.135em}.wy-menu-vertical li.toctree-l8.current>a{padding:.4045em 12.135em}.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a{padding:.4045em 1.618em .4045em 13.753em}.wy-menu-vertical li.toctree-l9.current>a{padding:.4045em 13.753em}.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a{padding:.4045em 1.618em .4045em 15.371em}.wy-menu-vertical li.toctree-l10.current>a{padding:.4045em 15.371em}.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{padding:.4045em 1.618em .4045em 16.989em}.wy-menu-vertical li.toctree-l2.current>a,.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{background:#c9c9c9}.wy-menu-vertical li.toctree-l2 button.toctree-expand{color:#a3a3a3}.wy-menu-vertical li.toctree-l3.current>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{background:#bdbdbd}.wy-menu-vertical li.toctree-l3 button.toctree-expand{color:#969696}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical li ul li a{margin-bottom:0;color:#d9d9d9;font-weight:400}.wy-menu-vertical a{line-height:18px;padding:.4045em 1.618em;display:block;position:relative;font-size:90%;color:#d9d9d9}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:hover button.toctree-expand{color:#d9d9d9}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-menu-vertical a:active button.toctree-expand{color:#fff}.wy-side-nav-search{display:block;width:300px;padding:.809em;margin-bottom:.809em;z-index:200;background-color:#2980b9;text-align:center;color:#fcfcfc}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto .809em;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a{color:#fcfcfc;font-size:100%;font-weight:700;display:inline-block;padding:4px 6px;margin-bottom:.809em;max-width:100%}.wy-side-nav-search .wy-dropdown>a:hover,.wy-side-nav-search>a:hover{background:hsla(0,0%,100%,.1)}.wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo{display:block;margin:0 auto;height:auto;width:auto;border-radius:0;max-width:100%;background:transparent}.wy-side-nav-search .wy-dropdown>a.icon img.logo,.wy-side-nav-search>a.icon img.logo{margin-top:.85em}.wy-side-nav-search>div.version{margin-top:-.4045em;margin-bottom:.809em;font-weight:400;color:hsla(0,0%,100%,.3)}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;transition:all .2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:#fcfcfc}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:fixed;top:0;bottom:0;left:0;padding-bottom:2em;width:300px;overflow-x:hidden;overflow-y:hidden;min-height:100%;color:#9b9b9b;background:#343131;z-index:200}.wy-side-scroll{width:320px;position:relative;overflow-x:hidden;overflow-y:scroll;height:100%}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:.4045em .809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:after,.wy-nav-top:before{display:table;content:""}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:700}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer;padding-top:inherit}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:grey}footer p{margin-bottom:12px}.rst-content footer span.commit tt,footer span.commit .rst-content tt,footer span.commit code{padding:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:1em;background:none;border:none;color:grey}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:after,.rst-footer-buttons:before{width:100%;display:table;content:""}.rst-footer-buttons:after{clear:both}.rst-breadcrumbs-buttons{margin-top:12px;*zoom:1}.rst-breadcrumbs-buttons:after,.rst-breadcrumbs-buttons:before{display:table;content:""}.rst-breadcrumbs-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:1px solid #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:1px solid #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:grey;font-size:90%}.genindextable li>ul{margin-left:24px}@media screen and (max-width:768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-menu.wy-menu-vertical,.wy-side-nav-search,.wy-side-scroll{width:auto}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width:1100px){.wy-nav-content-wrap{background:rgba(0,0,0,.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.rst-versions,.wy-nav-side,footer{display:none}.wy-nav-content-wrap{margin-left:0}}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:after,.rst-versions .rst-current-version:before{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-content .code-block-caption .rst-versions .rst-current-version .headerlink,.rst-content .eqno .rst-versions .rst-current-version .headerlink,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-content code.download .rst-versions .rst-current-version span:first-child,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-content p .rst-versions .rst-current-version .headerlink,.rst-content table>caption .rst-versions .rst-current-version .headerlink,.rst-content tt.download .rst-versions .rst-current-version span:first-child,.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .icon,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-versions .rst-current-version .rst-content .code-block-caption .headerlink,.rst-versions .rst-current-version .rst-content .eqno .headerlink,.rst-versions .rst-current-version .rst-content code.download span:first-child,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-versions .rst-current-version .rst-content p .headerlink,.rst-versions .rst-current-version .rst-content table>caption .headerlink,.rst-versions .rst-current-version .rst-content tt.download span:first-child,.rst-versions .rst-current-version .wy-menu-vertical li button.toctree-expand,.wy-menu-vertical li .rst-versions .rst-current-version button.toctree-expand{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}.rst-content .toctree-wrapper>p.caption,.rst-content h1,.rst-content h2,.rst-content h3,.rst-content h4,.rst-content h5,.rst-content h6{margin-bottom:24px}.rst-content img{max-width:100%;height:auto}.rst-content div.figure,.rst-content figure{margin-bottom:24px}.rst-content div.figure .caption-text,.rst-content figure .caption-text{font-style:italic}.rst-content div.figure p:last-child.caption,.rst-content figure p:last-child.caption{margin-bottom:0}.rst-content div.figure.align-center,.rst-content figure.align-center{text-align:center}.rst-content .section>a>img,.rst-content .section>img,.rst-content section>a>img,.rst-content section>img{margin-bottom:24px}.rst-content abbr[title]{text-decoration:none}.rst-content.style-external-links a.reference.external:after{font-family:FontAwesome;content:"\f08e";color:#b3b3b3;vertical-align:super;font-size:60%;margin:0 .2em}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content pre.literal-block{white-space:pre;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;display:block;overflow:auto}.rst-content div[class^=highlight],.rst-content pre.literal-block{border:1px solid #e1e4e5;overflow-x:auto;margin:1px 0 24px}.rst-content div[class^=highlight] div[class^=highlight],.rst-content pre.literal-block div[class^=highlight]{padding:0;border:none;margin:0}.rst-content div[class^=highlight] td.code{width:100%}.rst-content .linenodiv pre{border-right:1px solid #e6e9ea;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;user-select:none;pointer-events:none}.rst-content div[class^=highlight] pre{white-space:pre;margin:0;padding:12px;display:block;overflow:auto}.rst-content div[class^=highlight] pre .hll{display:block;margin:0 -12px;padding:0 12px}.rst-content .linenodiv pre,.rst-content div[class^=highlight] pre,.rst-content pre.literal-block{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:12px;line-height:1.4}.rst-content div.highlight .gp,.rst-content div.highlight span.linenos{user-select:none;pointer-events:none}.rst-content div.highlight span.linenos{display:inline-block;padding-left:0;padding-right:12px;margin-right:12px;border-right:1px solid #e6e9ea}.rst-content .code-block-caption{font-style:italic;font-size:85%;line-height:1;padding:1em 0;text-align:center}@media print{.rst-content .codeblock,.rst-content div[class^=highlight],.rst-content div[class^=highlight] pre{white-space:pre-wrap}}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning{clear:both}.rst-content .admonition-todo .last,.rst-content .admonition-todo>:last-child,.rst-content .admonition .last,.rst-content .admonition>:last-child,.rst-content .attention .last,.rst-content .attention>:last-child,.rst-content .caution .last,.rst-content .caution>:last-child,.rst-content .danger .last,.rst-content .danger>:last-child,.rst-content .error .last,.rst-content .error>:last-child,.rst-content .hint .last,.rst-content .hint>:last-child,.rst-content .important .last,.rst-content .important>:last-child,.rst-content .note .last,.rst-content .note>:last-child,.rst-content .seealso .last,.rst-content .seealso>:last-child,.rst-content .tip .last,.rst-content .tip>:last-child,.rst-content .warning .last,.rst-content .warning>:last-child{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent!important;border-color:rgba(0,0,0,.1)!important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha>li,.rst-content .toctree-wrapper ol.loweralpha,.rst-content .toctree-wrapper ol.loweralpha>li,.rst-content section ol.loweralpha,.rst-content section ol.loweralpha>li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha>li,.rst-content .toctree-wrapper ol.upperalpha,.rst-content .toctree-wrapper ol.upperalpha>li,.rst-content section ol.upperalpha,.rst-content section ol.upperalpha>li{list-style:upper-alpha}.rst-content .section ol li>*,.rst-content .section ul li>*,.rst-content .toctree-wrapper ol li>*,.rst-content .toctree-wrapper ul li>*,.rst-content section ol li>*,.rst-content section ul li>*{margin-top:12px;margin-bottom:12px}.rst-content .section ol li>:first-child,.rst-content .section ul li>:first-child,.rst-content .toctree-wrapper ol li>:first-child,.rst-content .toctree-wrapper ul li>:first-child,.rst-content section ol li>:first-child,.rst-content section ul li>:first-child{margin-top:0}.rst-content .section ol li>p,.rst-content .section ol li>p:last-child,.rst-content .section ul li>p,.rst-content .section ul li>p:last-child,.rst-content .toctree-wrapper ol li>p,.rst-content .toctree-wrapper ol li>p:last-child,.rst-content .toctree-wrapper ul li>p,.rst-content .toctree-wrapper ul li>p:last-child,.rst-content section ol li>p,.rst-content section ol li>p:last-child,.rst-content section ul li>p,.rst-content section ul li>p:last-child{margin-bottom:12px}.rst-content .section ol li>p:only-child,.rst-content .section ol li>p:only-child:last-child,.rst-content .section ul li>p:only-child,.rst-content .section ul li>p:only-child:last-child,.rst-content .toctree-wrapper ol li>p:only-child,.rst-content .toctree-wrapper ol li>p:only-child:last-child,.rst-content .toctree-wrapper ul li>p:only-child,.rst-content .toctree-wrapper ul li>p:only-child:last-child,.rst-content section ol li>p:only-child,.rst-content section ol li>p:only-child:last-child,.rst-content section ul li>p:only-child,.rst-content section ul li>p:only-child:last-child{margin-bottom:0}.rst-content .section ol li>ol,.rst-content .section ol li>ul,.rst-content .section ul li>ol,.rst-content .section ul li>ul,.rst-content .toctree-wrapper ol li>ol,.rst-content .toctree-wrapper ol li>ul,.rst-content .toctree-wrapper ul li>ol,.rst-content .toctree-wrapper ul li>ul,.rst-content section ol li>ol,.rst-content section ol li>ul,.rst-content section ul li>ol,.rst-content section ul li>ul{margin-bottom:12px}.rst-content .section ol.simple li>*,.rst-content .section ol.simple li ol,.rst-content .section ol.simple li ul,.rst-content .section ul.simple li>*,.rst-content .section ul.simple li ol,.rst-content .section ul.simple li ul,.rst-content .toctree-wrapper ol.simple li>*,.rst-content .toctree-wrapper ol.simple li ol,.rst-content .toctree-wrapper ol.simple li ul,.rst-content .toctree-wrapper ul.simple li>*,.rst-content .toctree-wrapper ul.simple li ol,.rst-content .toctree-wrapper ul.simple li ul,.rst-content section ol.simple li>*,.rst-content section ol.simple li ol,.rst-content section ol.simple li ul,.rst-content section ul.simple li>*,.rst-content section ul.simple li ol,.rst-content section ul.simple li ul{margin-top:0;margin-bottom:0}.rst-content .line-block{margin-left:0;margin-bottom:24px;line-height:24px}.rst-content .line-block .line-block{margin-left:24px;margin-bottom:0}.rst-content .topic-title{font-weight:700;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0 0 24px 24px}.rst-content .align-left{float:left;margin:0 24px 24px 0}.rst-content .align-center{margin:auto}.rst-content .align-center:not(table){display:block}.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink{opacity:0;font-size:14px;font-family:FontAwesome;margin-left:.5em}.rst-content .code-block-caption .headerlink:focus,.rst-content .code-block-caption:hover .headerlink,.rst-content .eqno .headerlink:focus,.rst-content .eqno:hover .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink:focus,.rst-content .toctree-wrapper>p.caption:hover .headerlink,.rst-content dl dt .headerlink:focus,.rst-content dl dt:hover .headerlink,.rst-content h1 .headerlink:focus,.rst-content h1:hover .headerlink,.rst-content h2 .headerlink:focus,.rst-content h2:hover .headerlink,.rst-content h3 .headerlink:focus,.rst-content h3:hover .headerlink,.rst-content h4 .headerlink:focus,.rst-content h4:hover .headerlink,.rst-content h5 .headerlink:focus,.rst-content h5:hover .headerlink,.rst-content h6 .headerlink:focus,.rst-content h6:hover .headerlink,.rst-content p.caption .headerlink:focus,.rst-content p.caption:hover .headerlink,.rst-content p .headerlink:focus,.rst-content p:hover .headerlink,.rst-content table>caption .headerlink:focus,.rst-content table>caption:hover .headerlink{opacity:1}.rst-content p a{overflow-wrap:anywhere}.rst-content .wy-table td p,.rst-content .wy-table td ul,.rst-content .wy-table th p,.rst-content .wy-table th ul,.rst-content table.docutils td p,.rst-content table.docutils td ul,.rst-content table.docutils th p,.rst-content table.docutils th ul,.rst-content table.field-list td p,.rst-content table.field-list td ul,.rst-content table.field-list th p,.rst-content table.field-list th ul{font-size:inherit}.rst-content .btn:focus{outline:2px solid}.rst-content table>caption .headerlink:after{font-size:12px}.rst-content .centered{text-align:center}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:1px solid #e1e4e5}.rst-content .sidebar dl,.rst-content .sidebar p,.rst-content .sidebar ul{font-size:90%}.rst-content .sidebar .last,.rst-content .sidebar>:last-child{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;font-weight:700;background:#e1e4e5;padding:6px 12px;margin:-24px -24px 24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;box-shadow:0 0 0 2px #f1c40f;display:inline;font-weight:700}.rst-content .citation-reference,.rst-content .footnote-reference{vertical-align:baseline;position:relative;top:-.4em;line-height:0;font-size:90%}.rst-content .citation-reference>span.fn-bracket,.rst-content .footnote-reference>span.fn-bracket{display:none}.rst-content .hlist{width:100%}.rst-content dl dt span.classifier:before{content:" : "}.rst-content dl dt span.classifier-delimiter{display:none!important}html.writer-html4 .rst-content table.docutils.citation,html.writer-html4 .rst-content table.docutils.footnote{background:none;border:none}html.writer-html4 .rst-content table.docutils.citation td,html.writer-html4 .rst-content table.docutils.citation tr,html.writer-html4 .rst-content table.docutils.footnote td,html.writer-html4 .rst-content table.docutils.footnote tr{border:none;background-color:transparent!important;white-space:normal}html.writer-html4 .rst-content table.docutils.citation td.label,html.writer-html4 .rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{display:grid;grid-template-columns:auto minmax(80%,95%)}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{display:inline-grid;grid-template-columns:max-content auto}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{display:grid;grid-template-columns:auto auto minmax(.65rem,auto) minmax(40%,95%)}html.writer-html5 .rst-content aside.citation>span.label,html.writer-html5 .rst-content aside.footnote>span.label,html.writer-html5 .rst-content div.citation>span.label{grid-column-start:1;grid-column-end:2}html.writer-html5 .rst-content aside.citation>span.backrefs,html.writer-html5 .rst-content aside.footnote>span.backrefs,html.writer-html5 .rst-content div.citation>span.backrefs{grid-column-start:2;grid-column-end:3;grid-row-start:1;grid-row-end:3}html.writer-html5 .rst-content aside.citation>p,html.writer-html5 .rst-content aside.footnote>p,html.writer-html5 .rst-content div.citation>p{grid-column-start:4;grid-column-end:5}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{margin-bottom:24px}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{padding-left:1rem}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dd,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dd,html.writer-html5 .rst-content dl.footnote>dt{margin-bottom:0}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{font-size:.9rem}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.footnote>dt{margin:0 .5rem .5rem 0;line-height:1.2rem;word-break:break-all;font-weight:400}html.writer-html5 .rst-content dl.citation>dt>span.brackets:before,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:before{content:"["}html.writer-html5 .rst-content dl.citation>dt>span.brackets:after,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:after{content:"]"}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a{word-break:keep-all}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a:not(:first-child):before,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.footnote>dd{margin:0 0 .5rem;line-height:1.2rem}html.writer-html5 .rst-content dl.citation>dd p,html.writer-html5 .rst-content dl.footnote>dd p{font-size:.9rem}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{padding-left:1rem;padding-right:1rem;font-size:.9rem;line-height:1.2rem}html.writer-html5 .rst-content aside.citation p,html.writer-html5 .rst-content aside.footnote p,html.writer-html5 .rst-content div.citation p{font-size:.9rem;line-height:1.2rem;margin-bottom:12px}html.writer-html5 .rst-content aside.citation span.backrefs,html.writer-html5 .rst-content aside.footnote span.backrefs,html.writer-html5 .rst-content div.citation span.backrefs{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content aside.citation span.backrefs>a,html.writer-html5 .rst-content aside.footnote span.backrefs>a,html.writer-html5 .rst-content div.citation span.backrefs>a{word-break:keep-all}html.writer-html5 .rst-content aside.citation span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content aside.footnote span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content div.citation span.backrefs>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content aside.citation span.label,html.writer-html5 .rst-content aside.footnote span.label,html.writer-html5 .rst-content div.citation span.label{line-height:1.2rem}html.writer-html5 .rst-content aside.citation-list,html.writer-html5 .rst-content aside.footnote-list,html.writer-html5 .rst-content div.citation-list{margin-bottom:24px}html.writer-html5 .rst-content dl.option-list kbd{font-size:.9rem}.rst-content table.docutils.footnote,html.writer-html4 .rst-content table.docutils.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content aside.footnote-list aside.footnote,html.writer-html5 .rst-content div.citation-list>div.citation,html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{color:grey}.rst-content table.docutils.footnote code,.rst-content table.docutils.footnote tt,html.writer-html4 .rst-content table.docutils.citation code,html.writer-html4 .rst-content table.docutils.citation tt,html.writer-html5 .rst-content aside.footnote-list aside.footnote code,html.writer-html5 .rst-content aside.footnote-list aside.footnote tt,html.writer-html5 .rst-content aside.footnote code,html.writer-html5 .rst-content aside.footnote tt,html.writer-html5 .rst-content div.citation-list>div.citation code,html.writer-html5 .rst-content div.citation-list>div.citation tt,html.writer-html5 .rst-content dl.citation code,html.writer-html5 .rst-content dl.citation tt,html.writer-html5 .rst-content dl.footnote code,html.writer-html5 .rst-content dl.footnote tt{color:#555}.rst-content .wy-table-responsive.citation,.rst-content .wy-table-responsive.footnote{margin-bottom:0}.rst-content .wy-table-responsive.citation+:not(.citation),.rst-content .wy-table-responsive.footnote+:not(.footnote){margin-top:24px}.rst-content .wy-table-responsive.citation:last-child,.rst-content .wy-table-responsive.footnote:last-child{margin-bottom:24px}.rst-content table.docutils th{border-color:#e1e4e5}html.writer-html5 .rst-content table.docutils th{border:1px solid #e1e4e5}html.writer-html5 .rst-content table.docutils td>p,html.writer-html5 .rst-content table.docutils th>p{line-height:1rem;margin-bottom:0;font-size:.9rem}.rst-content table.docutils td .last,.rst-content table.docutils td .last>:last-child{margin-bottom:0}.rst-content table.field-list,.rst-content table.field-list td{border:none}.rst-content table.field-list td p{line-height:inherit}.rst-content table.field-list td>strong{display:inline-block}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left}.rst-content code,.rst-content tt{color:#000;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;padding:2px 5px}.rst-content code big,.rst-content code em,.rst-content tt big,.rst-content tt em{font-size:100%!important;line-height:normal}.rst-content code.literal,.rst-content tt.literal{color:#e74c3c;white-space:normal}.rst-content code.xref,.rst-content tt.xref,a .rst-content code,a .rst-content tt{font-weight:700;color:#404040;overflow-wrap:normal}.rst-content kbd,.rst-content pre,.rst-content samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace}.rst-content a code,.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:700;margin-bottom:12px}.rst-content dl ol,.rst-content dl p,.rst-content dl table,.rst-content dl ul{margin-bottom:12px}.rst-content dl dd{margin:0 0 12px 24px;line-height:24px}.rst-content dl dd>ol:last-child,.rst-content dl dd>p:last-child,.rst-content dl dd>table:last-child,.rst-content dl dd>ul:last-child{margin-bottom:0}html.writer-html4 .rst-content dl:not(.docutils),html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple){margin-bottom:24px}html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:3px solid #6ab0de;padding:6px;position:relative}html.writer-html4 .rst-content dl:not(.docutils)>dt:before,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:before{color:#6ab0de}html.writer-html4 .rst-content dl:not(.docutils)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{margin-bottom:6px;border:none;border-left:3px solid #ccc;background:#f0f0f0;color:#555}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils)>dt:first-child,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:first-child{margin-top:0}html.writer-html4 .rst-content dl:not(.docutils) code.descclassname,html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{background-color:transparent;border:none;padding:0;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .optional,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .property,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .property{display:inline-block;padding-right:8px;max-width:100%}html.writer-html4 .rst-content dl:not(.docutils) .k,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .k{font-style:italic}html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}.rst-content .viewcode-back,.rst-content .viewcode-link{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:700}.rst-content code.download,.rst-content tt.download{background:inherit;padding:inherit;font-weight:400;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content code.download span:first-child,.rst-content tt.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{margin-right:4px}.rst-content .guilabel,.rst-content .menuselection{font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content .guilabel,.rst-content .menuselection{border:1px solid #7fbbe3;background:#e7f2fa}.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>.kbd,.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>kbd{color:inherit;font-size:80%;background-color:#fff;border:1px solid #a6a6a6;border-radius:4px;box-shadow:0 2px grey;padding:2.4px 6px;margin:auto 0}.rst-content .versionmodified{font-style:italic}@media screen and (max-width:480px){.rst-content .sidebar{width:100%}}span[id*=MathJax-Span]{color:#404040}.math{text-align:center}@font-face{font-family:Lato;src:url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"),url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff");font-weight:400;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"),url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff");font-weight:700;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"),url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff");font-weight:700;font-style:italic;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"),url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff");font-weight:400;font-style:italic;font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(fonts/Roboto-Slab-Regular.woff2?7abf5b8d04d26a2cafea937019bca958) format("woff2"),url(fonts/Roboto-Slab-Regular.woff?c1be9284088d487c5e3ff0a10a92e58c) format("woff");font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:700;src:url(fonts/Roboto-Slab-Bold.woff2?9984f4a9bda09be08e83f2506954adbe) format("woff2"),url(fonts/Roboto-Slab-Bold.woff?bed5564a116b05148e3b3bea6fb1162a) format("woff");font-display:block} \ No newline at end of file diff --git a/_static/doctools.js b/_static/doctools.js new file mode 100644 index 0000000..4d67807 --- /dev/null +++ b/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/_static/documentation_options.js b/_static/documentation_options.js new file mode 100644 index 0000000..fa421b1 --- /dev/null +++ b/_static/documentation_options.js @@ -0,0 +1,13 @@ +const DOCUMENTATION_OPTIONS = { + VERSION: '2.0.5', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/_static/file.png b/_static/file.png new file mode 100644 index 0000000..a858a41 Binary files /dev/null and b/_static/file.png differ diff --git a/_static/js/badge_only.js b/_static/js/badge_only.js new file mode 100644 index 0000000..526d723 --- /dev/null +++ b/_static/js/badge_only.js @@ -0,0 +1 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); \ No newline at end of file diff --git a/_static/js/html5shiv-printshiv.min.js b/_static/js/html5shiv-printshiv.min.js new file mode 100644 index 0000000..2b43bd0 --- /dev/null +++ b/_static/js/html5shiv-printshiv.min.js @@ -0,0 +1,4 @@ +/** +* @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/_static/js/html5shiv.min.js b/_static/js/html5shiv.min.js new file mode 100644 index 0000000..cd1c674 --- /dev/null +++ b/_static/js/html5shiv.min.js @@ -0,0 +1,4 @@ +/** +* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/_static/js/theme.js b/_static/js/theme.js new file mode 100644 index 0000000..1fddb6e --- /dev/null +++ b/_static/js/theme.js @@ -0,0 +1 @@ +!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + diff --git a/_static/minus.png b/_static/minus.png new file mode 100644 index 0000000..d96755f Binary files /dev/null and b/_static/minus.png differ diff --git a/_static/nbsphinx-broken-thumbnail.svg b/_static/nbsphinx-broken-thumbnail.svg new file mode 100644 index 0000000..4919ca8 --- /dev/null +++ b/_static/nbsphinx-broken-thumbnail.svg @@ -0,0 +1,9 @@ + + + + diff --git a/_static/nbsphinx-code-cells.css b/_static/nbsphinx-code-cells.css new file mode 100644 index 0000000..a3fb27c --- /dev/null +++ b/_static/nbsphinx-code-cells.css @@ -0,0 +1,259 @@ +/* remove conflicting styling from Sphinx themes */ +div.nbinput.container div.prompt *, +div.nboutput.container div.prompt *, +div.nbinput.container div.input_area pre, +div.nboutput.container div.output_area pre, +div.nbinput.container div.input_area .highlight, +div.nboutput.container div.output_area .highlight { + border: none; + padding: 0; + margin: 0; + box-shadow: none; +} + +div.nbinput.container > div[class*=highlight], +div.nboutput.container > div[class*=highlight] { + margin: 0; +} + +div.nbinput.container div.prompt *, +div.nboutput.container div.prompt * { + background: none; +} + +div.nboutput.container div.output_area .highlight, +div.nboutput.container div.output_area pre { + background: unset; +} + +div.nboutput.container div.output_area div.highlight { + color: unset; /* override Pygments text color */ +} + +/* avoid gaps between output lines */ +div.nboutput.container div[class*=highlight] pre { + line-height: normal; +} + +/* input/output containers */ +div.nbinput.container, +div.nboutput.container { + display: -webkit-flex; + display: flex; + align-items: flex-start; + margin: 0; + width: 100%; +} +@media (max-width: 540px) { + div.nbinput.container, + div.nboutput.container { + flex-direction: column; + } +} + +/* input container */ +div.nbinput.container { + padding-top: 5px; +} + +/* last container */ +div.nblast.container { + padding-bottom: 5px; +} + +/* input prompt */ +div.nbinput.container div.prompt pre, +/* for sphinx_immaterial theme: */ +div.nbinput.container div.prompt pre > code { + color: #307FC1; +} + +/* output prompt */ +div.nboutput.container div.prompt pre, +/* for sphinx_immaterial theme: */ +div.nboutput.container div.prompt pre > code { + color: #BF5B3D; +} + +/* all prompts */ +div.nbinput.container div.prompt, +div.nboutput.container div.prompt { + width: 4.5ex; + padding-top: 5px; + position: relative; + user-select: none; +} + +div.nbinput.container div.prompt > div, +div.nboutput.container div.prompt > div { + position: absolute; + right: 0; + margin-right: 0.3ex; +} + +@media (max-width: 540px) { + div.nbinput.container div.prompt, + div.nboutput.container div.prompt { + width: unset; + text-align: left; + padding: 0.4em; + } + div.nboutput.container div.prompt.empty { + padding: 0; + } + + div.nbinput.container div.prompt > div, + div.nboutput.container div.prompt > div { + position: unset; + } +} + +/* disable scrollbars and line breaks on prompts */ +div.nbinput.container div.prompt pre, +div.nboutput.container div.prompt pre { + overflow: hidden; + white-space: pre; +} + +/* input/output area */ +div.nbinput.container div.input_area, +div.nboutput.container div.output_area { + -webkit-flex: 1; + flex: 1; + overflow: auto; +} +@media (max-width: 540px) { + div.nbinput.container div.input_area, + div.nboutput.container div.output_area { + width: 100%; + } +} + +/* input area */ +div.nbinput.container div.input_area { + border: 1px solid #e0e0e0; + border-radius: 2px; + /*background: #f5f5f5;*/ +} + +/* override MathJax center alignment in output cells */ +div.nboutput.container div[class*=MathJax] { + text-align: left !important; +} + +/* override sphinx.ext.imgmath center alignment in output cells */ +div.nboutput.container div.math p { + text-align: left; +} + +/* standard error */ +div.nboutput.container div.output_area.stderr { + background: #fdd; +} + +/* ANSI colors */ +.ansi-black-fg { color: #3E424D; } +.ansi-black-bg { background-color: #3E424D; } +.ansi-black-intense-fg { color: #282C36; } +.ansi-black-intense-bg { background-color: #282C36; } +.ansi-red-fg { color: #E75C58; } +.ansi-red-bg { background-color: #E75C58; } +.ansi-red-intense-fg { color: #B22B31; } +.ansi-red-intense-bg { background-color: #B22B31; } +.ansi-green-fg { color: #00A250; } +.ansi-green-bg { background-color: #00A250; } +.ansi-green-intense-fg { color: #007427; } +.ansi-green-intense-bg { background-color: #007427; } +.ansi-yellow-fg { color: #DDB62B; } +.ansi-yellow-bg { background-color: #DDB62B; } +.ansi-yellow-intense-fg { color: #B27D12; } +.ansi-yellow-intense-bg { background-color: #B27D12; } +.ansi-blue-fg { color: #208FFB; } +.ansi-blue-bg { background-color: #208FFB; } +.ansi-blue-intense-fg { color: #0065CA; } +.ansi-blue-intense-bg { background-color: #0065CA; } +.ansi-magenta-fg { color: #D160C4; } +.ansi-magenta-bg { background-color: #D160C4; } +.ansi-magenta-intense-fg { color: #A03196; } +.ansi-magenta-intense-bg { background-color: #A03196; } +.ansi-cyan-fg { color: #60C6C8; } +.ansi-cyan-bg { background-color: #60C6C8; } +.ansi-cyan-intense-fg { color: #258F8F; } +.ansi-cyan-intense-bg { background-color: #258F8F; } +.ansi-white-fg { color: #C5C1B4; } +.ansi-white-bg { background-color: #C5C1B4; } +.ansi-white-intense-fg { color: #A1A6B2; } +.ansi-white-intense-bg { background-color: #A1A6B2; } + +.ansi-default-inverse-fg { color: #FFFFFF; } +.ansi-default-inverse-bg { background-color: #000000; } + +.ansi-bold { font-weight: bold; } +.ansi-underline { text-decoration: underline; } + + +div.nbinput.container div.input_area div[class*=highlight] > pre, +div.nboutput.container div.output_area div[class*=highlight] > pre, +div.nboutput.container div.output_area div[class*=highlight].math, +div.nboutput.container div.output_area.rendered_html, +div.nboutput.container div.output_area > div.output_javascript, +div.nboutput.container div.output_area:not(.rendered_html) > img{ + padding: 5px; + margin: 0; +} + +/* fix copybtn overflow problem in chromium (needed for 'sphinx_copybutton') */ +div.nbinput.container div.input_area > div[class^='highlight'], +div.nboutput.container div.output_area > div[class^='highlight']{ + overflow-y: hidden; +} + +/* hide copy button on prompts for 'sphinx_copybutton' extension ... */ +.prompt .copybtn, +/* ... and 'sphinx_immaterial' theme */ +.prompt .md-clipboard.md-icon { + display: none; +} + +/* Some additional styling taken form the Jupyter notebook CSS */ +.jp-RenderedHTMLCommon table, +div.rendered_html table { + border: none; + border-collapse: collapse; + border-spacing: 0; + color: black; + font-size: 12px; + table-layout: fixed; +} +.jp-RenderedHTMLCommon thead, +div.rendered_html thead { + border-bottom: 1px solid black; + vertical-align: bottom; +} +.jp-RenderedHTMLCommon tr, +.jp-RenderedHTMLCommon th, +.jp-RenderedHTMLCommon td, +div.rendered_html tr, +div.rendered_html th, +div.rendered_html td { + text-align: right; + vertical-align: middle; + padding: 0.5em 0.5em; + line-height: normal; + white-space: normal; + max-width: none; + border: none; +} +.jp-RenderedHTMLCommon th, +div.rendered_html th { + font-weight: bold; +} +.jp-RenderedHTMLCommon tbody tr:nth-child(odd), +div.rendered_html tbody tr:nth-child(odd) { + background: #f5f5f5; +} +.jp-RenderedHTMLCommon tbody tr:hover, +div.rendered_html tbody tr:hover { + background: rgba(66, 165, 245, 0.2); +} + diff --git a/_static/nbsphinx-gallery.css b/_static/nbsphinx-gallery.css new file mode 100644 index 0000000..365c27a --- /dev/null +++ b/_static/nbsphinx-gallery.css @@ -0,0 +1,31 @@ +.nbsphinx-gallery { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); + gap: 5px; + margin-top: 1em; + margin-bottom: 1em; +} + +.nbsphinx-gallery > a { + padding: 5px; + border: 1px dotted currentColor; + border-radius: 2px; + text-align: center; +} + +.nbsphinx-gallery > a:hover { + border-style: solid; +} + +.nbsphinx-gallery img { + max-width: 100%; + max-height: 100%; +} + +.nbsphinx-gallery > a > div:first-child { + display: flex; + align-items: start; + justify-content: center; + height: 120px; + margin-bottom: 5px; +} diff --git a/_static/nbsphinx-no-thumbnail.svg b/_static/nbsphinx-no-thumbnail.svg new file mode 100644 index 0000000..9dca758 --- /dev/null +++ b/_static/nbsphinx-no-thumbnail.svg @@ -0,0 +1,9 @@ + + + + diff --git a/_static/plus.png b/_static/plus.png new file mode 100644 index 0000000..7107cec Binary files /dev/null and b/_static/plus.png differ diff --git a/_static/pygments.css b/_static/pygments.css new file mode 100644 index 0000000..84ab303 --- /dev/null +++ b/_static/pygments.css @@ -0,0 +1,75 @@ +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #008000; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #9C6500 } /* Comment.Preproc */ +.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.highlight .gr { color: #E40000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #008400 } /* Generic.Inserted */ +.highlight .go { color: #717171 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #008000 } /* Keyword.Pseudo */ +.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #B00040 } /* Keyword.Type */ +.highlight .m { color: #666666 } /* Literal.Number */ +.highlight .s { color: #BA2121 } /* Literal.String */ +.highlight .na { color: #687822 } /* Name.Attribute */ +.highlight .nb { color: #008000 } /* Name.Builtin */ +.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.highlight .no { color: #880000 } /* Name.Constant */ +.highlight .nd { color: #AA22FF } /* Name.Decorator */ +.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0000FF } /* Name.Function */ +.highlight .nl { color: #767600 } /* Name.Label */ +.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #19177C } /* Name.Variable */ +.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #666666 } /* Literal.Number.Bin */ +.highlight .mf { color: #666666 } /* Literal.Number.Float */ +.highlight .mh { color: #666666 } /* Literal.Number.Hex */ +.highlight .mi { color: #666666 } /* Literal.Number.Integer */ +.highlight .mo { color: #666666 } /* Literal.Number.Oct */ +.highlight .sa { color: #BA2121 } /* Literal.String.Affix */ +.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ +.highlight .sc { color: #BA2121 } /* Literal.String.Char */ +.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ +.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #BA2121 } /* Literal.String.Double */ +.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ +.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ +.highlight .sx { color: #008000 } /* Literal.String.Other */ +.highlight .sr { color: #A45A77 } /* Literal.String.Regex */ +.highlight .s1 { color: #BA2121 } /* Literal.String.Single */ +.highlight .ss { color: #19177C } /* Literal.String.Symbol */ +.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0000FF } /* Name.Function.Magic */ +.highlight .vc { color: #19177C } /* Name.Variable.Class */ +.highlight .vg { color: #19177C } /* Name.Variable.Global */ +.highlight .vi { color: #19177C } /* Name.Variable.Instance */ +.highlight .vm { color: #19177C } /* Name.Variable.Magic */ +.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/_static/searchtools.js b/_static/searchtools.js new file mode 100644 index 0000000..92da3f8 --- /dev/null +++ b/_static/searchtools.js @@ -0,0 +1,619 @@ +/* + * searchtools.js + * ~~~~~~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for the full-text search. + * + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { + var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [docname, title, anchor, descr, score, filename] + // and returns the new score. + /* + score: result => { + const [docname, title, anchor, descr, score, filename] = result + return score + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + partialTitle: 7, + // query found in terms + term: 5, + partialTerm: 2, + }; +} + +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + */ +const _escapeRegExp = (string) => + string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + +const _displayItem = (item, searchTerms, highlightTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; + + const [docName, title, anchor, descr, score, _filename] = item; + + let listItem = document.createElement("li"); + let requestUrl; + let linkUrl; + if (docBuilder === "dirhtml") { + // dirhtml builder + let dirname = docName + "/"; + if (dirname.match(/\/index\/$/)) + dirname = dirname.substring(0, dirname.length - 6); + else if (dirname === "index/") dirname = ""; + requestUrl = contentRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = contentRoot + docName + docFileSuffix; + linkUrl = docName + docLinkSuffix; + } + let linkEl = listItem.appendChild(document.createElement("a")); + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; + linkEl.innerHTML = title; + if (descr) { + listItem.appendChild(document.createElement("span")).innerHTML = + " (" + descr + ")"; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + } + else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms, anchor) + ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + }); + Search.output.appendChild(listItem); +}; +const _finishSearch = (resultCount) => { + Search.stopPulse(); + Search.title.innerText = _("Search Results"); + if (!resultCount) + Search.status.innerText = Documentation.gettext( + "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." + ); + else + Search.status.innerText = _( + "Search finished, found ${resultCount} page(s) matching the search query." + ).replace('${resultCount}', resultCount); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms, + highlightTerms, +) => { + // results left, load the summary and display it + // this is intended to be dynamic (don't sub resultsCount) + if (results.length) { + _displayItem(results.pop(), searchTerms, highlightTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), + 5 + ); + } + // search finished, update title and status message + else _finishSearch(resultCount); +}; +// Helper function used by query() to order search results. +// Each input is an array of [docname, title, anchor, descr, score, filename]. +// Order the results by score (in opposite order of appearance, since the +// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. +const _orderResultsByScoreThenName = (a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; +}; + +/** + * Default splitQuery function. Can be overridden in ``sphinx.search`` with a + * custom function per language. + * + * The regular expression works by splitting the string on consecutive characters + * that are not Unicode letters, numbers, underscores, or emoji characters. + * This is the same as ``\W+`` in Python, preserving the surrogate pair area. + */ +if (typeof splitQuery === "undefined") { + var splitQuery = (query) => query + .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) + .filter(term => term) // remove remaining empty strings +} + +/** + * Search Module + */ +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString, anchor) => { + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + for (const removalQuery of [".headerlinks", "script", "style"]) { + htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); + } + if (anchor) { + const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); + if (anchorContent) return anchorContent.textContent; + + console.warn( + `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` + ); + } + + // if anchor not specified or not found, fall back to main content + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent) return docContent.textContent; + + console.warn( + "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." + ); + return ""; + }, + + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); + }, + + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), + + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); + } + }, + + hasIndex: () => Search._index !== null, + + deferQuery: (query) => (Search._queued_query = query), + + stopPulse: () => (Search._pulse_status = -1), + + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { + Search._pulse_status = (Search._pulse_status + 1) % 4; + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch: (query) => { + // create the required interface elements + const searchText = document.createElement("h2"); + searchText.textContent = _("Searching"); + const searchSummary = document.createElement("p"); + searchSummary.classList.add("search-summary"); + searchSummary.innerText = ""; + const searchList = document.createElement("ul"); + searchList.classList.add("search"); + + const out = document.getElementById("search-results"); + Search.title = out.appendChild(searchText); + Search.dots = Search.title.appendChild(document.createElement("span")); + Search.status = out.appendChild(searchSummary); + Search.output = out.appendChild(searchList); + + const searchProgress = document.getElementById("search-progress"); + // Some themes don't use the search progress node + if (searchProgress) { + searchProgress.innerText = _("Preparing search..."); + } + Search.startPulse(); + + // index already loaded, the browser was quick! + if (Search.hasIndex()) Search.query(query); + else Search.deferQuery(query); + }, + + _parseQuery: (query) => { + // stem the search terms and add them to the correct list + const stemmer = new Stemmer(); + const searchTerms = new Set(); + const excludedTerms = new Set(); + const highlightTerms = new Set(); + const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); + splitQuery(query.trim()).forEach((queryTerm) => { + const queryTermLower = queryTerm.toLowerCase(); + + // maybe skip this "word" + // stopwords array is from language_data.js + if ( + stopwords.indexOf(queryTermLower) !== -1 || + queryTerm.match(/^\d+$/) + ) + return; + + // stem the word + let word = stemmer.stemWord(queryTermLower); + // select the correct list + if (word[0] === "-") excludedTerms.add(word.substr(1)); + else { + searchTerms.add(word); + highlightTerms.add(queryTermLower); + } + }); + + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + + // console.debug("SEARCH: searching for:"); + // console.info("required: ", [...searchTerms]); + // console.info("excluded: ", [...excludedTerms]); + + return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; + }, + + /** + * execute search (requires search index to be loaded) + */ + _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // Collect multiple result groups to be sorted separately and then ordered. + // Each is an array of [docname, title, anchor, descr, score, filename]. + const normalResults = []; + const nonMainIndexResults = []; + + _removeChildren(document.getElementById("search-progress")); + + const queryLower = query.toLowerCase().trim(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + let score = Math.round(100 * queryLower.length / title.length) + normalResults.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { + for (const [file, id, isMain] of foundEntries) { + const score = Math.round(100 * queryLower.length / entry.length); + const result = [ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + ]; + if (isMain) { + normalResults.push(result); + } else { + nonMainIndexResults.push(result); + } + } + } + } + + // lookup as object + objectTerms.forEach((term) => + normalResults.push(...Search.performObjectSearch(term, objectTerms)) + ); + + // lookup as search terms in fulltext + normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + + // let the scorer override scores with a custom scoring function + if (Scorer.score) { + normalResults.forEach((item) => (item[4] = Scorer.score(item))); + nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); + } + + // Sort each group of results by score and then alphabetically by name. + normalResults.sort(_orderResultsByScoreThenName); + nonMainIndexResults.sort(_orderResultsByScoreThenName); + + // Combine the result groups in (reverse) order. + // Non-main index entries are typically arbitrary cross-references, + // so display them after other results. + let results = [...nonMainIndexResults, ...normalResults]; + + // remove duplicate search results + // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept + let seen = new Set(); + results = results.reverse().reduce((acc, result) => { + let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(','); + if (!seen.has(resultStr)) { + acc.push(result); + seen.add(resultStr); + } + return acc; + }, []); + + return results.reverse(); + }, + + query: (query) => { + const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); + const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); + + // for debugging + //Search.lastresults = results.slice(); // a copy + // console.info("search results:", Search.lastresults); + + // print the results + _displayNextItem(results, results.length, searchTerms, highlightTerms); + }, + + /** + * search for object names + */ + performObjectSearch: (object, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const objects = Search._index.objects; + const objNames = Search._index.objnames; + const titles = Search._index.titles; + + const results = []; + + const objectSearchCallback = (prefix, match) => { + const name = match[4] + const fullname = (prefix ? prefix + "." : "") + name; + const fullnameLower = fullname.toLowerCase(); + if (fullnameLower.indexOf(object) < 0) return; + + let score = 0; + const parts = fullnameLower.split("."); + + // check for different match types: exact matches of full name or + // "last name" (i.e. last dotted part) + if (fullnameLower === object || parts.slice(-1)[0] === object) + score += Scorer.objNameMatch; + else if (parts.slice(-1)[0].indexOf(object) > -1) + score += Scorer.objPartialMatch; // matches in last name + + const objName = objNames[match[1]][2]; + const title = titles[match[0]]; + + // If more than one term searched for, we require other words to be + // found in the name/title/description + const otherTerms = new Set(objectTerms); + otherTerms.delete(object); + if (otherTerms.size > 0) { + const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); + if ( + [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) + ) + return; + } + + let anchor = match[3]; + if (anchor === "") anchor = fullname; + else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; + + const descr = objName + _(", in ") + title; + + // add custom score for some objects according to scorer + if (Scorer.objPrio.hasOwnProperty(match[2])) + score += Scorer.objPrio[match[2]]; + else score += Scorer.objPrioDefault; + + results.push([ + docNames[match[0]], + fullname, + "#" + anchor, + descr, + score, + filenames[match[0]], + ]); + }; + Object.keys(objects).forEach((prefix) => + objects[prefix].forEach((array) => + objectSearchCallback(prefix, array) + ) + ); + return results; + }, + + /** + * search for full-text terms in the index + */ + performTermsSearch: (searchTerms, excludedTerms) => { + // prepare search + const terms = Search._index.terms; + const titleTerms = Search._index.titleterms; + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + + const scoreMap = new Map(); + const fileMap = new Map(); + + // perform the search on the required terms + searchTerms.forEach((word) => { + const files = []; + const arr = [ + { files: terms[word], score: Scorer.term }, + { files: titleTerms[word], score: Scorer.title }, + ]; + // add support for partial matches + if (word.length > 2) { + const escapedWord = _escapeRegExp(word); + if (!terms.hasOwnProperty(word)) { + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + } + if (!titleTerms.hasOwnProperty(word)) { + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); + }); + } + } + + // no match but word was a required one + if (arr.every((record) => record.files === undefined)) return; + + // found search word in contents + arr.forEach((record) => { + if (record.files === undefined) return; + + let recordFiles = record.files; + if (recordFiles.length === undefined) recordFiles = [recordFiles]; + files.push(...recordFiles); + + // set score for the word in each file + recordFiles.forEach((file) => { + if (!scoreMap.has(file)) scoreMap.set(file, {}); + scoreMap.get(file)[word] = record.score; + }); + }); + + // create the mapping + files.forEach((file) => { + if (!fileMap.has(file)) fileMap.set(file, [word]); + else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); + }); + }); + + // now check if the files don't contain excluded terms + const results = []; + for (const [file, wordList] of fileMap) { + // check if all requirements are matched + + // as search terms with length < 3 are discarded + const filteredTermCount = [...searchTerms].filter( + (term) => term.length > 2 + ).length; + if ( + wordList.length !== searchTerms.size && + wordList.length !== filteredTermCount + ) + continue; + + // ensure that none of the excluded terms is in the search result + if ( + [...excludedTerms].some( + (term) => + terms[term] === file || + titleTerms[term] === file || + (terms[term] || []).includes(file) || + (titleTerms[term] || []).includes(file) + ) + ) + break; + + // select one (max) score for the file. + const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); + // add result to the result list + results.push([ + docNames[file], + titles[file], + "", + null, + score, + filenames[file], + ]); + } + return results; + }, + + /** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words. + */ + makeSearchSummary: (htmlText, keywords, anchor) => { + const text = Search.htmlToText(htmlText, anchor); + if (text === "") return null; + + const textLower = text.toLowerCase(); + const actualStartPosition = [...keywords] + .map((k) => textLower.indexOf(k.toLowerCase())) + .filter((i) => i > -1) + .slice(-1)[0]; + const startWithContext = Math.max(actualStartPosition - 120, 0); + + const top = startWithContext === 0 ? "" : "..."; + const tail = startWithContext + 240 < text.length ? "..." : ""; + + let summary = document.createElement("p"); + summary.classList.add("context"); + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; + + return summary; + }, +}; + +_ready(Search.init); diff --git a/_static/sphinx_highlight.js b/_static/sphinx_highlight.js new file mode 100644 index 0000000..8a96c69 --- /dev/null +++ b/_static/sphinx_highlight.js @@ -0,0 +1,154 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 && + !parent.classList.contains(className) && + !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + const rest = document.createTextNode(val.substr(pos + text.length)); + parent.insertBefore( + span, + parent.insertBefore( + rest, + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect" + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target) + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms") + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + + // get individual terms from highlight string + const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '" + ) + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms") + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; + if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/genindex.html b/genindex.html new file mode 100644 index 0000000..793b58b --- /dev/null +++ b/genindex.html @@ -0,0 +1,537 @@ + + + + + + Index — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + +

Index

+ +
+ A + | C + | D + | E + | F + | G + | H + | I + | J + | M + | N + | P + | R + | S + | T + | U + | V + | W + +
+

A

+ + +
+ +

C

+ + + +
+ +

D

+ + + +
+ +

E

+ + +
+ +

F

+ + + +
+ +

G

+ + + +
+ +

H

+ + + +
+ +

I

+ + + +
+ +

J

+ + + +
+ +

M

+ + + +
+ +

N

+ + +
+ +

P

+ + + +
+ +

R

+ + +
+ +

S

+ + + +
+ +

T

+ + + +
+ +

U

+ + + +
    +
  • + ugropy.constants + +
  • +
  • + ugropy.core + +
  • +
  • + ugropy.fragmentation_models.fragmentation_model + +
  • +
  • + ugropy.fragmentation_models.gibbs_model + +
  • +
  • + ugropy.fragmentation_models.models + +
  • +
  • + ugropy.fragmentation_models.prop_estimator + +
  • +
+ +

V

+ + + +
+ +

W

+ + + +
+ + + +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..af79293 --- /dev/null +++ b/index.html @@ -0,0 +1,337 @@ + + + + + + + Try ugropy now — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+logo
+

Binder License Python 3.10+ Docs PyPI version

+

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 in an early development stage, leaving issues of examples +of molecules that ugropy fails solving the subgroups of a model is +very helpful.

+

ugropy is tested for Python 3.10, 3.11 and 3.12 on Linux, +Windows and Mac OS.

+
+

Try ugropy now

+

You can try ugropy from its +Binder. Open +the binder.ipynb file to explore the basic features.

+
+
+

Models supported v2.0.5

+
    +
  • Classic liquid-vapor UNIFAC

  • +
  • Predictive Soave-Redlich-Kwong (PSRK)

  • +
  • Joback

  • +
+
+
+

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

+

You can check the full tutorial +here.

+

Get groups from the molecule’s name:

+
from ugropy import Groups
+
+
+hexane = Groups("hexane")
+
+print(hexane.unifac.subgroups)
+print(hexane.psrk.subgroups)
+print(hexane.joback.subgroups)
+
+
+
{'CH3': 2, 'CH2': 4}
+{'CH3': 2, 'CH2': 4}
+{'-CH3': 2, '-CH2-': 4}
+
+
+

Get groups from molecule’s SMILES:

+
propanol = Groups("CCCO", "smiles")
+
+print(propanol.unifac.subgroups)
+print(propanol.psrk.subgroups)
+print(propanol.joback.subgroups)
+
+
+
{'CH3': 1, 'CH2': 2, 'OH': 1}
+{'CH3': 1, 'CH2': 2, 'OH': 1}
+{'-CH3': 1, '-CH2-': 2, '-OH (alcohol)': 1}
+
+
+

Estimate properties with the Joback model!

+
limonene = Groups("limonene")
+
+print(limonene.joback.subgroups)
+print(f"{limonene.joback.critical_temperature} K")
+print(f"{limonene.joback.vapor_pressure(176 + 273.15)} bar")
+
+
+
{'-CH3': 2, '=CH2': 1, '=C<': 1, 'ring-CH2-': 3, 'ring>CH-': 1, 'ring=CH-': 1, 'ring=C<': 1}
+657.4486692170663 K
+1.0254019428522743 bar
+
+
+

Visualize your results! (The next code creates the ugropy logo)

+
from IPython.display import SVG
+
+mol = Groups("CCCC1=C(COC(C)(C)COC(=O)OCC)C=C(CC2=CC=CC=C2)C=C1", "smiles")
+
+svg = mol.unifac.draw(
+    title="ugropy",
+    width=800,
+    height=450,
+    title_font_size=50,
+    legend_font_size=14
+)
+
+SVG(svg)
+
+
+

Write down the +Clapeyron.jl .csv +input files.

+
from ugropy import writers
+
+names = ["limonene", "adrenaline", "Trinitrotoluene"]
+
+grps = [Groups(n) for n in names]
+
+# Write the csv files into a database directory
+writers.to_clapeyron(
+    molecules_names=names,
+    unifac_groups=[g.unifac.subgroups for g in grps],
+    psrk_groups=[g.psrk.subgroups for g in grps],
+    joback_objects=[g.joback for g in grps],
+    path="database"
+)
+
+
+

Obtain the Caleb Bell’s Thermo +subgroups

+
from ugropy import unifac
+
+names = ["hexane", "2-butanone"]
+
+grps = [Groups(n) for n in names]
+
+[writers.to_thermo(g.unifac.subgroups, unifac) for g in grps]
+
+
+
[{1: 2, 2: 4}, {1: 1, 2: 1, 18: 1}]
+
+
+
+
+

Installation

+
pip install ugropy
+
+
+ +
+
+

References

+
+
+
+[1] +

Published Parameters UNIFAC - DDBST GmbH — ddbst.com. http://www.ddbst.com/published-parameters-unifac.html. [Accessed 23-04-2024].

+
+
+[2] +

Juergen Gmehling, Peter Rasmussen, and Aage Fredenslund. Vapor-liquid equilibriums by UNIFAC group contribution. Revision and extension. 2. Industrial & Engineering Chemistry Process Design and Development, 21(1):118–127, January 1982. doi:10.1021/i200016a021.

+
+
+[3] +

Henrik K. Hansen, Peter Rasmussen, Aage Fredenslund, Martin Schiller, and Juergen Gmehling. Vapor-liquid equilibria by UNIFAC group contribution. 5. Revision and extension. Industrial & Engineering Chemistry Research, 30(10):2352–2355, October 1991. doi:10.1021/ie00058a017.

+
+
+[4] +

Eugenia Almeida Macedo, Ulrich Weidlich, Juergen Gmehling, and Peter Rasmussen. Vapor-liquid equilibriums by UNIFAC group contribution. Revision and extension. 3. Industrial & Engineering Chemistry Process Design and Development, 22(4):676–678, October 1983. doi:10.1021/i200023a023.

+
+
+[5] +

Steen Skjold-Jorgensen, Barbel Kolbe, Jurgen Gmehling, and Peter Rasmussen. Vapor-Liquid Equilibria by UNIFAC Group Contribution. Revision and Extension. Industrial & Engineering Chemistry Process Design and Development, 18(4):714–722, October 1979. doi:10.1021/i260072a024.

+
+
+[6] +

Detlef Tiegs, Peter Rasmussen, Juergen Gmehling, and Aage Fredenslund. Vapor-liquid equilibria by UNIFAC group contribution. 4. Revision and extension. Industrial & Engineering Chemistry Research, 26(1):159–161, January 1987. doi:10.1021/ie00061a030.

+
+
+[7] +

Roland Wittig, Jürgen Lohmann, and Jürgen Gmehling. Vapor-Liquid Equilibria by UNIFAC Group Contribution. 6. Revision and Extension. Industrial & Engineering Chemistry Research, 42(1):183–188, January 2003. doi:10.1021/ie020506l.

+
+
+[8] +

T. Holderbaum and J. Gmehling. PSRK: A Group Contribution Equation of State Based on UNIFAC. Fluid Phase Equilibria, 70(2-3):251–265, December 1991. doi:10.1016/0378-3812(91)85038-V.

+
+
+[9] +

Sven Horstmann, Anna Jabłoniec, Jörg Krafczyk, Kai Fischer, and Jürgen Gmehling. PSRK group contribution equation of state: comprehensive revision and extension IV, including critical constants and α-function parameters for 1000 components. Fluid Phase Equilibria, 227(2):157–164, January 2005. doi:10.1016/j.fluid.2004.11.002.

+
+
+[10] +

Kevin G Joback. Designing Molecules Possessing Desired Physical Property Values. Thesis (Ph. D.), Massachusetts Institute of Technology, Cambridge, Massachusetts, 1989.

+
+
+[11] +

K.G. Joback and R.C. Reid. ESTIMATION OF PURE-COMPONENT PROPERTIES FROM GROUP-CONTRIBUTIONS. Chemical Engineering Communications, 57(1-6):233–243, July 1987. doi:10.1080/00986448708960487.

+
+
+
+
+
+

Indices and tables

+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/modules.html b/modules.html new file mode 100644 index 0000000..8777e2f --- /dev/null +++ b/modules.html @@ -0,0 +1,140 @@ + + + + + + + API — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+ + +
+
+
+
+ + + + \ No newline at end of file diff --git a/objects.inv b/objects.inv new file mode 100644 index 0000000..59b8640 Binary files /dev/null and b/objects.inv differ diff --git a/py-modindex.html b/py-modindex.html new file mode 100644 index 0000000..39f6e32 --- /dev/null +++ b/py-modindex.html @@ -0,0 +1,175 @@ + + + + + + Python Module Index — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + +

Python Module Index

+ +
+ u +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ u
+ ugropy +
    + ugropy.constants +
    + ugropy.core +
    + ugropy.fragmentation_models.fragmentation_model +
    + ugropy.fragmentation_models.gibbs_model +
    + ugropy.fragmentation_models.models +
    + ugropy.fragmentation_models.prop_estimator +
    + ugropy.groups +
    + ugropy.properties +
    + ugropy.writers +
    + ugropy.writers.clapeyron_writers +
+ + +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/search.html b/search.html new file mode 100644 index 0000000..979a0b0 --- /dev/null +++ b/search.html @@ -0,0 +1,125 @@ + + + + + + Search — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + + + +
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2023, Salvador Eduardo Brandolín.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/searchindex.js b/searchindex.js new file mode 100644 index 0000000..ab8a735 --- /dev/null +++ b/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"alltitles": {"API": [[2, "api"]], "Available Models": [[9, "module-ugropy.fragmentation_models.models"]], "Clapeyron (https://github.com/ClapeyronThermo/Clapeyron.jl)": [[8, "Clapeyron-(https://github.com/ClapeyronThermo/Clapeyron.jl)"]], "Clapeyron writers": [[9, "module-ugropy.writers.clapeyron_writers"]], "Constants": [[9, "module-ugropy.constants"]], "Contents:": [[1, null]], "Core": [[9, "module-ugropy.core"]], "Example of use": [[0, "example-of-use"], [1, "example-of-use"]], "Failing": [[7, "Failing"]], "Fragmentation Models": [[9, "module-ugropy.fragmentation_models.fragmentation_model"]], "Gibbs Models": [[9, "module-ugropy.fragmentation_models.gibbs_model"]], "Groups": [[9, "module-ugropy.groups"]], "Indices and tables": [[1, "indices-and-tables"]], "Installation": [[0, "installation"], [1, "installation"], [5, "Installation"]], "Joback": [[4, "Joback"]], "Models supported v2.0.5": [[0, "models-supported-v2-0-5"], [1, "models-supported-v2-0-5"]], "More than one solution": [[7, "More-than-one-solution"]], "Properties": [[9, "module-ugropy.properties"]], "Properties Estimators": [[9, "module-ugropy.fragmentation_models.prop_estimator"]], "References": [[1, "references"]], "The Groups class": [[3, "The-Groups-class"]], "The Hard? way": [[4, "The-Hard?-way"]], "The easy way": [[3, "The-easy-way"]], "The get_groups function": [[4, "The-get_groups-function"]], "Thermo (https://github.com/CalebBell/thermo)": [[8, "Thermo-(https://github.com/CalebBell/thermo)"]], "Try ugropy now": [[0, "try-ugropy-now"], [1, "try-ugropy-now"]], "Tutorial": [[6, "tutorial"]], "WARNING": [[3, "WARNING"]], "Writers": [[0, "writers"], [1, "writers"], [8, "Writers"], [9, "module-ugropy.writers"]]}, "docnames": ["README", "index", "modules", "tutorial/easy_way", "tutorial/hard_way", "tutorial/installation", "tutorial/tutorial", "tutorial/ugropy_failing", "tutorial/writers", "ugropy"], "envversion": {"nbsphinx": 4, "sphinx": 61, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.viewcode": 1, "sphinxcontrib.bibtex": 9}, "filenames": ["README.rst", "index.rst", "modules.rst", "tutorial/easy_way.ipynb", "tutorial/hard_way.ipynb", "tutorial/installation.ipynb", "tutorial/tutorial.rst", "tutorial/ugropy_failing.ipynb", "tutorial/writers.ipynb", "ugropy.rst"], "indexentries": {"acentric_factor (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.acentric_factor", false]], "check_can_fit_atoms() (in module ugropy.core)": [[9, "ugropy.core.check_can_fit_atoms", false]], "check_has_composed() (in module ugropy.core)": [[9, "ugropy.core.check_has_composed", false]], "check_has_composed_overlapping() (in module ugropy.core)": [[9, "ugropy.core.check_has_composed_overlapping", false]], "check_has_hiden() (in module ugropy.core)": [[9, "ugropy.core.check_has_hiden", false]], "check_has_molecular_weight_right() (in module ugropy.core)": [[9, "ugropy.core.check_has_molecular_weight_right", false]], "contribution_matrix (ugropy.fragmentation_models.fragmentation_model.fragmentationmodel attribute)": [[9, "ugropy.fragmentation_models.fragmentation_model.FragmentationModel.contribution_matrix", false]], "contribution_matrix (ugropy.fragmentation_models.gibbs_model.gibbsmodel attribute)": [[9, "ugropy.fragmentation_models.gibbs_model.GibbsModel.contribution_matrix", false]], "contribution_matrix (ugropy.fragmentation_models.prop_estimator.propertiesestimator attribute)": [[9, "ugropy.fragmentation_models.prop_estimator.PropertiesEstimator.contribution_matrix", false]], "correct_composed() (in module ugropy.core)": [[9, "ugropy.core.correct_composed", false]], "correct_problematics() (in module ugropy.core)": [[9, "ugropy.core.correct_problematics", false]], "critical_pressure (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.critical_pressure", false]], "critical_temperature (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.critical_temperature", false]], "critical_volume (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.critical_volume", false]], "detection_mols (ugropy.fragmentation_models.fragmentation_model.fragmentationmodel attribute)": [[9, "ugropy.fragmentation_models.fragmentation_model.FragmentationModel.detection_mols", false]], "detection_mols (ugropy.fragmentation_models.gibbs_model.gibbsmodel attribute)": [[9, "ugropy.fragmentation_models.gibbs_model.GibbsModel.detection_mols", false]], "detection_mols (ugropy.fragmentation_models.prop_estimator.propertiesestimator attribute)": [[9, "ugropy.fragmentation_models.prop_estimator.PropertiesEstimator.detection_mols", false]], "draw() (in module ugropy.core)": [[9, "ugropy.core.draw", false]], "experimental_boiling_temperature (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.experimental_boiling_temperature", false]], "fit_atoms() (in module ugropy.core)": [[9, "ugropy.core.fit_atoms", false]], "fit_mols (ugropy.fragmentation_models.fragmentation_model.fragmentationmodel attribute)": [[9, "ugropy.fragmentation_models.fragmentation_model.FragmentationModel.fit_mols", false]], "fit_mols (ugropy.fragmentation_models.gibbs_model.gibbsmodel attribute)": [[9, "ugropy.fragmentation_models.gibbs_model.GibbsModel.fit_mols", false]], "fit_mols (ugropy.fragmentation_models.prop_estimator.propertiesestimator attribute)": [[9, "ugropy.fragmentation_models.prop_estimator.PropertiesEstimator.fit_mols", false]], "fragmentationmodel (class in ugropy.fragmentation_models.fragmentation_model)": [[9, "ugropy.fragmentation_models.fragmentation_model.FragmentationModel", false]], "fusion_temperature (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.fusion_temperature", false]], "g_formation (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.g_formation", false]], "get_groups() (in module ugropy.core)": [[9, "ugropy.core.get_groups", false]], "gibbsmodel (class in ugropy.fragmentation_models.gibbs_model)": [[9, "ugropy.fragmentation_models.gibbs_model.GibbsModel", false]], "groups (class in ugropy.groups)": [[9, "ugropy.groups.Groups", false]], "h_formation (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.h_formation", false]], "h_fusion (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.h_fusion", false]], "h_vaporization (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.h_vaporization", false]], "heat_capacity_ideal_gas() (ugropy.properties.jobackproperties method)": [[9, "ugropy.properties.JobackProperties.heat_capacity_ideal_gas", false]], "heat_capacity_ideal_gas_params (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.heat_capacity_ideal_gas_params", false]], "heat_capacity_liquid() (ugropy.properties.jobackproperties method)": [[9, "ugropy.properties.JobackProperties.heat_capacity_liquid", false]], "hideouts (ugropy.fragmentation_models.fragmentation_model.fragmentationmodel attribute)": [[9, "ugropy.fragmentation_models.fragmentation_model.FragmentationModel.hideouts", false]], "hideouts (ugropy.fragmentation_models.gibbs_model.gibbsmodel attribute)": [[9, "ugropy.fragmentation_models.gibbs_model.GibbsModel.hideouts", false]], "hideouts (ugropy.fragmentation_models.prop_estimator.propertiesestimator attribute)": [[9, "ugropy.fragmentation_models.prop_estimator.PropertiesEstimator.hideouts", false]], "identifier (ugropy.groups.groups attribute)": [[9, "ugropy.groups.Groups.identifier", false]], "identifier_type (ugropy.groups.groups attribute)": [[9, "ugropy.groups.Groups.identifier_type", false]], "instantiate_mol_object() (in module ugropy.core)": [[9, "ugropy.core.instantiate_mol_object", false]], "joback (in module ugropy.fragmentation_models.models)": [[9, "ugropy.fragmentation_models.models.joback", false]], "joback (ugropy.groups.groups attribute)": [[9, "ugropy.groups.Groups.joback", false]], "jobackproperties (class in ugropy.properties)": [[9, "ugropy.properties.JobackProperties", false]], "main_groups (ugropy.fragmentation_models.gibbs_model.gibbsmodel attribute)": [[9, "ugropy.fragmentation_models.gibbs_model.GibbsModel.main_groups", false]], "module": [[9, "module-ugropy.constants", false], [9, "module-ugropy.core", false], [9, "module-ugropy.fragmentation_models.fragmentation_model", false], [9, "module-ugropy.fragmentation_models.gibbs_model", false], [9, "module-ugropy.fragmentation_models.models", false], [9, "module-ugropy.fragmentation_models.prop_estimator", false], [9, "module-ugropy.groups", false], [9, "module-ugropy.properties", false], [9, "module-ugropy.writers", false], [9, "module-ugropy.writers.clapeyron_writers", false]], "mol_object (ugropy.groups.groups attribute)": [[9, "ugropy.groups.Groups.mol_object", false]], "molecular_weight (ugropy.groups.groups attribute)": [[9, "ugropy.groups.Groups.molecular_weight", false]], "molecular_weight (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.molecular_weight", false]], "normal_boiling_point (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.normal_boiling_point", false]], "problematic_structures (ugropy.fragmentation_models.fragmentation_model.fragmentationmodel attribute)": [[9, "ugropy.fragmentation_models.fragmentation_model.FragmentationModel.problematic_structures", false]], "problematic_structures (ugropy.fragmentation_models.gibbs_model.gibbsmodel attribute)": [[9, "ugropy.fragmentation_models.gibbs_model.GibbsModel.problematic_structures", false]], "problematic_structures (ugropy.fragmentation_models.prop_estimator.propertiesestimator attribute)": [[9, "ugropy.fragmentation_models.prop_estimator.PropertiesEstimator.problematic_structures", false]], "properties_contributions (ugropy.fragmentation_models.prop_estimator.propertiesestimator attribute)": [[9, "ugropy.fragmentation_models.prop_estimator.PropertiesEstimator.properties_contributions", false]], "propertiesestimator (class in ugropy.fragmentation_models.prop_estimator)": [[9, "ugropy.fragmentation_models.prop_estimator.PropertiesEstimator", false]], "psrk (in module ugropy.fragmentation_models.models)": [[9, "ugropy.fragmentation_models.models.psrk", false]], "psrk (ugropy.groups.groups attribute)": [[9, "ugropy.groups.Groups.psrk", false]], "r (in module ugropy.constants)": [[9, "ugropy.constants.R", false]], "split_detection_smarts (ugropy.fragmentation_models.fragmentation_model.fragmentationmodel attribute)": [[9, "ugropy.fragmentation_models.fragmentation_model.FragmentationModel.split_detection_smarts", false]], "split_detection_smarts (ugropy.fragmentation_models.gibbs_model.gibbsmodel attribute)": [[9, "ugropy.fragmentation_models.gibbs_model.GibbsModel.split_detection_smarts", false]], "split_detection_smarts (ugropy.fragmentation_models.prop_estimator.propertiesestimator attribute)": [[9, "ugropy.fragmentation_models.prop_estimator.PropertiesEstimator.split_detection_smarts", false]], "subgroups (ugropy.fragmentation_models.fragmentation_model.fragmentationmodel attribute)": [[9, "ugropy.fragmentation_models.fragmentation_model.FragmentationModel.subgroups", false]], "subgroups (ugropy.fragmentation_models.gibbs_model.gibbsmodel attribute)": [[9, "ugropy.fragmentation_models.gibbs_model.GibbsModel.subgroups", false]], "subgroups (ugropy.fragmentation_models.prop_estimator.propertiesestimator attribute)": [[9, "ugropy.fragmentation_models.prop_estimator.PropertiesEstimator.subgroups", false]], "subgroups (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.subgroups", false]], "subgroups_info (ugropy.fragmentation_models.gibbs_model.gibbsmodel attribute)": [[9, "ugropy.fragmentation_models.gibbs_model.GibbsModel.subgroups_info", false]], "sum_na (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.sum_na", false]], "sum_nb (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.sum_nb", false]], "to_clapeyron() (in module ugropy.writers)": [[9, "ugropy.writers.to_clapeyron", false]], "to_thermo() (in module ugropy.writers)": [[9, "ugropy.writers.to_thermo", false]], "ugropy.constants": [[9, "module-ugropy.constants", false]], "ugropy.core": [[9, "module-ugropy.core", false]], "ugropy.fragmentation_models.fragmentation_model": [[9, "module-ugropy.fragmentation_models.fragmentation_model", false]], "ugropy.fragmentation_models.gibbs_model": [[9, "module-ugropy.fragmentation_models.gibbs_model", false]], "ugropy.fragmentation_models.models": [[9, "module-ugropy.fragmentation_models.models", false]], "ugropy.fragmentation_models.prop_estimator": [[9, "module-ugropy.fragmentation_models.prop_estimator", false]], "ugropy.groups": [[9, "module-ugropy.groups", false]], "ugropy.properties": [[9, "module-ugropy.properties", false]], "ugropy.writers": [[9, "module-ugropy.writers", false]], "ugropy.writers.clapeyron_writers": [[9, "module-ugropy.writers.clapeyron_writers", false]], "unifac (in module ugropy.fragmentation_models.models)": [[9, "ugropy.fragmentation_models.models.unifac", false]], "unifac (ugropy.groups.groups attribute)": [[9, "ugropy.groups.Groups.unifac", false]], "vapor_pressure() (ugropy.properties.jobackproperties method)": [[9, "ugropy.properties.JobackProperties.vapor_pressure", false]], "vapor_pressure_params (ugropy.properties.jobackproperties attribute)": [[9, "ugropy.properties.JobackProperties.vapor_pressure_params", false]], "viscosity_liquid() (ugropy.properties.jobackproperties method)": [[9, "ugropy.properties.JobackProperties.viscosity_liquid", false]], "write_critical() (in module ugropy.writers.clapeyron_writers)": [[9, "ugropy.writers.clapeyron_writers.write_critical", false]], "write_molar_mass() (in module ugropy.writers.clapeyron_writers)": [[9, "ugropy.writers.clapeyron_writers.write_molar_mass", false]], "write_psrk() (in module ugropy.writers.clapeyron_writers)": [[9, "ugropy.writers.clapeyron_writers.write_psrk", false]], "write_unifac() (in module ugropy.writers.clapeyron_writers)": [[9, "ugropy.writers.clapeyron_writers.write_unifac", false]]}, "objects": {"ugropy": [[9, 0, 0, "-", "constants"], [9, 0, 0, "-", "core"], [9, 0, 0, "-", "groups"], [9, 0, 0, "-", "properties"], [9, 0, 0, "-", "writers"]], "ugropy.constants": [[9, 1, 1, "", "R"]], "ugropy.core": [[9, 2, 1, "", "check_can_fit_atoms"], [9, 2, 1, "", "check_has_composed"], [9, 2, 1, "", "check_has_composed_overlapping"], [9, 2, 1, "", "check_has_hiden"], [9, 2, 1, "", "check_has_molecular_weight_right"], [9, 2, 1, "", "correct_composed"], [9, 2, 1, "", "correct_problematics"], [9, 2, 1, "", "draw"], [9, 2, 1, "", "fit_atoms"], [9, 2, 1, "", "get_groups"], [9, 2, 1, "", "instantiate_mol_object"]], "ugropy.fragmentation_models": [[9, 0, 0, "-", "fragmentation_model"], [9, 0, 0, "-", "gibbs_model"], [9, 0, 0, "-", "models"], [9, 0, 0, "-", "prop_estimator"]], "ugropy.fragmentation_models.fragmentation_model": [[9, 3, 1, "", "FragmentationModel"]], "ugropy.fragmentation_models.fragmentation_model.FragmentationModel": [[9, 1, 1, "", "contribution_matrix"], [9, 1, 1, "", "detection_mols"], [9, 1, 1, "", "fit_mols"], [9, 1, 1, "", "hideouts"], [9, 1, 1, "", "problematic_structures"], [9, 1, 1, "", "split_detection_smarts"], [9, 1, 1, "", "subgroups"]], "ugropy.fragmentation_models.gibbs_model": [[9, 3, 1, "", "GibbsModel"]], "ugropy.fragmentation_models.gibbs_model.GibbsModel": [[9, 1, 1, "", "contribution_matrix"], [9, 1, 1, "", "detection_mols"], [9, 1, 1, "", "fit_mols"], [9, 1, 1, "", "hideouts"], [9, 1, 1, "", "main_groups"], [9, 1, 1, "", "problematic_structures"], [9, 1, 1, "", "split_detection_smarts"], [9, 1, 1, "", "subgroups"], [9, 1, 1, "", "subgroups_info"]], "ugropy.fragmentation_models.models": [[9, 1, 1, "", "joback"], [9, 1, 1, "", "psrk"], [9, 1, 1, "", "unifac"]], "ugropy.fragmentation_models.prop_estimator": [[9, 3, 1, "", "PropertiesEstimator"]], "ugropy.fragmentation_models.prop_estimator.PropertiesEstimator": [[9, 1, 1, "", "contribution_matrix"], [9, 1, 1, "", "detection_mols"], [9, 1, 1, "", "fit_mols"], [9, 1, 1, "", "hideouts"], [9, 1, 1, "", "problematic_structures"], [9, 1, 1, "", "properties_contributions"], [9, 1, 1, "", "split_detection_smarts"], [9, 1, 1, "", "subgroups"]], "ugropy.groups": [[9, 3, 1, "", "Groups"]], "ugropy.groups.Groups": [[9, 1, 1, "", "identifier"], [9, 1, 1, "", "identifier_type"], [9, 1, 1, "", "joback"], [9, 1, 1, "", "mol_object"], [9, 1, 1, "", "molecular_weight"], [9, 1, 1, "", "psrk"], [9, 1, 1, "", "unifac"]], "ugropy.properties": [[9, 3, 1, "", "JobackProperties"]], "ugropy.properties.JobackProperties": [[9, 1, 1, "", "acentric_factor"], [9, 1, 1, "", "critical_pressure"], [9, 1, 1, "", "critical_temperature"], [9, 1, 1, "", "critical_volume"], [9, 1, 1, "", "experimental_boiling_temperature"], [9, 1, 1, "", "fusion_temperature"], [9, 1, 1, "", "g_formation"], [9, 1, 1, "", "h_formation"], [9, 1, 1, "", "h_fusion"], [9, 1, 1, "", "h_vaporization"], [9, 4, 1, "", "heat_capacity_ideal_gas"], [9, 1, 1, "", "heat_capacity_ideal_gas_params"], [9, 4, 1, "", "heat_capacity_liquid"], [9, 1, 1, "", "molecular_weight"], [9, 1, 1, "", "normal_boiling_point"], [9, 1, 1, "", "subgroups"], [9, 1, 1, "", "sum_na"], [9, 1, 1, "", "sum_nb"], [9, 4, 1, "", "vapor_pressure"], [9, 1, 1, "", "vapor_pressure_params"], [9, 4, 1, "", "viscosity_liquid"]], "ugropy.writers": [[9, 0, 0, "-", "clapeyron_writers"], [9, 2, 1, "", "to_clapeyron"], [9, 2, 1, "", "to_thermo"]], "ugropy.writers.clapeyron_writers": [[9, 2, 1, "", "write_critical"], [9, 2, 1, "", "write_molar_mass"], [9, 2, 1, "", "write_psrk"], [9, 2, 1, "", "write_unifac"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "attribute", "Python attribute"], "2": ["py", "function", "Python function"], "3": ["py", "class", "Python class"], "4": ["py", "method", "Python method"]}, "objtypes": {"0": "py:module", "1": "py:attribute", "2": "py:function", "3": "py:class", "4": "py:method"}, "terms": {"": [0, 1, 3, 4, 7, 8, 9], "0": [8, 9], "002": 1, "00986448708960487": [1, 4], "01100": 7, "01700": 7, "01900": 7, "0254019428522743": [0, 1], "02700": 7, "03500": 7, "0378": 1, "04": 1, "04600": 7, "070992245923176": 4, "07820": 7, "1": [0, 1, 3, 4, 7, 8, 9], "10": [0, 1, 3, 4, 9], "1000": 1, "1016": 1, "1021": 1, "1057222260526": 4, "1080": [1, 4], "10840": 7, "11": [0, 1, 3, 4, 9], "113": 7, "11620": 7, "118": 1, "12": [0, 1, 3, 4, 7, 9], "127": 1, "13": 7, "14": [0, 1, 7], "15": [0, 1, 7, 8], "157": 1, "159": 1, "161": 1, "164": 1, "1671746814928": 4, "176": [0, 1], "18": [0, 1, 8], "183": 1, "188": 1, "1979": 1, "1982": 1, "1983": 1, "1987": 1, "1989": 1, "1991": 1, "2": [0, 1, 3, 4, 7, 8, 9], "200": [3, 9], "2003": 1, "2004": 1, "2005": 1, "2024": 1, "21": 1, "22": 1, "225": 3, "227": 1, "23": 1, "233": 1, "2352": 1, "2355": 1, "243": 1, "251": 1, "26": 1, "265": 1, "27": 7, "273": [0, 1, 8], "279": 7, "285": 7, "298": [4, 9], "2su": 7, "3": [0, 1, 3, 4, 7, 8, 9], "30": 1, "31": 4, "34": [3, 4], "3646545010104223": 8, "3812": 1, "39": [3, 4, 7], "3h3": 3, "4": [0, 1, 3, 4, 7, 8, 9], "400": [3, 9], "408": 7, "42": [1, 7], "4276025835624184": 8, "442": 7, "443": 4, "447": 4, "4486692170663": [0, 1], "450": [0, 1], "47": 3, "5": [3, 4, 7, 8, 9], "50": [0, 1], "516": 3, "57": 1, "6": [1, 3, 4, 7, 9], "60": 8, "600": [3, 4], "657": [0, 1], "675": 4, "676": 1, "678": 1, "68": 7, "681": 4, "685": 4, "6h2": 3, "7": [1, 3, 4, 7, 9], "70": 1, "714": 1, "722": 1, "8": [1, 3, 4, 7, 9], "800": [0, 1, 7], "800000000000004": 4, "85038": 1, "9": [1, 3, 4, 7, 9], "91": [1, 7], "91784": 7, "92": 7, "9h": 3, "A": [1, 9], "As": [3, 4], "But": 9, "By": 9, "For": [3, 4, 7, 9], "If": [0, 1, 3, 4, 7, 8, 9], "In": [0, 1, 4, 7, 8, 9], "OF": 1, "Or": 3, "That": 3, "The": [0, 1, 6, 7, 8, 9], "Then": 8, "These": 8, "To": 8, "With": 9, "_scalartype_co": 9, "aag": 1, "ac": [7, 9], "access": [1, 3], "acch": 9, "acch2": [7, 9], "accord": 3, "accur": 7, "acentr": [3, 4, 9], "acentric_factor": [4, 9], "ach": 7, "acoh": 7, "activity_coeffici": 8, "addit": [4, 9], "adrenalin": [0, 1, 8], "against": 7, "alcohol": [0, 1, 7], "aldehyd": 3, "algorithm": [7, 9], "all": [3, 4, 7, 8, 9], "allclos": 9, "allow": [0, 1], "almeida": 1, "along": [3, 7], "also": [3, 4, 8, 9], "altern": 7, "ambigu": 9, "an": [0, 1, 3, 4, 7, 9], "ani": [7, 9], "anna": 1, "api": [1, 3], "approach": 7, "ar": [3, 4, 7, 9], "aramet": 1, "argument": [3, 8], "aromat": 7, "articl": 4, "assign": 9, "atol": 9, "atom": [7, 9], "attach": 7, "attribut": [3, 4], "avail": [1, 2], "bar": [0, 1, 4, 9], "barbel": 1, "base": [1, 9], "basic": [0, 1], "batch": 9, "batch1": 9, "batch1_ogunifac_group": 9, "batch_nam": 9, "becaus": 3, "bell": [0, 1, 9], "best": 7, "binder": [0, 1], "boil": [3, 4, 9], "bondi": 9, "bool": 9, "both": [0, 1, 7, 9], "bound": 7, "bti": 7, "bug": 7, "built": 9, "butanon": [0, 1, 8], "c": [0, 1, 3, 4, 7, 9], "c1": [0, 1, 3, 7, 9], "c10h14o": 3, "c2": [0, 1], "c5h4n": 4, "calcul": [3, 4, 9], "caleb": [0, 1, 9], "calebbel": 9, "cambridg": 1, "can": [0, 1, 3, 4, 7, 8, 9], "cannot": 7, "canon": 3, "capac": [4, 9], "carbon": 7, "carvon": [3, 4], "case": [0, 1, 4, 7, 8, 9], "cc": [0, 1, 7, 9], "cc1": 3, "cc2": [0, 1], "ccc": 3, "cccc1": [0, 1, 7, 9], "cccccc": [3, 4, 9], "ccco": [0, 1], "certain": [7, 8], "cf3": 7, "ch": [0, 1, 3, 4, 7, 9], "ch0": 7, "ch2": [0, 1, 3, 4, 7, 9], "ch2chsu": 7, "ch2co": 3, "ch2coo": 7, "ch2o": 9, "ch3": [0, 1, 3, 4, 7, 9], "ch3n": 4, "chang": 3, "check": [0, 1, 3, 4, 7, 9], "check_can_fit_atom": 9, "check_has_compos": 9, "check_has_composed_overlap": 9, "check_has_hiden": 9, "check_has_molecular_weight_right": 9, "chem": [3, 4, 7, 9], "chemgroup": 8, "chemic": [1, 9], "chemistri": 1, "clapeyron": [0, 1, 2, 3], "clapeyron_writ": 9, "clapeyronthermo": [3, 9], "class": [4, 9], "classic": [0, 1, 3, 7, 9], "cm\u00b3": [4, 9], "coc": [0, 1, 9], "code": [0, 1, 3, 4, 7], "column": [7, 9], "com": [1, 3, 9], "combin": 9, "combinatori": 9, "commun": 1, "compar": [7, 9], "complet": 3, "compon": 1, "compos": [7, 9], "comprehens": [1, 8], "comput": 9, "consist": 3, "constant": [1, 2], "construct": [8, 9], "contain": [3, 7, 8, 9], "context": 4, "contribut": [0, 1, 3, 4, 7, 9], "contribution_matrix": 9, "convert": [0, 1], "coo": 7, "core": [1, 2, 3], "correct": [7, 9], "correct_compos": 9, "correct_problemat": 9, "correspond": 9, "cotain": 9, "could": [4, 7], "count": 9, "cours": 7, "creat": [0, 1, 3, 8, 9], "critic": [1, 3, 4, 8, 9], "critical_pressur": [4, 9], "critical_temperatur": [0, 1, 4, 9], "critical_volum": [4, 9], "csv": [0, 1, 8, 9], "current": [3, 7], "cx2h0": 7, "cx4h": 7, "cx4h0": 7, "cx4h2": 7, "cx4h3": 7, "d": 1, "databas": [0, 1, 8, 9], "datafram": 9, "ddbst": 1, "de": 9, "decemb": 1, "decompos": 9, "decomposit": 9, "dedic": 9, "default": [3, 4, 9], "defautl": 9, "defin": 3, "depend": 7, "descriptor": [3, 9], "design": 1, "desir": [1, 8], "detect": 9, "detection_mol": 9, "detection_smart": [7, 9], "determin": 7, "detlef": 1, "develop": [0, 1], "dichlorobenzen": 4, "dict": [4, 9], "dictionari": [4, 7, 8, 9], "differ": [0, 1, 3, 7, 8, 9], "directli": [3, 4, 9], "directori": [0, 1, 8, 9], "discov": 7, "discuss": 3, "displai": [0, 1, 3, 4, 7], "do": [3, 4, 5], "docstr": [3, 4], "document": [3, 4, 8], "doi": [1, 4], "don": 4, "dortmund": 9, "down": [0, 1], "draw": [0, 1, 3, 4, 7, 9], "dtype": 9, "due": [7, 9], "e": 3, "each": [7, 8, 9], "earli": [0, 1], "easi": [1, 4, 6, 9], "eg": 9, "either": [7, 9], "emploi": 3, "empti": [7, 9], "encount": 7, "energi": [4, 9], "engin": 1, "enthalpi": [4, 9], "equal": 9, "equat": [1, 4, 9], "equilibria": 1, "equilibrium": 1, "error": [4, 7], "ester": 7, "estim": [0, 1, 2, 3, 4], "etc": 3, "ether": 3, "eugenia": 1, "examin": [4, 7], "exampl": [3, 4, 7, 8, 9], "excess": 9, "exp_nbt": 4, "experiment": [4, 9], "experimental_boiling_temperatur": 9, "explan": 4, "explor": [0, 1, 3], "extens": 1, "f": [0, 1, 3, 4, 7], "factor": [3, 4, 9], "fail": [0, 1, 6], "failur": 7, "fals": 9, "familiar": 3, "featur": [0, 1], "feel": 7, "fight": 9, "figur": 3, "file": [0, 1, 3, 4, 8, 9], "final": 3, "find": [7, 9], "fischer": 1, "fit": 9, "fit_atom": 9, "fit_mol": 9, "float": [3, 4, 9], "fluid": 1, "follow": [0, 1, 3, 4, 7, 8], "font": [3, 9], "form": 7, "format": [0, 1, 3, 4, 9], "found": 7, "fragment": [1, 2, 3, 4], "fragmentation_model": [4, 9], "fragmentation_object": 3, "fragmentationmodel": [3, 4, 9], "fragmentationmodul": 9, "fredenslund": 1, "free": [7, 9], "from": [0, 1, 3, 4, 7, 8, 9], "from_subgroup": 8, "full": [0, 1, 3, 4], "funcion": 3, "function": [0, 1, 3, 7, 8, 9], "further": 4, "fusion": [4, 9], "fusion_temperatur": [4, 9], "g": [0, 1, 3, 4, 8, 9], "g_format": [4, 9], "ga": [4, 9], "gamma": 8, "ge": 8, "get": [0, 1], "get_group": [7, 9], "gibb": [1, 2, 4], "gibbs_model": 9, "gibbsmodel": 9, "github": [3, 9], "given": [0, 1], "gmehl": 1, "graph": [3, 9], "group": [0, 1, 2, 4, 7, 8], "grp": [0, 1, 8], "gt": [3, 4], "h": 1, "h4": 3, "h_format": [4, 9], "h_fusion": [4, 9], "h_vapor": [4, 9], "ha": [3, 9], "half": 9, "hansen": 1, "hard": [1, 6], "have": [4, 7, 9], "hco": 3, "heat": [4, 9], "heat_capacity_ideal_ga": 9, "heat_capacity_ideal_gas_param": [4, 9], "heat_capacity_liquid": 9, "height": [0, 1, 3, 9], "help": [0, 1], "helvetica": [3, 9], "henrik": 1, "here": [0, 1, 9], "hex_g": 4, "hex_n": 4, "hexan": [0, 1, 3, 4, 8, 9], "hidden": 9, "hiden": 9, "hideout": 9, "highlight": 7, "highlightatom": 7, "holderbaum": 1, "horstmann": 1, "how": 7, "howev": 4, "html": [1, 8], "http": [1, 3, 4, 9], "hydrogen": 9, "hydroxyl": 7, "i": [0, 1, 3, 4, 7, 9], "i200016a021": 1, "i200023a023": 1, "i260072a024": 1, "ideal": [4, 9], "identifi": [3, 4, 9], "identifier_typ": [3, 4, 9], "ie00058a017": 1, "ie00061a030": 1, "ie020506l": 1, "illustr": 8, "imidazol": 7, "implement": 9, "import": [0, 1, 3, 4, 7, 8, 9], "inchi": 3, "inchikei": 3, "includ": 1, "inde": 7, "index": [1, 9], "individu": 4, "industri": 1, "inform": [4, 8, 9], "init": [3, 4], "input": [0, 1, 8, 9], "inquir": 7, "instal": 6, "instanc": 9, "instanti": [4, 9], "instantiate_mol_object": 9, "instead": [3, 4, 9], "institut": 1, "int": [3, 9], "interact": 7, "interaction_data": 8, "io": 8, "ipynb": [0, 1], "ipython": [0, 1, 3, 4, 7], "issu": [0, 1, 3, 7], "its": [0, 1, 7, 8, 9], "iv": 1, "j": [1, 4, 9], "jab": 1, "januari": 1, "jl": [0, 1, 3, 9], "joback": [0, 1, 3, 7, 8, 9], "joback_carvon": 4, "joback_object": [0, 1, 8, 9], "joback_properti": 4, "jobackproperti": [3, 4, 9], "jorgensen": 1, "juergen": 1, "juli": 1, "jurgen": 1, "k": [0, 1, 4, 9], "kai": 1, "keep": 9, "kesler": [4, 9], "kevin": 1, "kj": [4, 9], "know": 3, "known": 4, "kolb": 1, "krafczyk": 1, "kwong": [0, 1, 3, 7, 9], "later": 3, "leav": [0, 1], "lee": [4, 9], "left": 9, "legend": [3, 9], "legend_font_s": [0, 1, 3, 9], "length": 9, "let": [3, 4, 7, 8], "librari": [0, 1, 3, 7, 8, 9], "like": [7, 9], "limonen": [0, 1, 4, 8], "link": 3, "linux": [0, 1], "liquid": [0, 1, 3, 4, 7, 9], "list": [3, 7, 8, 9], "ll": 3, "loc": 7, "logo": [0, 1], "lohmann": 1, "look": 7, "lt": [3, 4], "lv": [3, 9], "mac": [0, 1], "macedo": 1, "mai": [3, 4, 7], "main": 9, "main_group": 9, "maingroup_nam": 9, "mandatori": 9, "martin": 1, "massachusett": 1, "matrix": 9, "mb": 1, "mean": 3, "method": [3, 9], "miller": [4, 9], "miss": 9, "mixtur": 7, "model": [2, 3, 4, 7], "modul": [1, 8, 9], "mol": [0, 1, 3, 4, 7, 9], "mol_obj": 3, "mol_object": [3, 7, 9], "mol_subgroup": 9, "molecul": [0, 1, 3, 4, 7, 8, 9], "molecular": [3, 4, 9], "molecular_weight": [3, 4, 7, 9], "molecules_nam": [0, 1, 8, 9], "molfrominchi": 3, "moltoimag": 7, "molwt": [3, 9], "more": [3, 4, 9], "multipl": 7, "must": [8, 9], "m\u00b2": [4, 9], "n": [0, 1, 4, 7, 8, 9], "n_a": [4, 9], "n_b": [4, 9], "name": [0, 1, 3, 4, 7, 8, 9], "nan": 7, "nco": 7, "ndarrai": 9, "neccesari": 9, "necessit": 4, "need": [8, 9], "neg": 9, "next": [0, 1], "nicotin": 4, "none": [3, 4, 9], "normal": [3, 4, 9], "normal_boiling_point": [3, 4, 9], "normal_boiling_temperatur": [3, 4, 9], "notic": [3, 9], "now": 3, "number": [7, 9], "numer": 3, "numpi": 9, "nx2h0": 7, "o": [0, 1, 3, 7], "object": [3, 4, 8, 9], "obtain": [0, 1, 7, 8, 9], "oc": 7, "occ": [0, 1], "occur": 9, "occurr": 9, "octob": 1, "offer": 3, "ogunifac_group": [8, 9], "oh": [0, 1, 7], "omit": 8, "one": 9, "oniec": 1, "open": [0, 1, 3], "option": [3, 4, 9], "org": 4, "origin": 4, "other": [4, 7, 9], "output": 9, "overhead": [3, 4], "overlap": 9, "own": 9, "ox1h0": 7, "p": [1, 4], "page": 1, "paramet": [1, 3, 4, 7, 9], "particip": 9, "path": [0, 1, 8, 9], "pathlib": 9, "pd": 9, "pdb": 3, "peter": 1, "ph": 1, "phase": 1, "phenomenon": 9, "physic": 1, "pip": [0, 1, 5], "plank": [4, 9], "point": [3, 4, 9], "possess": 1, "precens": 9, "predict": [0, 1, 3, 7, 9], "prefer": 9, "pressur": [3, 4, 9], "pretend": 4, "previou": 4, "princip": 9, "print": [0, 1, 3, 4, 7, 8], "priori": 9, "problemat": 9, "problematic_structur": 9, "process": 1, "prop_estim": 9, "propanol": [0, 1], "properti": [0, 1, 2, 3, 4, 8], "properties_contribut": 9, "propertiesestim": 9, "provid": [3, 4, 8, 9], "provis": 3, "psrk": [0, 1, 3, 4, 7, 8, 9], "psrk_group": [0, 1, 8, 9], "pubchem": [0, 1, 3], "pubchempi": [0, 1, 3], "publish": 1, "pure": 1, "py": [3, 4], "python": [0, 1], "q": 9, "r": [1, 9], "rasmussen": 1, "rdchem": [3, 4, 9], "rdkit": [0, 1, 3, 4, 7, 9], "readthedoc": 8, "reason": 7, "receiv": [7, 8], "reciev": 9, "recogn": 9, "recommend": 4, "recreat": 8, "red": 7, "redlich": [0, 1, 3, 7, 9], "refer": [3, 4], "reid": [1, 4, 9], "rel": 3, "report": 7, "repositori": 7, "repres": [4, 7], "represent": [0, 1, 3, 4, 7, 9], "requir": [0, 1, 4], "research": 1, "respect": [4, 9], "result": [0, 1, 3, 4, 7, 9], "retriev": 3, "return": [3, 9], "reveal": 9, "revis": 1, "rg": 1, "rgen": 1, "riedel": [4, 9], "ring": [0, 1, 3, 4, 7], "roland": 1, "row": 7, "rowlinson": 9, "same": 9, "save": 3, "saw": 4, "schiller": 1, "search": [0, 1, 3, 4, 9], "set": [3, 4, 8], "should": 4, "signatur": [3, 4], "signific": 4, "similarli": 4, "simpl": 8, "simpli": [3, 5], "sinc": 9, "singl": 7, "situat": 4, "size": [3, 9], "skip": 4, "skjold": 1, "smart": [3, 7, 9], "smile": [0, 1, 3, 4, 7, 9], "soav": [0, 1, 3, 7, 9], "solut": [3, 9], "solv": [0, 1, 3, 9], "some": [4, 7], "sourc": 9, "split_detection_smart": 9, "stage": [0, 1], "start": 3, "state": 1, "steen": 1, "store": [3, 9], "str": [3, 4, 9], "straightforward": 3, "string": 9, "structur": [7, 9], "subclass": [3, 4], "subgroup": [0, 1, 3, 4, 7, 8, 9], "subgroup_numb": 9, "subgroups_info": 9, "subrgoup": 9, "suffer": 3, "sum_na": [4, 9], "sum_nb": [4, 9], "support": [3, 4, 7, 9], "sven": 1, "svg": [0, 1, 3, 4, 7, 9], "svg1": 7, "svg2": 7, "t": [1, 4, 8, 9], "take": 7, "technologi": 1, "tell": 7, "temperatur": [3, 4, 9], "test": [0, 1, 7], "text": [3, 9], "thei": 8, "them": 7, "thermo": [0, 1, 9], "thermo_group": 8, "thermodynam": [0, 1, 8, 9], "thesi": 1, "thi": [3, 4, 7, 8, 9], "think": 4, "those": 7, "tieg": 1, "titl": [0, 1, 3, 9], "title_font_s": [0, 1, 3, 9], "to_clapeyron": [0, 1, 8, 9], "to_thermo": [0, 1, 8, 9], "toler": 9, "translat": 8, "treat": 7, "treu": 9, "tri": [7, 9], "trinitrotoluen": [0, 1, 8], "true": 9, "try": [3, 7], "tupl": 9, "tutori": [0, 1, 3, 4], "two": [7, 9], "type": [3, 4, 9], "u": [7, 9], "ublish": 1, "ufip": 8, "ufsg": 8, "ugropi": [3, 4, 5, 7, 8, 9], "ulrich": 1, "unifac": [0, 1, 3, 4, 7, 8, 9], "unifac_group": [0, 1, 8, 9], "union": [3, 9], "unit": 4, "us": [3, 4, 7, 8, 9], "user": [4, 8, 9], "util": [3, 7, 8], "v": 1, "valu": [1, 4, 9], "vapor": [0, 1, 3, 4, 7, 9], "vapor_pressur": [0, 1, 9], "vapor_pressure_param": [4, 9], "variou": 8, "veri": [0, 1], "version": [7, 8], "viscos": [4, 9], "viscosity_liquid": 9, "visual": [0, 1, 3, 4], "volum": [4, 9], "w": 3, "wa": 3, "wai": [1, 6, 7], "want": [4, 7], "warn": 4, "we": [3, 4, 7, 8], "weidlich": 1, "weight": [3, 4, 9], "well": [3, 7], "what": [3, 9], "whatev": 4, "when": [3, 4, 9], "where": [7, 8], "whether": 7, "which": 3, "width": [0, 1, 3, 4, 7, 9], "window": [0, 1], "wish": 8, "witer": 9, "without": 9, "witouht": 9, "wittig": 1, "write": [0, 1, 3, 8, 9], "write_crit": 9, "write_molar_mass": 9, "write_psrk": 9, "write_unifac": 9, "writen": 9, "writer": [2, 6], "www": 1, "x": 8, "y": 9, "you": [0, 1, 3, 4, 7, 8, 9], "your": [0, 1], "yourself": 3, "zero": 9, "\u00f6": 1, "\u00fc": 1, "\u0142": 1, "\u03b1": 1}, "titles": ["Try ugropy now", "Try ugropy now", "API", "The easy way", "The Hard? way", "Installation", "Tutorial", "Failing", "Writers", "Available Models"], "titleterms": {"0": [0, 1], "5": [0, 1], "The": [3, 4], "api": 2, "avail": 9, "calebbel": 8, "clapeyron": [8, 9], "clapeyronthermo": 8, "class": 3, "com": 8, "constant": 9, "content": 1, "core": 9, "easi": 3, "estim": 9, "exampl": [0, 1], "fail": 7, "fragment": 9, "function": 4, "get_group": 4, "gibb": 9, "github": 8, "group": [3, 9], "hard": 4, "http": 8, "indic": 1, "instal": [0, 1, 5], "jl": 8, "joback": 4, "model": [0, 1, 9], "more": 7, "now": [0, 1], "one": 7, "properti": 9, "refer": 1, "solut": 7, "support": [0, 1], "tabl": 1, "than": 7, "thermo": 8, "try": [0, 1], "tutori": 6, "ugropi": [0, 1], "us": [0, 1], "v2": [0, 1], "wai": [3, 4], "warn": 3, "writer": [0, 1, 8, 9]}}) \ No newline at end of file diff --git a/tutorial/easy_way.html b/tutorial/easy_way.html new file mode 100644 index 0000000..da913af --- /dev/null +++ b/tutorial/easy_way.html @@ -0,0 +1,413 @@ + + + + + + + The easy way — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

The easy way

+
+

The Groups class

+

ugropy is relatively straightforward to use, but let’s explore what it has to offer. Now, let’s start with the easy methods…

+

We’ll utilize the Groups class to retrieve the subgroups of all the models supported by ugropy.

+
+
[1]:
+
+
+
from ugropy import Groups
+
+carvone = Groups("carvone")
+
+carvone.unifac.subgroups
+
+
+
+
+
[1]:
+
+
+
+
+{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}
+
+
+

Well, that was easy… ugropy utilizes PubChemPy (link) to access PubChem and retrieve the SMILES representation of the molecule. ugropy then employs the SMILES representation along with the rdkit (link) library to identify the functional groups of the molecules.

+

The complete signature of the Groups class is as follows:

+
+
[2]:
+
+
+
carvone = Groups(
+    identifier="carvone",
+    identifier_type="name",
+    normal_boiling_temperature=None
+)
+
+
+
+

The identifier_type argument (default: “name”) can be set to “name”, “smiles” or “mol”.

+

When “name” is set, ugropy will use the identifier argument to search in pubchem for the canonical SMILES of the molecule.

+

When “smiles” is set, ugropy uses it directly, this also means that the library will not suffer the overhead of searching on pubchem. Try it yourself:

+
+
[3]:
+
+
+
carvone = Groups(
+    identifier="CC1=CCC(CC1=O)C(=C)C",
+    identifier_type="smiles",
+    normal_boiling_temperature=None
+)
+
+carvone.unifac.subgroups
+
+
+
+
+
[3]:
+
+
+
+
+{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}
+
+
+

If you are familiar with the rdkit library, you’ll know that there are numerous ways to define a molecule (e.g., SMILES, SMARTS, PDB file, InChIKey, etc.). ugropy supports the provision of a Mol object from the rdkit library.

+
+
[4]:
+
+
+
from rdkit import Chem
+
+mol_obj = Chem.MolFromInchi("InChI=1S/C10H14O/c1-7(2)9-5-4-8(3)10(11)6-9/h4,9H,1,5-6H2,2-3H3")
+
+carvone = Groups(
+    identifier=mol_obj,
+    identifier_type="mol",
+    normal_boiling_temperature=None
+)
+
+carvone.unifac.subgroups
+
+
+
+
+
[4]:
+
+
+
+
+{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}
+
+
+

The current supported models are the classic liquid-vapor UNIFAC, Predictive Soave-Redlich-Kwong (PSRK) and Joback. You can access the functional groups this way:

+
+
[5]:
+
+
+
carvone = Groups("carvone")
+
+print(carvone.unifac.subgroups)
+
+print(carvone.psrk.subgroups)
+
+print(carvone.joback.subgroups)
+
+
+
+
+
+
+
+
+{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}
+{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}
+{'-CH3': 2, '=CH2': 1, '=C<': 1, 'ring-CH2-': 2, 'ring>CH-': 1, 'ring=CH-': 1, 'ring=C<': 1, '>C=O (ring)': 1}
+
+
+

You may notice that the joback attribute is a different object. That’s because it’s a JobackProperties object, which contains all the properties that the Joback model can estimate. This will be discussed later in the Joback tutorial. As an example:

+
+
[6]:
+
+
+
carvone.joback.normal_boiling_point
+
+
+
+
+
[6]:
+
+
+
+
+516.47
+
+
+

Finally, if the normal_boiling_temperature parameter is provided, it is used in the Joback properties calculations instead of the Joback-estimated normal boiling temperature (refer to the Joback tutorial).

+

The full documentation of the Groups class may be accessed in the API documentation. Or you can do…

+
+
[7]:
+
+
+
Groups?
+
+
+
+
+
+
+
+
+Init signature:
+Groups(
+    identifier: str,
+    identifier_type: str = 'name',
+    normal_boiling_temperature: float = None,
+) -> None
+Docstring:
+Group class.
+
+Stores the solved FragmentationModels subgroups of a molecule.
+
+Parameters
+----------
+identifier : str or rdkit.Chem.rdchem.Mol
+    Identifier of a molecule (name, SMILES or Chem.rdchem.Mol). Example:
+    hexane or CCCCCC.
+identifier_type : str, optional
+    Use 'name' to search a molecule by name, 'smiles' to provide the
+    molecule SMILES representation or 'mol' to provide a
+    rdkit.Chem.rdchem.Mol object, by default "name".
+normal_boiling_temperature : float, optional
+    If provided, will be used to estimate critical temperature, acentric
+    factor, and vapor pressure instead of the estimated normal boiling
+    point in the Joback group contribution model, by default None.
+
+Attributes
+----------
+identifier : str
+    Identifier of a molecule. Example: hexane or CCCCCC.
+identifier_type : str, optional
+    Use 'name' to search a molecule by name or 'smiles' to provide the
+    molecule SMILES representation, by default "name".
+mol_object : rdkit.Chem.rdchem.Mol
+    RDKit Mol object.
+molecular_weight : float
+    Molecule's molecular weight from rdkit.Chem.Descriptors.MolWt [g/mol].
+unifac : Fragmentation
+    Classic LV-UNIFAC subgroups.
+psrk : Fragmentation
+    Predictive Soave-Redlich-Kwong subgroups.
+joback : JobackProperties
+    JobackProperties object that contains the Joback subgroups and the
+    estimated properties of the molecule.
+File:           ~/code/ugropy/ugropy/groups.py
+Type:           type
+Subclasses:
+
+
+

Also, you can visualize the fragmentation result simply doing:

+
+
[8]:
+
+
+
from IPython.display import SVG
+
+svg = carvone.unifac.draw(width=600)
+
+SVG(svg)
+
+
+
+
+
[8]:
+
+
+
+../_images/tutorial_easy_way_16_0.svg
+
+

You can save the figure by doing:

+
+
[9]:
+
+
+
with open("figure.svg", "w") as f:
+    f.write(svg)
+
+
+
+

Check the full documentation of the draw funcion:

+
+
[10]:
+
+
+
carvone.unifac.draw?
+
+
+
+
+
+
+
+
+Signature:
+carvone.unifac.draw(
+    title: str = '',
+    width: float = 400,
+    height: float = 200,
+    title_font_size: float = 12,
+    legend_font_size: float = 12,
+    font: str = 'Helvetica',
+) -> Union[str, List[str]]
+Docstring:
+Create a svg representation of the fragmentation result.
+
+Parameters
+----------
+title : str, optional
+    Graph title, by default ""
+width : int, optional
+    Graph width, by default 400
+height : int, optional
+    Graph height, by default 200
+title_font_size : int, optional
+    Font size of graph's title, by default 12
+legend_font_size : int, optional
+    Legend font size, by default 12
+font : str, optional
+    Text font, by default "Helvetica"
+
+Returns
+-------
+Union[str, List[str]]
+    SVG of the fragmentation solution/s.
+File:      ~/code/ugropy/ugropy/core/fragmentation_object.py
+Type:      method
+
+
+
+
+

WARNING

+

For the UNIFAC, and PSRK groups the aldehyde group is change to HCO according to the discussion: https://github.com/ClapeyronThermo/Clapeyron.jl/issues/225

+

This is more consistent with the ether groups and formate group.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/tutorial/easy_way.ipynb b/tutorial/easy_way.ipynb new file mode 100644 index 0000000..64f285b --- /dev/null +++ b/tutorial/easy_way.ipynb @@ -0,0 +1,473 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### The easy way\n", + "\n", + "#### The Groups class\n", + "`ugropy` is relatively straightforward to use, but let's explore what it has to \n", + "offer. Now, let's start with the easy methods...\n", + "\n", + "We'll utilize the Groups class to retrieve the subgroups of all the models \n", + "supported by `ugropy`." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from ugropy import Groups\n", + "\n", + "carvone = Groups(\"carvone\")\n", + "\n", + "carvone.unifac.subgroups" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Well, that was easy... `ugropy` utilizes `PubChemPy` \n", + "([link](https://github.com/mcs07/PubChemPy)) to access `PubChem` and \n", + "retrieve the SMILES representation of the molecule. `ugropy` then employs the \n", + "SMILES representation along with the `rdkit` \n", + "([link](https://github.com/rdkit/rdkit)) library to identify the \n", + "functional groups of the molecules.\n", + "\n", + "The complete signature of the Groups class is as follows:" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "carvone = Groups(\n", + " identifier=\"carvone\",\n", + " identifier_type=\"name\",\n", + " normal_boiling_temperature=None\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The identifier_type argument (default: \"name\") can be set to \"name\", \"smiles\"\n", + "or \"mol\".\n", + "\n", + "When \"name\" is set, `ugropy` will use the identifier argument to search in\n", + "pubchem for the canonical SMILES of the molecule.\n", + "\n", + "When \"smiles\" is set, `ugropy` uses it directly, this also means that the \n", + "library will not suffer the overhead of searching on pubchem. Try it yourself:" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "carvone = Groups(\n", + " identifier=\"CC1=CCC(CC1=O)C(=C)C\",\n", + " identifier_type=\"smiles\",\n", + " normal_boiling_temperature=None\n", + ")\n", + "\n", + "carvone.unifac.subgroups" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If you are familiar with the `rdkit` library, you'll know that there are\n", + "numerous ways to define a molecule (e.g., SMILES, SMARTS, PDB file, InChIKey,\n", + "etc.). `ugropy` supports the provision of a Mol object from the `rdkit`\n", + "library." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from rdkit import Chem\n", + "\n", + "mol_obj = Chem.MolFromInchi(\"InChI=1S/C10H14O/c1-7(2)9-5-4-8(3)10(11)6-9/h4,9H,1,5-6H2,2-3H3\")\n", + "\n", + "carvone = Groups(\n", + " identifier=mol_obj,\n", + " identifier_type=\"mol\",\n", + " normal_boiling_temperature=None\n", + ")\n", + "\n", + "carvone.unifac.subgroups" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The current supported models are the classic liquid-vapor UNIFAC, Predictive\n", + "Soave-Redlich-Kwong (PSRK) and Joback. You can access the functional groups\n", + "this way:" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}\n", + "{'CH3': 2, 'CH2': 1, 'CH': 1, 'CH2=C': 1, 'CH=C': 1, 'CH2CO': 1}\n", + "{'-CH3': 2, '=CH2': 1, '=C<': 1, 'ring-CH2-': 2, 'ring>CH-': 1, 'ring=CH-': 1, 'ring=C<': 1, '>C=O (ring)': 1}\n" + ] + } + ], + "source": [ + "carvone = Groups(\"carvone\")\n", + "\n", + "print(carvone.unifac.subgroups)\n", + "\n", + "print(carvone.psrk.subgroups)\n", + "\n", + "print(carvone.joback.subgroups)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You may notice that the joback attribute is a different object. That's because\n", + "it's a JobackProperties object, which contains all the properties that the\n", + "Joback model can estimate. This will be discussed later in the Joback tutorial.\n", + "As an example:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "516.47" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "carvone.joback.normal_boiling_point" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finally, if the normal_boiling_temperature parameter is provided, it is used in\n", + "the Joback properties calculations instead of the Joback-estimated normal\n", + "boiling temperature (refer to the Joback tutorial)." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The full documentation of the `Groups` class may be accessed in the API\n", + "documentation. Or you can do..." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[0;31mInit signature:\u001b[0m\n", + "\u001b[0mGroups\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0midentifier\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0midentifier_type\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'name'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mnormal_boiling_temperature\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m \n", + "Group class.\n", + "\n", + "Stores the solved FragmentationModels subgroups of a molecule.\n", + "\n", + "Parameters\n", + "----------\n", + "identifier : str or rdkit.Chem.rdchem.Mol\n", + " Identifier of a molecule (name, SMILES or Chem.rdchem.Mol). Example:\n", + " hexane or CCCCCC.\n", + "identifier_type : str, optional\n", + " Use 'name' to search a molecule by name, 'smiles' to provide the\n", + " molecule SMILES representation or 'mol' to provide a\n", + " rdkit.Chem.rdchem.Mol object, by default \"name\".\n", + "normal_boiling_temperature : float, optional\n", + " If provided, will be used to estimate critical temperature, acentric\n", + " factor, and vapor pressure instead of the estimated normal boiling\n", + " point in the Joback group contribution model, by default None.\n", + "\n", + "Attributes\n", + "----------\n", + "identifier : str\n", + " Identifier of a molecule. Example: hexane or CCCCCC.\n", + "identifier_type : str, optional\n", + " Use 'name' to search a molecule by name or 'smiles' to provide the\n", + " molecule SMILES representation, by default \"name\".\n", + "mol_object : rdkit.Chem.rdchem.Mol\n", + " RDKit Mol object.\n", + "molecular_weight : float\n", + " Molecule's molecular weight from rdkit.Chem.Descriptors.MolWt [g/mol].\n", + "unifac : Fragmentation\n", + " Classic LV-UNIFAC subgroups.\n", + "psrk : Fragmentation\n", + " Predictive Soave-Redlich-Kwong subgroups.\n", + "joback : JobackProperties\n", + " JobackProperties object that contains the Joback subgroups and the\n", + " estimated properties of the molecule.\n", + "\u001b[0;31mFile:\u001b[0m ~/code/ugropy/ugropy/groups.py\n", + "\u001b[0;31mType:\u001b[0m type\n", + "\u001b[0;31mSubclasses:\u001b[0m " + ] + } + ], + "source": [ + "Groups?" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Also, you can visualize the fragmentation result simply doing:" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "CH3CH2CHCH2=CCH=CCH2CO" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from IPython.display import SVG\n", + "\n", + "svg = carvone.unifac.draw(width=600)\n", + "\n", + "SVG(svg)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You can save the figure by doing:" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "with open(\"figure.svg\", \"w\") as f:\n", + " f.write(svg)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Check the full documentation of the draw funcion:" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[0;31mSignature:\u001b[0m\n", + "\u001b[0mcarvone\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0munifac\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdraw\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mtitle\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m''\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mwidth\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m400\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mheight\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m200\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mtitle_font_size\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m12\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mlegend_font_size\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m12\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mfont\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'Helvetica'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mUnion\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mList\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m\n", + "Create a svg representation of the fragmentation result.\n", + "\n", + "Parameters\n", + "----------\n", + "title : str, optional\n", + " Graph title, by default \"\"\n", + "width : int, optional\n", + " Graph width, by default 400\n", + "height : int, optional\n", + " Graph height, by default 200\n", + "title_font_size : int, optional\n", + " Font size of graph's title, by default 12\n", + "legend_font_size : int, optional\n", + " Legend font size, by default 12\n", + "font : str, optional\n", + " Text font, by default \"Helvetica\"\n", + "\n", + "Returns\n", + "-------\n", + "Union[str, List[str]]\n", + " SVG of the fragmentation solution/s.\n", + "\u001b[0;31mFile:\u001b[0m ~/code/ugropy/ugropy/core/fragmentation_object.py\n", + "\u001b[0;31mType:\u001b[0m method" + ] + } + ], + "source": [ + "carvone.unifac.draw?" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### WARNING" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For the UNIFAC, and PSRK groups the aldehyde group is change to HCO according\n", + "to the discussion: https://github.com/ClapeyronThermo/Clapeyron.jl/issues/225\n", + "\n", + "This is more consistent with the ether groups and formate group." + ] + } + ], + "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 +} diff --git a/tutorial/hard_way.html b/tutorial/hard_way.html new file mode 100644 index 0000000..afe234f --- /dev/null +++ b/tutorial/hard_way.html @@ -0,0 +1,417 @@ + + + + + + + The Hard? way — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

The Hard? way

+
+

The get_groups function

+

In some situation you may not require to instantiate all the models supported by ugropy, for that, you can search the model’s groups individually.

+
+
[1]:
+
+
+
from ugropy import joback, psrk, unifac, get_groups
+
+hexane = get_groups(unifac, "hexane")
+nicotine = get_groups(psrk, "nicotine")
+limonene = get_groups(joback, "limonene")
+
+print(hexane.subgroups)
+print(nicotine.subgroups)
+print(limonene.subgroups)
+
+
+
+
+
+
+
+
+{'CH3': 2, 'CH2': 4}
+{'CH2': 3, 'CH3N': 1, 'C5H4N': 1, 'CH': 1}
+{'-CH3': 2, '=CH2': 1, '=C<': 1, 'ring-CH2-': 3, 'ring>CH-': 1, 'ring=CH-': 1, 'ring=C<': 1}
+
+
+

Also, you can visualize the fragmentation results as in the “easy way” tutorial

+
+
[2]:
+
+
+
from IPython.display import SVG
+
+SVG(hexane.draw())
+
+
+
+
+
[2]:
+
+
+
+../_images/tutorial_hard_way_3_0.svg
+
+
+
[3]:
+
+
+
SVG(nicotine.draw())
+
+
+
+
+
[3]:
+
+
+
+../_images/tutorial_hard_way_4_0.svg
+
+
+
[4]:
+
+
+
SVG(limonene.draw(width=600))
+
+
+
+
+
[4]:
+
+
+
+../_images/tutorial_hard_way_5_0.svg
+
+

The get_groups function have the signature:

+
+
[5]:
+
+
+
get_groups(
+    model=psrk,
+    identifier="nicotine",
+    identifier_type="name"
+);
+
+
+
+

As in the Groups class you can use “name”, “smiles” or “mol” as identifier type. This can be useful for whatever you are doing and skip the overhead of setting models that you don’t want. The Groups class is pretended to be used when you think: “I want all of this molecule”. The fragmentation_model parameters represents an ugropy fragmentation model.

+
+
[6]:
+
+
+
from ugropy import FragmentationModel
+
+
+
+
+
+

Joback

+

For context, check the Joback’s article: https://doi.org/10.1080/00986448708960487

+

The JobackProperties object is instantiated by the Group object, as we saw in the previous tutorial. However, a JobackProperties object can also be instantiated individually:

+
+
[7]:
+
+
+
from ugropy.properties import JobackProperties
+
+joback_carvone = JobackProperties("carvone")
+
+joback_carvone.g_formation
+
+
+
+
+
[7]:
+
+
+
+
+34.800000000000004
+
+
+

As with a Groups object, the signature of a Joback object is as follows similarly, in the Groups class, you can use “name,” “smiles,” or “mol” as the identifier type with the addition that you can provide the Joback’s functional groups as a dictionary directly:

+
+
[8]:
+
+
+
carvone  = JobackProperties(
+    identifier="carvone",
+    identifier_type="name",
+    normal_boiling_point=None
+)
+
+
+
+
+
[9]:
+
+
+
hex_g = JobackProperties(identifier={"-CH3": 2, "-CH2-": 4}, identifier_type="groups")
+
+hex_n = JobackProperties(identifier="hexane", identifier_type="name")
+
+print(hex_g.critical_pressure)
+print(hex_n.critical_pressure)
+
+
+
+
+
+
+
+
+31.070992245923176
+31.070992245923176
+
+
+

The normal_boiling_temperature parameter, if provided, is used in the Joback properties calculations instead of the Joback-estimated normal boiling temperature. Let’s examine an example from the original Joback’s article:

+
+
[10]:
+
+
+
mol = JobackProperties("p-dichlorobenzene")
+
+print(f"Estimated normal boiling point: {mol.normal_boiling_point} K")
+print(f"Critical temperature: {mol.critical_temperature} K")
+
+
+
+
+
+
+
+
+Estimated normal boiling point: 443.4 K
+Critical temperature: 675.1671746814928 K
+
+
+

The critical temperature necessitates the estimation of the normal boiling point. Joback recommends that if the experimental value of the normal boiling point is known, it should be used instead of the estimated value.

+
+
[11]:
+
+
+
mol = JobackProperties("p-dichlorobenzene", normal_boiling_point=447.3)
+
+print(f"Experimental normal boiling point: {mol.exp_nbt} K")
+print(f"Estimated normal boiling point: {mol.normal_boiling_point} K")
+print(f"Critical temperature: {mol.critical_temperature} K")
+
+
+
+
+
+
+
+
+Experimental normal boiling point: 447.3 K
+Estimated normal boiling point: 443.4 K
+Critical temperature: 681.1057222260526 K
+
+
+

The experimental value of the critical temperature for p-dichlorobenzene is 685 K. In this example, the error is not significant, but Joback warns that errors could be more significant in other cases.

+

Refer to the full documentation of the Joback object for information on units and further explanation.

+
+
[12]:
+
+
+
JobackProperties?
+
+
+
+
+
+
+
+
+Init signature:
+JobackProperties(
+    identifier: str,
+    identifier_type: str = 'name',
+    normal_boiling_point: float = None,
+) -> None
+Docstring:
+Joback [1] group contribution properties estimator.
+
+Parameters
+----------
+identifier : str or rdkit.Chem.rdchem.Mol
+    Identifier of a molecule (name, SMILES, groups, or Chem.rdchem.Mol).
+    Example: you can use hexane, CCCCCC, {"-CH3": 2, "-CH2-": 4} for name,
+    SMILES and groups respectively.
+identifier_type : str, optional
+    Use 'name' to search a molecule by name, 'smiles' to provide the
+    molecule SMILES representation, 'groups' to provide Joback groups or
+    'mol' to provide a rdkit.Chem.rdchem.Mol object, by default "name".
+normal_boiling_point : float, optional
+    If provided, will be used to estimate critical temperature, acentric
+    factor, and vapor pressure instead of the estimated normal boiling
+    point, by default None.
+
+Attributes
+----------
+subgroups : dict
+    Joback functional groups of the molecule.
+exp_nbt : float
+    User provided experimental normal boiling point [K].
+critical_temperature : float
+    Joback estimated critical temperature [K].
+critical_pressure : float
+    Joback estimated critical pressure [bar].
+critical_volume : float
+    Joback estimated critical volume [cm³/mol].
+normal_boiling_point : float
+    Joback estimated normal boiling point [K].
+fusion_temperature : float
+    Joback estimated fusion temperature [K].
+h_formation : float
+    Joback estimated enthalpy of formation ideal gas at 298 K [kJ/mol].
+g_formation : float
+    Joback estimated Gibbs energy of formation ideal gas at 298 K [K].
+heat_capacity_ideal_gas_params : dict
+    Joback estimated Reid's ideal gas heat capacity equation parameters
+    [J/mol/K].
+h_fusion : float
+    Joback estimated fusion enthalpy [kJ/mol].
+h_vaporization : float
+    Joback estimated vaporization enthalpy at the normal boiling point
+    [kJ/mol].
+sum_na : float
+    Joback n_A contribution to liquid viscosity [N/s/m²].
+sum_nb : float
+    Joback n_B contribution to liquid viscosity [N/s/m²].
+molecular_weight : float
+    Molecular weight from Joback's subgroups [g/mol].
+acentric_factor : float
+    Acentric factor from Lee and Kesler's equation [2].
+vapor_pressure_params : dict
+    Vapor pressure G and k parameters for the Riedel-Plank-Miller [2]
+    equation [bar].
+File:           ~/code/ugropy/ugropy/properties/joback_properties.py
+Type:           type
+Subclasses:
+
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/tutorial/hard_way.ipynb b/tutorial/hard_way.ipynb new file mode 100644 index 0000000..180cd58 --- /dev/null +++ b/tutorial/hard_way.ipynb @@ -0,0 +1,516 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### The Hard? way\n", + "\n", + "#### The get_groups function\n", + "\n", + "In some situation you may not require to instantiate all the models supported\n", + "by `ugropy`, for that, you can search the model's groups individually." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'CH3': 2, 'CH2': 4}\n", + "{'CH2': 3, 'CH3N': 1, 'C5H4N': 1, 'CH': 1}\n", + "{'-CH3': 2, '=CH2': 1, '=C<': 1, 'ring-CH2-': 3, 'ring>CH-': 1, 'ring=CH-': 1, 'ring=C<': 1}\n" + ] + } + ], + "source": [ + "from ugropy import joback, psrk, unifac, get_groups\n", + "\n", + "hexane = get_groups(unifac, \"hexane\")\n", + "nicotine = get_groups(psrk, \"nicotine\")\n", + "limonene = get_groups(joback, \"limonene\")\n", + "\n", + "print(hexane.subgroups)\n", + "print(nicotine.subgroups)\n", + "print(limonene.subgroups)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Also, you can visualize the fragmentation results as in the \"easy way\" tutorial" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "CH3CH2" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from IPython.display import SVG\n", + "\n", + "SVG(hexane.draw())" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "CH2CH3NC5H4NCH" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "SVG(nicotine.draw())" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "-CH3=CH2=C<ring-CH2-ring>CH-ring=CH-ring=C<" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "SVG(limonene.draw(width=600))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The `get_groups` function have the signature:" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "get_groups(\n", + " model=psrk,\n", + " identifier=\"nicotine\",\n", + " identifier_type=\"name\"\n", + ");" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "As in the `Groups` class you can use \"name\", \"smiles\" or \"mol\" as identifier\n", + "type. This can be useful for whatever you are doing and skip the overhead of\n", + "setting models that you don't want. The `Groups` class is pretended to be used\n", + "when you think: \"I want all of this molecule\". The fragmentation_model \n", + "parameters represents an ugropy fragmentation model." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "from ugropy import FragmentationModel" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Joback\n", + "\n", + "For context, check the Joback's article:\n", + "https://doi.org/10.1080/00986448708960487\n", + "\n", + "The `JobackProperties` object is instantiated by the Group object, as we saw in\n", + "the previous tutorial. However, a `JobackProperties` object can also be\n", + "instantiated individually:" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "34.800000000000004" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from ugropy.properties import JobackProperties\n", + "\n", + "joback_carvone = JobackProperties(\"carvone\")\n", + "\n", + "joback_carvone.g_formation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "As with a `Groups` object, the signature of a `Joback` object is as follows\n", + "similarly, in the `Groups` class, you can use \"name,\" \"smiles,\" or \"mol\" as the\n", + "identifier type with the addition that you can provide the Joback's functional\n", + "groups as a dictionary directly:" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "carvone = JobackProperties(\n", + " identifier=\"carvone\",\n", + " identifier_type=\"name\",\n", + " normal_boiling_point=None\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "31.070992245923176\n", + "31.070992245923176\n" + ] + } + ], + "source": [ + "hex_g = JobackProperties(identifier={\"-CH3\": 2, \"-CH2-\": 4}, identifier_type=\"groups\")\n", + "\n", + "hex_n = JobackProperties(identifier=\"hexane\", identifier_type=\"name\")\n", + "\n", + "print(hex_g.critical_pressure)\n", + "print(hex_n.critical_pressure)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The normal_boiling_temperature parameter, if provided, is used in the Joback\n", + "properties calculations instead of the Joback-estimated normal boiling\n", + "temperature. Let's examine an example from the original Joback's article:" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Estimated normal boiling point: 443.4 K\n", + "Critical temperature: 675.1671746814928 K\n" + ] + } + ], + "source": [ + "mol = JobackProperties(\"p-dichlorobenzene\")\n", + "\n", + "print(f\"Estimated normal boiling point: {mol.normal_boiling_point} K\")\n", + "print(f\"Critical temperature: {mol.critical_temperature} K\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The critical temperature necessitates the estimation of the normal boiling\n", + "point. Joback recommends that if the experimental value of the normal boiling\n", + "point is known, it should be used instead of the estimated value." + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Experimental normal boiling point: 447.3 K\n", + "Estimated normal boiling point: 443.4 K\n", + "Critical temperature: 681.1057222260526 K\n" + ] + } + ], + "source": [ + "mol = JobackProperties(\"p-dichlorobenzene\", normal_boiling_point=447.3)\n", + "\n", + "print(f\"Experimental normal boiling point: {mol.exp_nbt} K\")\n", + "print(f\"Estimated normal boiling point: {mol.normal_boiling_point} K\")\n", + "print(f\"Critical temperature: {mol.critical_temperature} K\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The experimental value of the critical temperature for p-dichlorobenzene is 685\n", + "K. In this example, the error is not significant, but Joback warns that errors\n", + "could be more significant in other cases.\n", + "\n", + "Refer to the full documentation of the Joback object for information on units\n", + "and further explanation." + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[0;31mInit signature:\u001b[0m\n", + "\u001b[0mJobackProperties\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0midentifier\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0midentifier_type\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'name'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m \u001b[0mnormal_boiling_point\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfloat\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\n", + "\u001b[0;34m\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDocstring:\u001b[0m \n", + "Joback [1] group contribution properties estimator.\n", + "\n", + "Parameters\n", + "----------\n", + "identifier : str or rdkit.Chem.rdchem.Mol\n", + " Identifier of a molecule (name, SMILES, groups, or Chem.rdchem.Mol).\n", + " Example: you can use hexane, CCCCCC, {\"-CH3\": 2, \"-CH2-\": 4} for name,\n", + " SMILES and groups respectively.\n", + "identifier_type : str, optional\n", + " Use 'name' to search a molecule by name, 'smiles' to provide the\n", + " molecule SMILES representation, 'groups' to provide Joback groups or\n", + " 'mol' to provide a rdkit.Chem.rdchem.Mol object, by default \"name\".\n", + "normal_boiling_point : float, optional\n", + " If provided, will be used to estimate critical temperature, acentric\n", + " factor, and vapor pressure instead of the estimated normal boiling\n", + " point, by default None.\n", + "\n", + "Attributes\n", + "----------\n", + "subgroups : dict\n", + " Joback functional groups of the molecule.\n", + "exp_nbt : float\n", + " User provided experimental normal boiling point [K].\n", + "critical_temperature : float\n", + " Joback estimated critical temperature [K].\n", + "critical_pressure : float\n", + " Joback estimated critical pressure [bar].\n", + "critical_volume : float\n", + " Joback estimated critical volume [cm³/mol].\n", + "normal_boiling_point : float\n", + " Joback estimated normal boiling point [K].\n", + "fusion_temperature : float\n", + " Joback estimated fusion temperature [K].\n", + "h_formation : float\n", + " Joback estimated enthalpy of formation ideal gas at 298 K [kJ/mol].\n", + "g_formation : float\n", + " Joback estimated Gibbs energy of formation ideal gas at 298 K [K].\n", + "heat_capacity_ideal_gas_params : dict\n", + " Joback estimated Reid's ideal gas heat capacity equation parameters\n", + " [J/mol/K].\n", + "h_fusion : float\n", + " Joback estimated fusion enthalpy [kJ/mol].\n", + "h_vaporization : float\n", + " Joback estimated vaporization enthalpy at the normal boiling point\n", + " [kJ/mol].\n", + "sum_na : float\n", + " Joback n_A contribution to liquid viscosity [N/s/m²].\n", + "sum_nb : float\n", + " Joback n_B contribution to liquid viscosity [N/s/m²].\n", + "molecular_weight : float\n", + " Molecular weight from Joback's subgroups [g/mol].\n", + "acentric_factor : float\n", + " Acentric factor from Lee and Kesler's equation [2].\n", + "vapor_pressure_params : dict\n", + " Vapor pressure G and k parameters for the Riedel-Plank-Miller [2]\n", + " equation [bar].\n", + "\u001b[0;31mFile:\u001b[0m ~/code/ugropy/ugropy/properties/joback_properties.py\n", + "\u001b[0;31mType:\u001b[0m type\n", + "\u001b[0;31mSubclasses:\u001b[0m " + ] + } + ], + "source": [ + "JobackProperties?" + ] + } + ], + "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 +} diff --git a/tutorial/installation.html b/tutorial/installation.html new file mode 100644 index 0000000..9287f29 --- /dev/null +++ b/tutorial/installation.html @@ -0,0 +1,128 @@ + + + + + + + Installation — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Installation

+

Simply do

+
pip install ugropy
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/tutorial/installation.ipynb b/tutorial/installation.ipynb new file mode 100644 index 0000000..ebcb173 --- /dev/null +++ b/tutorial/installation.ipynb @@ -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 +} diff --git a/tutorial/tutorial.html b/tutorial/tutorial.html new file mode 100644 index 0000000..f9b8df1 --- /dev/null +++ b/tutorial/tutorial.html @@ -0,0 +1,132 @@ + + + + + + + Tutorial — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Tutorial

+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/tutorial/ugropy_failing.html b/tutorial/ugropy_failing.html new file mode 100644 index 0000000..ffa250a --- /dev/null +++ b/tutorial/ugropy_failing.html @@ -0,0 +1,428 @@ + + + + + + + Failing — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Failing

+

ugropy may fail to obtain the subgroups of a molecule for a certain model for two reasons: either there is a bug in the code, or the molecule cannot be represented by the subgroups of the failing model.

+

ugropy utilizes SMARTS for the representation of functional groups to inquire whether the molecule contains those structures. Let’s examine the functional group list for the classic liquid-vapor UNIFAC model.

+
+
[1]:
+
+
+
from ugropy import unifac
+
+unifac.subgroups
+
+
+
+
+
[1]:
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
detection_smartssmartscontributecomposedmolecular_weight
group
CH3[CX4H3]NaN{"CH3": 1}n15.03500
CH2[CX4H2]NaN{"CH2": 1}n14.02700
CH[CX4H]NaN{"CH": 1}n13.01900
C[CX4H0]NaN{"C": 1}n12.01100
CH2=CH[CH2]=[CH]NaN{"CH2=CH": 1}n27.04600
..................
NCO[NX2H0]=[CX2H0]=[OX1H0]NaN{"NCO": 1}n42.01700
(CH2)2SU[CH2]S(=O)(=O)[CH2]NaN{"(CH2)2SU": 1, "CH2": -1, "CH2S": -1}n92.11620
CH2CHSU[CH2]S(=O)(=O)[CH]NaN{"CH2CHSU": 1, "CH": -1, "CH2S": -1}n91.10840
IMIDAZOL[c]1:[c]:[n]:[c]:[n]:1NaN{"IMIDAZOL": 1, "ACH": -3}n68.07820
BTIC(F)(F)(F)S(=O)(=O)[N-]S(=O)(=O)C(F)(F)FNaN{"BTI": 1, "CF3": -2}n279.91784
+

113 rows × 5 columns

+
+
+

For example, let’s check the SMARTS representation of the alcohol group ACOH:

+
+
[2]:
+
+
+
unifac.subgroups.loc["ACOH", "detection_smarts"]
+
+
+
+
+
[2]:
+
+
+
+
+'[cH0][OH]'
+
+
+

The SMARTS representation it’s telling us that the OH group it’s, of course, a hydroxyl group bounded by a single bound to an aromatic carbon atom.

+

An example of a molecule that cannot be represented by UNIFAC groups:

+
+
[3]:
+
+
+
from ugropy import get_groups
+from rdkit.Chem import Draw
+
+mol = get_groups(unifac, "C1(=CC=CC=C1)OC(C)(C)C", "smiles")
+
+Draw.MolToImage(mol.mol_object)
+
+
+
+
+
[3]:
+
+
+
+../_images/tutorial_ugropy_failing_5_0.png +
+
+
+
[4]:
+
+
+
print(mol.subgroups)
+
+
+
+
+
+
+
+
+{}
+
+
+

The library “fails” to obtain any functional groups to accurately represent the molecule. This failure is represented by an empty dictionary. In this case, the “fail” is correct, but it could fail due to errors in the groups SMARTS representations or the algorithm, resulting in an empty dictionary as well. Currently, the supported models are tested against the following numbers of molecules:

+
    +
  • Classic liquid-vapor UNIFAC: 408

  • +
  • Predictive Soave-Redlich-Kwong (PSRK): 442

  • +
  • Joback: 285

  • +
+

If you encounter a failing representation, you can examine the structure of the molecule and the list of functional groups of the failing model. If you determine that the molecule can indeed be modeled, you may have discovered a bug. Feel free to report the issue on the repository along with the failing molecule’s SMILES/name, the failing model and the ugropy version.

+
+

More than one solution

+

Models like UNIFAC or PSRK can have multiple solutions to represent a molecule, and ugropy tries its best to find them all. In such cases, you will receive a list of dictionaries, each containing one of the solutions found. Let’s take a look.

+
+
[5]:
+
+
+
from ugropy import Groups
+from rdkit.Chem import Draw
+
+
+mol = Groups("CCCC1=CC=C(CC(=O)OC)C=C1", "smiles")
+
+Draw.MolToImage(mol.mol_object, highlightAtoms=[7])
+
+
+
+
+
[5]:
+
+
+
+../_images/tutorial_ugropy_failing_8_0.png +
+
+

This molecule can be modeled in two ways depending on how we treat the CH2 attached to the ring and the ester carbon (highlighted in red). We can either form an ACCH2 group and model the ester group with COO, or we can use an AC group and model the ester group with CH2COO.

+
+
[6]:
+
+
+
print("UNIFAC:")
+print(mol.unifac.subgroups)
+print("PSRK:")
+print(mol.psrk.subgroups)
+
+
+
+
+
+
+
+
+UNIFAC:
+[{'CH3': 2, 'ACH': 4, 'ACCH2': 1, 'CH2COO': 1, 'CH2': 1, 'AC': 1}
+ {'CH3': 2, 'ACH': 4, 'ACCH2': 2, 'CH2': 1, 'COO': 1}]
+PSRK:
+[{'CH3': 2, 'ACH': 4, 'ACCH2': 1, 'CH2COO': 1, 'CH2': 1, 'AC': 1}
+ {'CH3': 2, 'ACH': 4, 'ACCH2': 2, 'CH2': 1, 'COO': 1}]
+
+
+
+
[7]:
+
+
+
svg1, svg2 = mol.unifac.draw(width=800)
+
+
+
+
+
[8]:
+
+
+
from IPython.display import SVG
+
+SVG(svg1)
+
+
+
+
+
[8]:
+
+
+
+../_images/tutorial_ugropy_failing_12_0.svg
+
+
+
[9]:
+
+
+
SVG(svg2)
+
+
+
+
+
[9]:
+
+
+
+../_images/tutorial_ugropy_failing_13_0.svg
+
+

This could be useful in cases where some groups have more interaction parameters than others in the mixture that you want to model with UNIFAC. Alternatively, you can try both approaches and compare if there are any differences.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/tutorial/ugropy_failing.ipynb b/tutorial/ugropy_failing.ipynb new file mode 100644 index 0000000..e6cc3ce --- /dev/null +++ b/tutorial/ugropy_failing.ipynb @@ -0,0 +1,555 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Failing\n", + "\n", + "`ugropy` may fail to obtain the subgroups of a molecule for a certain model for\n", + "two reasons: either there is a bug in the code, or the molecule cannot be\n", + "represented by the subgroups of the failing model.\n", + "\n", + "`ugropy` utilizes SMARTS for the representation of functional groups to inquire\n", + "whether the molecule contains those structures. Let's examine the functional\n", + "group list for the classic liquid-vapor UNIFAC model." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
detection_smartssmartscontributecomposedmolecular_weight
group
CH3[CX4H3]NaN{\"CH3\": 1}n15.03500
CH2[CX4H2]NaN{\"CH2\": 1}n14.02700
CH[CX4H]NaN{\"CH\": 1}n13.01900
C[CX4H0]NaN{\"C\": 1}n12.01100
CH2=CH[CH2]=[CH]NaN{\"CH2=CH\": 1}n27.04600
..................
NCO[NX2H0]=[CX2H0]=[OX1H0]NaN{\"NCO\": 1}n42.01700
(CH2)2SU[CH2]S(=O)(=O)[CH2]NaN{\"(CH2)2SU\": 1, \"CH2\": -1, \"CH2S\": -1}n92.11620
CH2CHSU[CH2]S(=O)(=O)[CH]NaN{\"CH2CHSU\": 1, \"CH\": -1, \"CH2S\": -1}n91.10840
IMIDAZOL[c]1:[c]:[n]:[c]:[n]:1NaN{\"IMIDAZOL\": 1, \"ACH\": -3}n68.07820
BTIC(F)(F)(F)S(=O)(=O)[N-]S(=O)(=O)C(F)(F)FNaN{\"BTI\": 1, \"CF3\": -2}n279.91784
\n", + "

113 rows × 5 columns

\n", + "
" + ], + "text/plain": [ + " detection_smarts smarts \\\n", + "group \n", + "CH3 [CX4H3] NaN \n", + "CH2 [CX4H2] NaN \n", + "CH [CX4H] NaN \n", + "C [CX4H0] NaN \n", + "CH2=CH [CH2]=[CH] NaN \n", + "... ... ... \n", + "NCO [NX2H0]=[CX2H0]=[OX1H0] NaN \n", + "(CH2)2SU [CH2]S(=O)(=O)[CH2] NaN \n", + "CH2CHSU [CH2]S(=O)(=O)[CH] NaN \n", + "IMIDAZOL [c]1:[c]:[n]:[c]:[n]:1 NaN \n", + "BTI C(F)(F)(F)S(=O)(=O)[N-]S(=O)(=O)C(F)(F)F NaN \n", + "\n", + " contribute composed molecular_weight \n", + "group \n", + "CH3 {\"CH3\": 1} n 15.03500 \n", + "CH2 {\"CH2\": 1} n 14.02700 \n", + "CH {\"CH\": 1} n 13.01900 \n", + "C {\"C\": 1} n 12.01100 \n", + "CH2=CH {\"CH2=CH\": 1} n 27.04600 \n", + "... ... ... ... \n", + "NCO {\"NCO\": 1} n 42.01700 \n", + "(CH2)2SU {\"(CH2)2SU\": 1, \"CH2\": -1, \"CH2S\": -1} n 92.11620 \n", + "CH2CHSU {\"CH2CHSU\": 1, \"CH\": -1, \"CH2S\": -1} n 91.10840 \n", + "IMIDAZOL {\"IMIDAZOL\": 1, \"ACH\": -3} n 68.07820 \n", + "BTI {\"BTI\": 1, \"CF3\": -2} n 279.91784 \n", + "\n", + "[113 rows x 5 columns]" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from ugropy import unifac\n", + "\n", + "unifac.subgroups" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For example, let's check the SMARTS representation of the alcohol group ACOH:" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'[cH0][OH]'" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "unifac.subgroups.loc[\"ACOH\", \"detection_smarts\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The SMARTS representation it's telling us that the OH group it's, of course, a\n", + "hydroxyl group bounded by a single bound to an aromatic carbon atom.\n", + "\n", + "An example of a molecule that cannot be represented by UNIFAC groups:" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAEsASwDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACikZgqlmICgZJJ4Fcbq/xS8K6Vc/Y4r59UvzwtnpkZuJGPp8vyg+xIoA7OivO/7X+I/iTjS9Es/Ddm3S51R/NnI9REvCn2aql78Hf7ZQ3Wt+L9bvdXUZgug6xx279QyRjpz2B/I80Aen0V574e8X6joerQ+FPG+yK/b5bHVBxDfqOBz/AAydMjufqM+hUAFFFFABRRRQAUUUUAFFFVdTvf7N0u6vfs89z5ETSeTbpukkwM7VHcmgC1RWT4d8SaX4q0iPUtJuBNA3DKeHjburjsw9P6VrUAFFFFABRRRQAUUUUAFFFUdY1ex0HSbnVNSnWC0t03yO38h6kngDuTQBJe6lY6cbcXt3Db/aJRDD5rhfMkPRRnqTjpVqvOPCuj33jDXIvG/iSBookB/sXTZOltGf+Wrj/no3B9uPbHo9ABRRRQAUUUUAFFFFABRRRQAUV57rPjPxNe+L77wx4P0a0nm08RfbL++mxFCZF3KNq/MePTPQjHemn4c6rr3zeMvFt/qEZ62Nj/otv9CF5ce5waANnXPiT4U0GY21xqsdxe52i0swZ5S3ptXOD9cVjf8ACS+PvEYx4f8AC8WjWrdLzXXIfHtCvzA/XIrrND8K6D4bi8vR9JtLPjBeOMb2Hux+Y/ia2KAPPF+GEusMJfGXiXUtcJOTaI/2a1/79p1+uRXZaRoGkaBbfZ9J021sou4gjClvqep/GtGigArlfGPiPV/C/wBk1KDSRf6LHu/tEwkmeFeMOq9Co5z/AExmuqoIyMGgDn7u08O/EPw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ym4GlpfXjcvdagTcSMfXL5AP0Arr6KAADAwOlFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAcT4u+HUXiDVINa0nVJ9C1yIFGvrVMmVCMbXXIz7HP58Yi034TeHoJo7vWmu/EOoKObnVZ2m/JCduPY5ru6KAI4IIbaFIYIkiiQYVI1Cqo9gKkoooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA/9k=", + "image/png": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAIAAAD2HxkiAAAiC0lEQVR4nO3de1hU1d4H8N8MF7mIiFCKd0Uz8VaSKaJpiseUidIYswz1iGFZjk89nePjqbcpz9PdOlPaW6QeRVMT1Gq8oK+aIYr3RAVvKHgBb1wUkDsz6/1jcSYP4DDM7NlrBr6f5/xxHmbc+3fm8B32Xuu31lYwxggAxFGKLgCgpUMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAEEQwgBBEMIAQRDCAE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DCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEAwhBBAMIQQQDCEEEOz/ARW0WWMzok8iAAAAAElFTkSuQmCC", + "text/plain": [ + "" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from ugropy import get_groups\n", + "from rdkit.Chem import Draw\n", + "\n", + "mol = get_groups(unifac, \"C1(=CC=CC=C1)OC(C)(C)C\", \"smiles\")\n", + "\n", + "Draw.MolToImage(mol.mol_object)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{}\n" + ] + } + ], + "source": [ + "print(mol.subgroups)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The library \"fails\" to obtain any functional groups to accurately represent the\n", + "molecule. This failure is represented by an empty dictionary. In this case, the\n", + "\"fail\" is correct, but it could fail due to errors in the groups SMARTS\n", + "representations or the algorithm, resulting in an empty dictionary as well.\n", + "Currently, the supported models are tested against the following numbers of\n", + "molecules:\n", + "\n", + "- Classic liquid-vapor UNIFAC: 408\n", + "- Predictive Soave-Redlich-Kwong (PSRK): 442\n", + "- Joback: 285\n", + "\n", + "If you encounter a failing representation, you can examine the structure of the\n", + "molecule and the list of functional groups of the failing model. If you\n", + "determine that the molecule can indeed be modeled, you may have discovered a\n", + "bug. Feel free to report the issue on the repository along with the failing\n", + "molecule's SMILES/name, the failing model and the `ugropy` version.\n", + "\n", + "#### More than one solution\n", + "Models like UNIFAC or PSRK can have multiple solutions to represent a molecule,\n", + "and ugropy tries its best to find them all. In such cases, you will receive a\n", + "list of dictionaries, each containing one of the solutions found. Let's take a\n", + "look." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAEsASwDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAoorG8W60fDvhHVtXTYZLS1eSMOMqXx8oPsWxQBs1y+u/ETwp4dYxX+s25uAcfZoD50pPptTJH44rldL8Fah4nsbGbxp4w1G7nu7ZZzpVtItrGFIBKsqYL4zjPFdtofg7w74aQDR9HtLRgMeYseZD9XOWP4mgDmP+E18Xa9lfC/gyeCE/dvdcf7On18sfMw+hqveeCdf1WxnuPG3ji4jsUjZ5rXS1FrCiAZO5zyy/UV6XSMquhR1DKwwQRkEUAeSaXqFx8NILe4ivJdb8AXZDQ3gbzZdPLf3sfejJ9Oh9+G9XtrmC9tYrq1mjmglUPHJGwZWU9CCOorzPVNCvvh1cXOqaBZtqPhW5JbU9Dxu8gH70kIPbHVOmPb7tDTrw+CrRPEfhSV9X8B3ZMlxZRktLp5P3njB52g/eQ9P1oA9goqppeqWOtabBqOnXMdzaTrujljOQR/Q+oPIq3QAUUUUANkkSGMySOqIvVmOAKq2+q2F1L5cN1E79lB5P09a88+IPjvQ9PvYrGXVYXKLuMFu3mvvJIwQucHjv61y2h+MLLV9QezWG7sbxAJI4rtPLeRf7y81jOr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KACiiigAooooAKKKKACiiigArL8QeH9M8T6PNperWyz20o+jI3ZlPZh61qUUAeZ2Xw/8ZPCdO1P4hX39kw/JCLOFY7h07b5cbgccd63tH+GPhLRp/tMekpd3h5a6vmNxIx9cvkA/QCuuooAQAAAAAAdAKWiigAooooAKKKKACiiigBrtsjZsE4BOB3riUgubrwU3iJtUvBqDWjXgxO3kr8pby/K+6Vx8pyM+9dxWC3hOxZWg8+8Fgzl2sRN+5JJyRjGduf4c49qyqRctjuwdaFO/M7ap7Xule6+enk+pr2MglsLaRYxGHiVggGAuQOKno6DAorVHFJ3bYUUUUCCiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD//Z", + "image/png": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAIAAAD2HxkiAAAbYklEQVR4nO3deXjNZ9oH8Ptkl4UkllheSSRaxDaqJYSqSUpVFkkdM9KG0RKlEjVTjNFWTS9KhwpDizaIvbIgiUjEMq4oMrTWSGuIJRJ7ImSV5DzvH4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hBGCGEAIwQwgBmCGEAMwQQgBmCCEAM4QQgBlCCMAMIQRghhACMEMIAZghhADMEEIAZgghADOEEIAZQgjADCEEYIYQAjBDCAGYIYQAzBBCAGYIIQAzhBCAGUIIwAwhBGCGEAIwQwgBmCGEAMwQQgBmCCEAM4QQgBlCCMAMIQRghhACMEMIAZghhADMEEIAZgghADOEEIAZQgjADCEEYIYQAjBDCAGYIYQAzBBCAGYIIQAzhBCAGUIIwAwhBGCGEAIwQwgBmCGEAMwQQgBmCCEAM4QQgBlCCMAMIQRghhACMEMIAZghhADMEEIAZgghADOEEIAZQgjADCEEYIYQAjBDCAGYIYQAzBBCAGYIIQAzhBCAGUIIwAwhBGCGEAIwQwgBmCGEAMwQQgBmCCEAM4QQgBlCCMAMIQRghhACMEMIAZghhADMEEIAZgghADOEEIAZQgjADCEEYPb/IrzX6qjISt0AAAAASUVORK5CYII=", + "text/plain": [ + "" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from ugropy import Groups\n", + "from rdkit.Chem import Draw\n", + "\n", + "\n", + "mol = Groups(\"CCCC1=CC=C(CC(=O)OC)C=C1\", \"smiles\")\n", + "\n", + "Draw.MolToImage(mol.mol_object, highlightAtoms=[7])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This molecule can be modeled in two ways depending on how we treat the CH2\n", + "attached to the ring and the ester carbon (highlighted in red). We can either\n", + "form an ACCH2 group and model the ester group with COO, or we can use an AC\n", + "group and model the ester group with CH2COO." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "UNIFAC:\n", + "[{'CH3': 2, 'ACH': 4, 'ACCH2': 1, 'CH2COO': 1, 'CH2': 1, 'AC': 1}\n", + " {'CH3': 2, 'ACH': 4, 'ACCH2': 2, 'CH2': 1, 'COO': 1}]\n", + "PSRK:\n", + "[{'CH3': 2, 'ACH': 4, 'ACCH2': 1, 'CH2COO': 1, 'CH2': 1, 'AC': 1}\n", + " {'CH3': 2, 'ACH': 4, 'ACCH2': 2, 'CH2': 1, 'COO': 1}]\n" + ] + } + ], + "source": [ + "print(\"UNIFAC:\")\n", + "print(mol.unifac.subgroups)\n", + "print(\"PSRK:\")\n", + "print(mol.psrk.subgroups)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "svg1, svg2 = mol.unifac.draw(width=800)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "CH3ACHACCH2CH2COOCH2AC" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from IPython.display import SVG\n", + "\n", + "SVG(svg1)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + " \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "CH3ACHACCH2CH2COO" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "SVG(svg2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This could be useful in cases where some groups have more interaction\n", + "parameters than others in the mixture that you want to model with UNIFAC.\n", + "Alternatively, you can try both approaches and compare if there are any\n", + "differences." + ] + } + ], + "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 +} diff --git a/tutorial/writers.html b/tutorial/writers.html new file mode 100644 index 0000000..af1cd4a --- /dev/null +++ b/tutorial/writers.html @@ -0,0 +1,230 @@ + + + + + + + Writers — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Writers

+
+

Clapeyron (https://github.com/ClapeyronThermo/Clapeyron.jl)

+

ugropy provides a writers module for constructing input files for various thermodynamic libraries.

+

To utilize this function, you must import the module as follows:

+
+
[1]:
+
+
+
from ugropy import Groups, writers
+
+
+
+

To utilize the function, you need to provide a list of dictionaries for the functional groups of UNIFAC and PSRK, where each dictionary contains the functional groups of the molecules.

+

If the user wishes to write critical properties .csv files, they must provide a list of Joback objects. Let’s illustrate this with a simple example:

+
+
[2]:
+
+
+
names = ["limonene", "adrenaline", "Trinitrotoluene"]
+
+grps = [Groups(n) for n in names]
+
+# Write the csv files into a database directory
+writers.to_clapeyron(
+    molecules_names=names,
+    unifac_groups=[g.unifac.subgroups for g in grps],
+    psrk_groups=[g.psrk.subgroups for g in grps],
+    joback_objects=[g.joback for g in grps],
+    path="database"
+)
+
+
+
+

In the example provided, we create a Groups object to obtain all the information of the molecules. Then, we use list comprehension to create the lists for the to_clapeyron function.

+

The molecules_name argument in this case receives the names used to create the Groups objects, but it can be different if desired. These names will be set as the molecule names in the .csv files.

+

You can omit certain arguments if desired:

+
    +
  • If you omit the psrk_groups argument: the PSRK_groups.csv file will not be created.

  • +
  • If you omit the unifac_groups argument: the ogUNIFAC_groups.csv file will not be created.

  • +
  • If you omit the joback_objects argument: the critical.csv file will not be created.

  • +
+
+
+

Thermo (https://github.com/CalebBell/thermo)

+

ugropy also provides a translator of its subgroups dictionaries to the Thermo library dictionaries.

+

Let’s recreate the simple example of the Thermo documentation:

+

https://thermo.readthedocs.io/activity_coefficients.html#unifac-example

+
+
[3]:
+
+
+
from thermo.unifac import UFIP, UFSG, UNIFAC
+
+from ugropy import Groups, unifac, writers
+
+
+names = ["hexane", "2-butanone"]
+
+grps = [Groups(n) for n in names]
+
+thermo_groups = [writers.to_thermo(g.unifac.subgroups, unifac) for g in grps]
+
+print(thermo_groups)
+
+
+
+
+
+
+
+
+[{1: 2, 2: 4}, {1: 1, 2: 1, 18: 1}]
+
+
+
+
[4]:
+
+
+
GE = UNIFAC.from_subgroups(
+    chemgroups=thermo_groups,
+    T=60+273.15,
+    xs=[0.5, 0.5],
+    version=0,
+    interaction_data=UFIP,
+    subgroups=UFSG
+)
+
+GE.gammas()
+
+
+
+
+
[4]:
+
+
+
+
+[1.4276025835624184, 1.3646545010104223]
+
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/tutorial/writers.ipynb b/tutorial/writers.ipynb new file mode 100644 index 0000000..c6bbfbb --- /dev/null +++ b/tutorial/writers.ipynb @@ -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": 2, + "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": 3, + "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": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1.4276025835624184, 1.3646545010104223]" + ] + }, + "execution_count": 4, + "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 +} diff --git a/ugropy.html b/ugropy.html new file mode 100644 index 0000000..3e35ba8 --- /dev/null +++ b/ugropy.html @@ -0,0 +1,1533 @@ + + + + + + + Available Models — ugropy 2.0.5 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Available Models

+

Fragmentation models implemented.

+

All models can be imported directly with:

+
from ugropy import joback, psrk, unifac
+
+
+

You can check the group list and their SMARTS representation with:

+
joback.subgroups psrk.subgroups unifac.subgroups
+
+
+

In the case of a PropertiesEstimator like joback, you can check the +contribution of each group to the properties with:

+
joback.properties_contributions
+
+
+
+
+ugropy.fragmentation_models.models.unifac
+

Classic LV-UNIFAC FragmentationModel [1, 2, 3, 4, 5, 6, 7]

+
+
Type:
+

GibbsModel

+
+
+
+ +
+
+ugropy.fragmentation_models.models.psrk
+

Predictive Soave-Redlich-Kwong FragmentationModel [1, 8, 9]

+
+
Type:
+

GibbsModel

+
+
+
+ +
+
+ugropy.fragmentation_models.models.joback
+

Joback FragmentationModel [10, 11]

+
+
Type:
+

PropertiesEstimator

+
+
+
+ +
+
+

Core

+

Core module.

+

FragmentationModel subgroups detection functions.

+
+
+ugropy.core.check_can_fit_atoms(mol_object: Mol, mol_subgroups: dict, model: FragmentationModel) bool[source]
+

Check if a solution can be fitted in the mol_object atoms.

+
+
Parameters:
+
    +
  • mol_object (Chem.rdchem.Mol) – RDKit Mol object.

  • +
  • mol_subgroups (dict) – Subgroups of mol_object.

  • +
  • model (FragmentationModel) – FragmentationModel object.

  • +
+
+
Returns:
+

True if the solution can be fitted.

+
+
Return type:
+

bool

+
+
+
+ +
+
+ugropy.core.check_has_composed(mol_subgroups: dict, model: FragmentationModel) tuple[bool, ndarray][source]
+

Check if the molecule has composed structures.

+

A composed structure is a subgroup of FragmentationModel that can be +decomposed into two or more FragmentationModel subgroups. For example, +ACCH2 can be decomposed into the AC and CH2 groups.

+
+
Parameters:
+
    +
  • mol_subgroups (dict) – Dictionary with the detected subgroups.

  • +
  • model (FragmentationModel) – FragmentationModel object.

  • +
+
+
Returns:
+

True if the molecule has composed structures.

+
+
Return type:
+

bool

+
+
+
+ +
+
+ugropy.core.draw(mol_object: Mol, subgroups: dict, model: FragmentationModel, title: str = '', width: float = 400, height: float = 200, title_font_size: float = 12, legend_font_size: float = 12, font: str = 'Helvetica') str[source]
+

Create a svg representation of the fragmentation result.

+
+
Parameters:
+
    +
  • mol_object (Chem.rdchem.Mol) – RDKit Mol object.

  • +
  • mol_subgroups (Union[dict, List[dict]]) – Subgroups of mol_object.

  • +
  • model (FragmentationModel) – FragmentationModel object.

  • +
  • title (str, optional) – Graph title, by default “”

  • +
  • width (int, optional) – Graph width, by default 400

  • +
  • height (int, optional) – Graph height, by default 200

  • +
  • title_font_size (int, optional) – Font size of graph’s title, by default 12

  • +
  • legend_font_size (int, optional) – Legend font size, by default 12

  • +
  • font (str, optional) – Text font, by default “Helvetica”

  • +
+
+
Returns:
+

SVG string.

+
+
Return type:
+

str

+
+
+
+ +
+
+ugropy.core.check_has_hiden(mol_object: Mol, mol_subgroups: dict, model: FragmentationModel) bool[source]
+

Check for hidden subgroups in composed structures.

+

The principal subgroups that can be hidden in composed structures for the +models UNIFAC, PSRK and Dortmund are CH2 and CH. The algorithm checks that +the number of CH2 and CH groups in mol_subgroups dictionary is equal to the +number of free CH2 and CH. If these numbers are not equal reveals that the +CH2 and CH are hidden in composed structures, eg: ACCH2, ACCH. This +phenomenon occurs when two subgroups fight for the same CH2 or CH. For +example the molecule:

+

CCCC1=CC=C(COC(C)(C)C)C=C1

+

Here an ACCH2 and a CH2O are fighting to have the same CH2. But since there +is a free CH2 in the molecule, the algorithm prefers to keep both ACCH2 and +CH2O groups without any free CH2 subgroup. This check counts all the CH2 +that are participating in a CH2 hideout (ACCH2 and CH2O are examples of +hideouts). The algorithm notices that there is one free CH2 and there are +zero free CH2 groups in the mol_subgroups dictionary and returns ‘True’ +(mol_object has a hidden CH2).

+
+
Parameters:
+
    +
  • mol_object (Chem.rdchem.Mol) – RDKit Mol object.

  • +
  • mol_subgroups (dict) – Subgroups of mol_object.

  • +
  • model (FragmentationModel) – FragmentationModel object.

  • +
+
+
Returns:
+

True if has hidden subgroups.

+
+
Return type:
+

bool

+
+
+
+ +
+
+ugropy.core.check_has_molecular_weight_right(mol_object: Mol, mol_subgroups: dict, model: FragmentationModel) bool[source]
+

Check the molecular weight of the molecule using its functional groups.

+

Compares the RDKit molecular weight of the molecule to the computed +molecular weight from the functional groups. Returns True if both molecular +weights are equal with 0.5 u (half hydrogen atom) as atol of +numpy.allclose(). Also, the method will check if the molecule has negative +occurrences on its functional groups, also returning False in that case.

+
+
Parameters:
+
    +
  • mol_object (Chem.rdchem.Mol) – RDKit Chem object

  • +
  • mol_subgroups (dict) – FragmentationModel subgroups of the mol_object

  • +
  • model (FragmentationModel) – FragmentationModel object.

  • +
+
+
Returns:
+

True if RDKit and ugropy molecular weight are equal with a tolerance.

+
+
Return type:
+

bool

+
+
+
+ +
+
+ugropy.core.check_has_composed_overlapping(mol_object: Mol, mol_subgroups: dict, model: FragmentationModel) bool[source]
+

Check if in the solution are composed structures overlapping.

+
+
Parameters:
+
    +
  • mol_object (Chem.rdchem.Mol) – RDKit Mol object.

  • +
  • mol_subgroups (dict) – Subgroups of mol_object.

  • +
  • model (FragmentationModel) – FragmentationModel object.

  • +
+
+
Returns:
+

Treu if the solution has overlapping composed structures.

+
+
Return type:
+

bool

+
+
+
+ +
+
+ugropy.core.correct_composed(mol_object: Mol, mol_subgroups: dict, model: FragmentationModel) dict[source]
+

Correct composed structures.

+

A priori is not easy to recognize what composed structures in +mol_subgroups need to be decomposed to correct the solution. By that, all +the combinations are tried. For example, a molecule that can’t be solved +has one ACCH2 and two ACCH composed structures. The decomposition +combinatory will be:

+

[[ACCH2], [ACCH], [ACCH2, ACCH], [ACCH, ACCH], [ACCH2, ACCH, ACCH]]

+
+
Parameters:
+
    +
  • mol_object (Chem.rdchem.Mol) – RDKit Mol object.

  • +
  • mol_subgroups (dict) – Molecule’s FragmentationModel subgroups.

  • +
  • model (FragmentationModel) – FragmentationModel object.

  • +
+
+
Returns:
+

Corrected subgroups due to decomposing composed structures.

+
+
Return type:
+

dict or list[dict]

+
+
+
+ +
+
+ugropy.core.fit_atoms(mol_object: Mol, mol_subgroups: dict, model: FragmentationModel) dict[source]
+

Assign the atoms indexes for each mol_subgroup.

+
+
Parameters:
+
    +
  • mol_object (Chem.rdchem.Mol) – RDKit Mol object.

  • +
  • mol_subgroups (dict) – Subgroups of mol_object.

  • +
  • model (FragmentationModel) – FragmentationModel object.

  • +
+
+
Returns:
+

Atom indexes in mol_object of each subgroup.

+
+
Return type:
+

dict

+
+
+
+ +
+
+ugropy.core.get_groups(model: FragmentationModel, identifier: str | Mol, identifier_type: str = 'name') Fragmentation[source]
+

Obtain the FragmentationModel’s subgroups of an RDkit Mol object.

+
+
Parameters:
+
    +
  • model (FragmentationModel) – FragmentationModel object.

  • +
  • identifier (str or rdkit.Chem.rdchem.Mol) – Identifier of a molecule (name, SMILES or Chem.rdchem.Mol). Example: +hexane or CCCCCC.

  • +
  • identifier_type (str, optional) – Use ‘name’ to search a molecule by name, ‘smiles’ to provide the +molecule SMILES representation or ‘mol’ to provide a +rdkit.Chem.rdchem.Mol object, by default “name”.

  • +
+
+
Returns:
+

FragmentationModel’s subgroups

+
+
Return type:
+

Fragmentation

+
+
+
+ +
+
+ugropy.core.instantiate_mol_object(identifier: str | Mol, identifier_type: str = 'name') Mol[source]
+

Instantiate a RDKit Mol object from molecule’s name or SMILES.

+
+
Parameters:
+
    +
  • identifier (str or rdkit.Chem.rdchem.Mol) – Identifier of a molecule (name, SMILES or rdkit.Chem.rdchem.Mol). +Example: hexane or CCCCCC for name or SMILES respectively.

  • +
  • identifier_type (str, optional) – Use ‘name’ to search a molecule by name, ‘smiles’ to provide the +molecule SMILES representation or ‘mol’ to provide a +rdkit.Chem.rdchem.Mol object, by default “name”.

  • +
+
+
Returns:
+

RDKit Mol object.

+
+
Return type:
+

rdkit.Chem.rdchem.Mol

+
+
+
+ +
+
+ugropy.core.correct_problematics(mol_object: Mol, mol_subgroups: dict, model: FragmentationModel) dict[source]
+

Correct problematic structures in mol_object.

+
+
Parameters:
+
    +
  • mol_object (Chem.rdchem.Mol) – RDKit Chem object

  • +
  • mol_subgroups (dict) – Dictionary with the subgroups not problematics corrected in mol_object.

  • +
  • model (FragmentationModel) – FragmentationModel object.

  • +
+
+
Returns:
+

Molecule’s subrgoups corrected with the problematic structures list.

+
+
Return type:
+

dict

+
+
+
+ +
+
+

Constants

+

constants module.

+
+
+ugropy.constants.R
+

Gas constant [J/mol/K]

+
+
Type:
+

float

+
+
+
+ +
+
+

Groups

+

Groups module.

+
+
+class ugropy.groups.Groups(identifier: str, identifier_type: str = 'name', normal_boiling_temperature: float = None)[source]
+

Bases: object

+

Group class.

+

Stores the solved FragmentationModels subgroups of a molecule.

+
+
Parameters:
+
    +
  • identifier (str or rdkit.Chem.rdchem.Mol) – Identifier of a molecule (name, SMILES or Chem.rdchem.Mol). Example: +hexane or CCCCCC.

  • +
  • identifier_type (str, optional) – Use ‘name’ to search a molecule by name, ‘smiles’ to provide the +molecule SMILES representation or ‘mol’ to provide a +rdkit.Chem.rdchem.Mol object, by default “name”.

  • +
  • normal_boiling_temperature (float, optional) – If provided, will be used to estimate critical temperature, acentric +factor, and vapor pressure instead of the estimated normal boiling +point in the Joback group contribution model, by default None.

  • +
+
+
+
+
+identifier
+

Identifier of a molecule. Example: hexane or CCCCCC.

+
+
Type:
+

str

+
+
+
+ +
+
+identifier_type
+

Use ‘name’ to search a molecule by name or ‘smiles’ to provide the +molecule SMILES representation, by default “name”.

+
+
Type:
+

str, optional

+
+
+
+ +
+
+mol_object
+

RDKit Mol object.

+
+
Type:
+

rdkit.Chem.rdchem.Mol

+
+
+
+ +
+
+molecular_weight
+

Molecule’s molecular weight from rdkit.Chem.Descriptors.MolWt [g/mol].

+
+
Type:
+

float

+
+
+
+ +
+
+unifac
+

Classic LV-UNIFAC subgroups.

+
+
Type:
+

Fragmentation

+
+
+
+ +
+
+psrk
+

Predictive Soave-Redlich-Kwong subgroups.

+
+
Type:
+

Fragmentation

+
+
+
+ +
+
+joback
+

JobackProperties object that contains the Joback subgroups and the +estimated properties of the molecule.

+
+
Type:
+

JobackProperties

+
+
+
+ +
+ +
+
+

Properties

+

Properties module.

+
+
+class ugropy.properties.JobackProperties(identifier: str, identifier_type: str = 'name', normal_boiling_point: float = None)[source]
+

Bases: object

+

Joback group contribution properties estimator.

+

The class recieves either the Joback and Reid model’s [10, 11] groups, name or smiles of a molecule and estimates the its +properties.

+
+
Parameters:
+
    +
  • identifier (str or rdkit.Chem.rdchem.Mol) – Identifier of a molecule (name, SMILES, groups, or Chem.rdchem.Mol). +Example: you can use hexane, CCCCCC, {“-CH3”: 2, “-CH2-”: 4} for name, +SMILES and groups respectively.

  • +
  • identifier_type (str, optional) – Use ‘name’ to search a molecule by name, ‘smiles’ to provide the +molecule SMILES representation, ‘groups’ to provide Joback groups or +‘mol’ to provide a rdkit.Chem.rdchem.Mol object, by default “name”.

  • +
  • normal_boiling_point (float, optional) – If provided, will be used to estimate critical temperature, acentric +factor, and vapor pressure instead of the estimated normal boiling +point, by default None.

  • +
+
+
+
+
+subgroups
+

Joback functional groups of the molecule.

+
+
Type:
+

dict

+
+
+
+ +
+
+experimental_boiling_temperature
+

User provided experimental normal boiling point [K].

+
+
Type:
+

float

+
+
+
+ +
+
+critical_temperature
+

Joback estimated critical temperature [K].

+
+
Type:
+

float

+
+
+
+ +
+
+critical_pressure
+

Joback estimated critical pressure [bar].

+
+
Type:
+

float

+
+
+
+ +
+
+critical_volume
+

Joback estimated critical volume [cm³/mol].

+
+
Type:
+

float

+
+
+
+ +
+
+normal_boiling_point
+

Joback estimated normal boiling point [K].

+
+
Type:
+

float

+
+
+
+ +
+
+fusion_temperature
+

Joback estimated fusion temperature [K].

+
+
Type:
+

float

+
+
+
+ +
+
+h_formation
+

Joback estimated enthalpy of formation ideal gas at 298 K [kJ/mol].

+
+
Type:
+

float

+
+
+
+ +
+
+g_formation
+

Joback estimated Gibbs energy of formation ideal gas at 298 K [K].

+
+
Type:
+

float

+
+
+
+ +
+
+heat_capacity_ideal_gas_params
+

Joback estimated Reid’s ideal gas heat capacity equation parameters +[J/mol/K].

+
+
Type:
+

dict

+
+
+
+ +
+
+h_fusion
+

Joback estimated fusion enthalpy [kJ/mol].

+
+
Type:
+

float

+
+
+
+ +
+
+h_vaporization
+

Joback estimated vaporization enthalpy at the normal boiling point +[kJ/mol].

+
+
Type:
+

float

+
+
+
+ +
+
+sum_na
+

Joback n_A contribution to liquid viscosity [N/s/m²].

+
+
Type:
+

float

+
+
+
+ +
+
+sum_nb
+

Joback n_B contribution to liquid viscosity [N/s/m²].

+
+
Type:
+

float

+
+
+
+ +
+
+molecular_weight
+

Molecular weight from Joback’s subgroups [g/mol].

+
+
Type:
+

float

+
+
+
+ +
+
+acentric_factor
+

Acentric factor from Lee and Kesler’s equation [10].

+
+
Type:
+

float

+
+
+
+ +
+
+vapor_pressure_params
+

Vapor pressure G and k parameters for the Riedel-Plank-Miller +[10] equation [bar].

+
+
Type:
+

dict

+
+
+
+ +
+
+heat_capacity_ideal_gas(temperature: float | ndarray[Any, dtype[_ScalarType_co]]) float | ndarray[Any, dtype[_ScalarType_co]][source]
+

Calculate the ideal gas heat capacity [J/mol/K].

+

Uses the Joback estimated Reid’s ideal gas heat capacity equation +parameters [J/mol/K].

+
+
Parameters:
+

temperature (Union[float, NDArray]) – Temperature [K]

+
+
Returns:
+

Ideal gas heat capacity [J/mol/K].

+
+
Return type:
+

Union[float, NDArray]

+
+
+
+ +
+
+heat_capacity_liquid(temperature: float | ndarray[Any, dtype[_ScalarType_co]]) float | ndarray[Any, dtype[_ScalarType_co]][source]
+

Calculate the liquid heat capacity [J/mol/K].

+

Uses the Rowlinson-Bondi [10] equation with the Joback +estimated properties.

+
+
Parameters:
+

temperature (Union[float, NDArray]) – Temperature [K]

+
+
Returns:
+

Ideal gas heat capacity [J/mol/K].

+
+
Return type:
+

Union[float, NDArray]

+
+
+
+ +
+
+viscosity_liquid(temperature: float | ndarray[Any, dtype[_ScalarType_co]]) float | ndarray[Any, dtype[_ScalarType_co]][source]
+

Calculate the Joback estimated liquid viscosity [N/s/m²].

+
+
Parameters:
+

temperature (Union[float, NDArray]) – Temperature [K]

+
+
Returns:
+

Liquid viscosity [N/s/m²].

+
+
Return type:
+

Union[float, NDArray]

+
+
+
+ +
+
+vapor_pressure(temperature: float | ndarray[Any, dtype[_ScalarType_co]]) float | ndarray[Any, dtype[_ScalarType_co]][source]
+

Calculate the vapor pressure [bar].

+

Uses the Riedel-Plank-Miller [10] equation with the Joback +estimated properties.

+
+
Parameters:
+

temperature (Union[float, NDArray]) – Temperature [K]

+
+
Returns:
+

Vapor pressure [bar]

+
+
Return type:
+

Union[float, NDArray]

+
+
+
+ +
+ +
+
+

Fragmentation Models

+

FragmentationModel module.

+

All ugropy models (joback, unifac, psrk) are instances of the +FragmentationModule class.

+
+
+class ugropy.fragmentation_models.fragmentation_model.FragmentationModel(subgroups: DataFrame, split_detection_smarts: List[str] = [], problematic_structures: DataFrame | None = None, hideouts: DataFrame | None = None)[source]
+

Bases: object

+

FragmentationModel class.

+

All ugropy supported models are an instance of this class. This class can +be used by the user to create their own FragmentationModels.

+
+
Parameters:
+
    +
  • subgroups (pd.DataFrame) – Model’s subgroups. Index: ‘group’ (groups names). Mandatory columns: +‘detection_smarts’ (SMARTS representations of the group to detect its +precense in the molecule), ‘smarts’ (true SMARTS of the group witouht +additional atom detections), ‘contribute’ (dictionary as a string with +the group contribution), ‘composed’ (y or n if it is or is not a +composed structure), ‘molecular_weight’ (molecular weight of the +subgroups).

  • +
  • split_detection_smarts (List[str], optional) – List of subgroups that have different SMARTS representations. by +default []

  • +
  • problematic_structures (Union[pd.DataFrame, None], optional) – Model’s problematic/ambiguous structures. Index: ‘smarts’ (SMARTS of +the problematic structure). Mandatory columns: ‘contribute’ (dictionary +as a string with the structure contribution), by default None

  • +
  • hideouts (Union[pd.DataFrame, None], optional) – Hideouts for each group. Index: ‘group’ (Group of the model that can be +hiden). Mandatory columns: ‘hideout’ (other subgroups to find the hiden +subgroup), by defautl None

  • +
+
+
+
+
+subgroups
+

Model’s subgroups. Index: ‘group’ (groups names). Mandatory columns: +‘detection_smarts’ (SMARTS representations of the group to detect its +precense in the molecule), ‘smarts’ (true SMARTS of the group witouht +additional atom detections. If a value is missing uses the +corresponding detection_smarts), ‘contribute’ (dictionary as a string +with the group contribution), ‘composed’ (y or n if it is or is not a +composed structure), ‘molecular_weight’ (molecular weight of the +subgroups).

+
+
Type:
+

pd.DataFrame

+
+
+
+ +
+
+split_detection_smarts
+

List of subgroups that have different SMARTS representations.

+
+
Type:
+

List[str]

+
+
+
+ +
+
+problematic_structures
+

Model’s problematic/ambiguous structures. Index: ‘smarts’ (SMARTS of +the problematic structure). Mandatory columns: ‘contribute’ (dictionary +as a string with the structure contribution)

+
+
Type:
+

pd.Dataframe

+
+
+
+ +
+
+hideouts
+

Hideouts for each group. Index: ‘group’ (Group of the model that can be +hiden). Mandatory columns: ‘hideout’ (other subgroups to find the hiden +subgroup)

+
+
Type:
+

pd.DataFrame

+
+
+
+ +
+
+detection_mols
+

Dictionary cotaining all the rdkit Mol object from the detection_smarts +subgroups column.

+
+
Type:
+

dict

+
+
+
+ +
+
+fit_mols
+

Dictionary cotaining all the rdkit Mol object from the smarts subgroups +column.

+
+
Type:
+

dict

+
+
+
+ +
+
+contribution_matrix
+

Contribution matrix of the model built from the subgroups contribute.

+
+
Type:
+

pd.Dataframe

+
+
+
+ +
+ +
+
+

Gibbs Models

+

GibbsModel module.

+
+
+class ugropy.fragmentation_models.gibbs_model.GibbsModel(subgroups: DataFrame, split_detection_smarts: List[str] = [], problematic_structures: DataFrame | None = None, hideouts: DataFrame | None = None, subgroups_info: DataFrame | None = None, main_groups: DataFrame | None = None)[source]
+

Bases: FragmentationModel

+

GibbsModel it’s a fragmentation model dedicated to Gibbs excess models.

+

unifac, psrk, dortmund are instances of this class.

+
+
Parameters:
+
    +
  • subgroups (pd.DataFrame) – Model’s subgroups. Index: ‘group’ (groups names). Mandatory columns: +‘detection_smarts’ (SMARTS representations of the group to detect its +precense in the molecule), ‘smarts’ (true SMARTS of the group witouht +additional atom detections), ‘contribute’ (dictionary as a string with +the group contribution), ‘composed’ (y or n if it is or is not a +composed structure), ‘molecular_weight’ (molecular weight of the +subgroups).

  • +
  • split_detection_smarts (List[str], optional) – List of subgroups that have different SMARTS representations. by +default []

  • +
  • problematic_structures (Union[pd.DataFrame, None], optional) – Model’s problematic/ambiguous structures. Index: ‘smarts’ (SMARTS of +the problematic structure). Mandatory columns: ‘contribute’ (dictionary +as a string with the structure contribution), by default None

  • +
  • hideouts (Union[pd.DataFrame, None], optional) – Hideouts for each group. Index: ‘group’ (Group of the model that can be +hiden). Mandatory columns: ‘hideout’ (other subgroups to find the hiden +subgroup), by defautl None

  • +
  • subgroups_info (Union[pd.DataFrame, None], optional) – Information of the model’s subgroups (R, Q, subgroup_number, +main_group), by default None

  • +
  • main_groups (Union[pd.DataFrame, None], optional) – Main groups information (no., maingroup_name, subgroups), by default +None

  • +
+
+
+
+
+subgroups
+

Model’s subgroups. Index: ‘group’ (groups names). Mandatory columns: +‘detection_smarts’ (SMARTS representations of the group to detect its +precense in the molecule), ‘smarts’ (true SMARTS of the group witouht +additional atom detections. If a value is missing uses the +corresponding detection_smarts), ‘contribute’ (dictionary as a string +with the group contribution), ‘composed’ (y or n if it is or is not a +composed structure), ‘molecular_weight’ (molecular weight of the +subgroups).

+
+
Type:
+

pd.DataFrame

+
+
+
+ +
+
+split_detection_smarts
+

List of subgroups that have different SMARTS representations.

+
+
Type:
+

List[str]

+
+
+
+ +
+
+problematic_structures
+

Model’s problematic/ambiguous structures. Index: ‘smarts’ (SMARTS of +the problematic structure). Mandatory columns: ‘contribute’ (dictionary +as a string with the structure contribution)

+
+
Type:
+

pd.Dataframe

+
+
+
+ +
+
+hideouts
+

Hideouts for each group. Index: ‘group’ (Group of the model that can be +hiden). Mandatory columns: ‘hideout’ (other subgroups to find the hiden +subgroup)

+
+
Type:
+

pd.DataFrame

+
+
+
+ +
+
+detection_mols
+

Dictionary cotaining all the rdkit Mol object from the detection_smarts +subgroups column.

+
+
Type:
+

dict

+
+
+
+ +
+
+fit_mols
+

Dictionary cotaining all the rdkit Mol object from the smarts subgroups +column.

+
+
Type:
+

dict

+
+
+
+ +
+
+contribution_matrix
+

Contribution matrix of the model built from the subgroups contribute.

+
+
Type:
+

pd.Dataframe

+
+
+
+ +
+
+subgroups_info
+

Information of the model’s subgroups (R, Q, subgroup_number, +main_group).

+
+
Type:
+

pd.DataFrame

+
+
+
+ +
+
+main_groups
+

Main groups information (no., maingroup_name, subgroups).

+
+
Type:
+

pd.DataFrame

+
+
+
+ +
+ +
+
+

Properties Estimators

+

PropertiesEstimator module.

+
+
+class ugropy.fragmentation_models.prop_estimator.PropertiesEstimator(subgroups: DataFrame, split_detection_smarts: List[str] = [], problematic_structures: DataFrame | None = None, hideouts: DataFrame | None = None, properties_contributions: DataFrame | None = None)[source]
+

Bases: FragmentationModel

+

Fragmentation model dedicated to properties estimation models.

+

joback is a instance of this class.

+
+
Parameters:
+
    +
  • subgroups (pd.DataFrame) – Model’s subgroups. Index: ‘group’ (groups names). Mandatory columns: +‘detection_smarts’ (SMARTS representations of the group to detect its +precense in the molecule), ‘smarts’ (true SMARTS of the group witouht +additional atom detections), ‘contribute’ (dictionary as a string with +the group contribution), ‘composed’ (y or n if it is or is not a +composed structure), ‘molecular_weight’ (molecular weight of the +subgroups).

  • +
  • split_detection_smarts (List[str], optional) – List of subgroups that have different SMARTS representations. by +default []

  • +
  • problematic_structures (Union[pd.DataFrame, None], optional) – Model’s problematic/ambiguous structures. Index: ‘smarts’ (SMARTS of +the problematic structure). Mandatory columns: ‘contribute’ (dictionary +as a string with the structure contribution), by default None

  • +
  • hideouts (Union[pd.DataFrame, None], optional) – Hideouts for each group. Index: ‘group’ (Group of the model that can be +hiden). Mandatory columns: ‘hideout’ (other subgroups to find the hiden +subgroup), by defautl None

  • +
  • properties_contributions (pd.DataFrame, optional) – Group’s properties contributions, by default None

  • +
+
+
+
+
+subgroups
+

Model’s subgroups. Index: ‘group’ (groups names). Mandatory columns: +‘detection_smarts’ (SMARTS representations of the group to detect its +precense in the molecule), ‘smarts’ (true SMARTS of the group witouht +additional atom detections. If a value is missing uses the +corresponding detection_smarts), ‘contribute’ (dictionary as a string +with the group contribution), ‘composed’ (y or n if it is or is not a +composed structure), ‘molecular_weight’ (molecular weight of the +subgroups).

+
+
Type:
+

pd.DataFrame

+
+
+
+ +
+
+split_detection_smarts
+

List of subgroups that have different SMARTS representations.

+
+
Type:
+

List[str]

+
+
+
+ +
+
+problematic_structures
+

Model’s problematic/ambiguous structures. Index: ‘smarts’ (SMARTS of +the problematic structure). Mandatory columns: ‘contribute’ (dictionary +as a string with the structure contribution)

+
+
Type:
+

pd.Dataframe

+
+
+
+ +
+
+hideouts
+

Hideouts for each group. Index: ‘group’ (Group of the model that can be +hiden). Mandatory columns: ‘hideout’ (other subgroups to find the hiden +subgroup)

+
+
Type:
+

pd.DataFrame

+
+
+
+ +
+
+detection_mols
+

Dictionary cotaining all the rdkit Mol object from the detection_smarts +subgroups column.

+
+
Type:
+

dict

+
+
+
+ +
+
+fit_mols
+

Dictionary cotaining all the rdkit Mol object from the smarts subgroups +column.

+
+
Type:
+

dict

+
+
+
+ +
+
+contribution_matrix
+

Contribution matrix of the model built from the subgroups contribute.

+
+
Type:
+

pd.Dataframe

+
+
+
+ +
+
+properties_contributions
+

Group’s properties contributions.

+
+
Type:
+

pd.DataFrame

+
+
+
+ +
+ +
+
+

Writers

+

Writers module.

+

The witers module contains functions to construct the neccesary inputs for +other thermodynamics libraries.

+

Supported:

+ +
+
+ugropy.writers.to_clapeyron(molecules_names: List[str], unifac_groups: List[dict] = [], psrk_groups: List[dict] = [], joback_objects: List[JobackProperties] = [], path: str = 'database', batch_name: str = '') None[source]
+

Write the .csv input files for Clapeyron.jl.

+

The provided lists must have the same length. If one of the model lists is +left empty, that model will not be writen in the .csv.

+
+
Parameters:
+
    +
  • molecules_names (List[str]) – List of names for each chemical to write in the .csv files.

  • +
  • unifac_groups (List[dict], optional) – List of classic liquid-vapor UNIFAC groups, by default [].

  • +
  • psrk_groups (List[dict], optional) – List of Predictive Soave-Redlich-Kwong groups, by default [].

  • +
  • joback_objects (List[JobackProperties], optional) – List of ugropy.properties.JobackProperties objects, by default [].

  • +
  • path (str, optional) – Path to the directory to store de .csv files, by default “./database”.

  • +
  • batch_name (str, optional) – Name of the writing batch. For example, if you name the batch with +“batch1”, the output of the UNIFAC groups will be: +“batch1_ogUNIFAC_groups.csv”. With the default value will be +“ogUNIFAC_groups.csv”, by default “”.

  • +
+
+
+
+ +
+
+ugropy.writers.to_thermo(mol_subgroups: dict, model: GibbsModel) dict[source]
+

Obtain the subgroups dictionary to the Caleb Bell’s Thermo library.

+

Thermo: https://github.com/CalebBell/thermo

+
+
Parameters:
+
    +
  • mol_subgroups (dict) – ugropy subgroups.

  • +
  • model (GibbsModel) – Gibbs excess FragmentationModel (unifac or psrk).

  • +
+
+
Returns:
+

Thermo fragmentation subgroups.

+
+
Return type:
+

dict

+
+
+
+ +
+
+

Clapeyron writers

+

Clapeyron writers functions module.

+
+
+ugropy.writers.clapeyron_writers.write_critical(path: Path, batch_name: str, molecules_names: List[str], joback_objects: List[JobackProperties] = []) None[source]
+

Create the DataFrame with the critical properties for Clapeyron.jl.

+

Uses the Joback to estimate the critical properties of the molecules.

+
+
Parameters:
+
    +
  • path (pathlib.Path, optional) – Path to the directory to store de .csv files, by default “./database”.

  • +
  • batch_name (str, optional) – Name of the writing batch. For example, if you name the batch with +“batch1”, the output of the UNIFAC groups will be: +“batch1_ogUNIFAC_groups.csv”. With the default value will be +“ogUNIFAC_groups.csv”, by default “”.

  • +
  • molecules_names (List[str]) – List of names for each chemical to write in the .csv files.

  • +
  • joback_objects (List[Joback], optional) – List of ugropy.properties.JobackProperties objects, by default [].

  • +
+
+
Returns:
+

DataFrame with the molecular weights for Clapeyron.jl

+
+
Return type:
+

pd.DataFrame

+
+
+
+ +
+
+ugropy.writers.clapeyron_writers.write_molar_mass(path: Path, batch_name: str, molecules_names: List[str], unifac_groups: List[dict] = [], psrk_groups: List[dict] = [], joback_objects: List[JobackProperties] = []) None[source]
+

Create the DataFrame with the molecular weights for Clapeyron.jl.

+
+
Parameters:
+
    +
  • path (pathlib.Path) – Path to the directory to store de .csv files, by default “./database”.

  • +
  • batch_name (str, optional) – Name of the writing batch. For example, if you name the batch with +“batch1”, the output of the UNIFAC groups will be: +“batch1_ogUNIFAC_groups.csv”. With the default value will be +“ogUNIFAC_groups.csv”, by default “”.

  • +
  • molecules_names (List[str]) – List of names for each chemical to write in the .csv files.

  • +
  • unifac_groups (List[dict], optional) – List of classic liquid-vapor UNIFAC groups, by default [].

  • +
  • psrk_groups (List[dict], optional) – List of Predictive Soave-Redlich-Kwong groups, by default [].

  • +
  • joback_objects (List[Joback], optional) – List of ugropy.properties.JobackProperties objects, by default [].

  • +
+
+
Returns:
+

DataFrame with the molecular weights for Clapeyron.jl

+
+
Return type:
+

pd.DataFrame

+
+
+
+ +
+
+ugropy.writers.clapeyron_writers.write_psrk(path: Path, batch_name: str, molecules_names: List[str], psrk_groups: List[dict]) None[source]
+

Create the DataFrame with the PSRK groups for Clapeyron.jl.

+
+
Parameters:
+
    +
  • path (pathlib.Path) – Path to the directory to store de .csv files, by default “./database”.

  • +
  • batch_name (str, optional) – Name of the writing batch. For example, if you name the batch with +“batch1”, the output of the UNIFAC groups will be: +“batch1_ogUNIFAC_groups.csv”. With the default value will be +“ogUNIFAC_groups.csv”, by default “”.

  • +
  • molecules_names (List[str]) – List of names for each chemical to write in the .csv files.

  • +
  • psrk_groups (List[dict], optional) – List of Predictive Soave-Redlich-Kwong groups.

  • +
+
+
Returns:
+

DataFrame with the LV-UNIFAC groups for Clapeyron.jl

+
+
Return type:
+

pd.DataFrame

+
+
+
+ +
+
+ugropy.writers.clapeyron_writers.write_unifac(path: Path, batch_name: str, molecules_names: List[str], unifac_groups: List[dict]) None[source]
+

Create the DataFrame with the classic LV-UNIFAC groups for Clapeyron.jl.

+
+
Parameters:
+
    +
  • path (pathlib.Path) – Path to the directory to store de .csv files, by default “./database”.

  • +
  • batch_name (str, optional) – Name of the writing batch. For example, if you name the batch with +“batch1”, the output of the UNIFAC groups will be: +“batch1_ogUNIFAC_groups.csv”. With the default value will be +“ogUNIFAC_groups.csv”, by default “”.

  • +
  • molecules_names (List[str]) – List of names for each chemical to write in the .csv files.

  • +
  • unifac_groups (List[dict], optional) – List of classic liquid-vapor UNIFAC groups.

  • +
+
+
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file