{"id":15018307,"url":"https://github.com/calebbell/chemicals","last_synced_at":"2025-05-15T11:06:45.816Z","repository":{"id":38381232,"uuid":"264697738","full_name":"CalebBell/chemicals","owner":"CalebBell","description":"chemicals: Chemical database of Chemical Engineering Design Library (ChEDL)","archived":false,"fork":false,"pushed_at":"2025-03-16T20:34:01.000Z","size":64291,"stargazers_count":223,"open_issues_count":2,"forks_count":41,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-15T11:06:43.267Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CalebBell.png","metadata":{"files":{"readme":"README.rst","changelog":"changelog.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-05-17T15:27:11.000Z","updated_at":"2025-05-10T02:17:33.000Z","dependencies_parsed_at":"2022-07-12T02:17:27.675Z","dependency_job_id":"b1abbe3c-212e-4656-b0ed-1cdb8a0168b6","html_url":"https://github.com/CalebBell/chemicals","commit_stats":{"total_commits":1133,"total_committers":6,"mean_commits":"188.83333333333334","dds":"0.10856134157105035","last_synced_commit":"e0fbda154b714b46746a7ecf5114e7c560141c1d"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalebBell%2Fchemicals","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalebBell%2Fchemicals/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalebBell%2Fchemicals/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalebBell%2Fchemicals/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CalebBell","download_url":"https://codeload.github.com/CalebBell/chemicals/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328385,"owners_count":22052632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T19:51:48.728Z","updated_at":"2025-05-15T11:06:45.794Z","avatar_url":"https://github.com/CalebBell.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=========\nChemicals\n=========\n\n.. image:: http://img.shields.io/pypi/v/chemicals.svg?style=flat\n   :target: https://pypi.python.org/pypi/chemicals\n   :alt: Version_status\n.. image:: http://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat\n   :target: https://chemicals.readthedocs.io/\n   :alt: Documentation\n.. image:: https://github.com/CalebBell/chemicals/workflows/Build/badge.svg\n   :target: https://github.com/CalebBell/chemicals/actions\n   :alt: Build_status\n.. image:: http://img.shields.io/badge/license-MIT-blue.svg?style=flat\n   :target: https://github.com/CalebBell/chemicals/blob/master/LICENSE.txt\n   :alt: license\n.. image:: https://img.shields.io/coveralls/CalebBell/chemicals.svg\n   :target: https://coveralls.io/github/CalebBell/chemicals\n   :alt: Coverage\n.. image:: https://img.shields.io/pypi/pyversions/chemicals.svg\n   :target: https://pypi.python.org/pypi/chemicals\n   :alt: Supported_versions\n.. image:: https://badges.gitter.im/CalebBell/chemicals.svg\n   :alt: Join the chat at https://gitter.im/CalebBell/chemicals\n   :target: https://gitter.im/CalebBell/chemicals\n.. image:: https://zenodo.org/badge/264697738.svg\n   :alt: Zenodo\n   :target: https://zenodo.org/badge/latestdoi/264697738\n\n.. contents::\n\nKey Features \u0026 Capabilities\n---------------------------\n\nThe chemicals library features an extensive compilation of pure component \nchemical data that can serve engineers, scientists, technicians, and anyone \nworking with chemicals. The chemicals library facilitates the retrieval and \ncalculation of:\n\n- Chemical constants including formula, molecular weight, normal boiling and \n  melting points, triple point, heat of formation, absolute entropy of \n  formation, heat of fusion, similarity variable, dipole moment, acentric \n  factor, etc.\n  \n- Assorted information of safety and toxicity of chemicals.\n\n- Methods (and their respective coefficients) for the calculation of temperature\n  and pressure dependent chemical properties including vapor pressure, \n  heat capacity, molar volume, thermal conductivity, surface tension, dynamic \n  viscosity, heat of vaporization, relative permittivity, etc.\n  \n- Methods to solve thermodynamic phase equilibrium, including flash routines, \n  vapor-liquid equilibrium constant correlations, and both numerical and \n  analytical solutions for the Rachford Rice and Li-Johns-Ahmadi equations. \n  Rashford Rice solutions for systems of 3 or more phases are also available.\n\nData for over 20,000 chemicals are made available as local databanks in this \nlibrary. All databanks are loaded on-demand, saving loading time and RAM. For\nexample, if only data on the normal boiling point is required, the chemicals \nlibrary will only load normal boiling point datasets. This on-demand loading \nfeature makes the chemicals library an attractive dependence for software\nmodeling chemical processes. In fact, `The Biorefinery Simulation and Techno-Economic \nAnalysis Modules (BioSTEAM) \u003chttps://biosteam.readthedocs.io/en/latest/\u003e`_ \nis reliant on the chemicals library for the simulation of unit operations.\n\nThe chemicals library also supports integration with \n`Numba \u003chttps://numba.pydata.org/\u003e`_, a powerful accelerator that works \nwell with NumPy; `Pint \u003chttps://pint.readthedocs.io/en/stable/\u003e`_ Quantity \nobjects to keep track of units of measure; and \nNumPy `vectorized \u003chttps://numpy.org/doc/stable/reference/generated/numpy.vectorize.html\u003e`_ \nfunctions. \n\nIf you need to know something about a chemical, give chemicals a try.\n\nInstallation\n------------\n\nGet the latest version of chemicals from\nhttps://pypi.python.org/pypi/chemicals/\n\nIf you have an installation of Python with pip, simple install it with:\n\n    $ pip install chemicals\n\nIf you are using `conda \u003chttps://docs.conda.io/en/latest/\u003e`_, you can install\nchemicals from conda-forge channel:\n\n    $ conda install -c conda-forge chemicals\n   \nTo get the git version, run:\n\n    $ git clone git://github.com/CalebBell/chemicals.git\n\nDocumentation\n-------------\n\nchemicals's documentation is available on the web:\n\n    http://chemicals.readthedocs.io/\n\nGetting Started\n---------------\n\nThe library is designed around SI units. The retrieval of constant \nchemical properties is done by CASRN: \n\n.. code-block:: python\n\n    \u003e\u003e\u003e from chemicals import CAS_from_any, MW, Tb, Tm, Tc, Pc, Vc, Hfus, Hfs, Hfl, Hfg, S0s, S0l, S0g\n    \u003e\u003e\u003e # Search for CASRN by a common name or a unique identifier such as the IchI key\n    \u003e\u003e\u003e CAS_water = CAS_from_any('Water')\n    \u003e\u003e\u003e MW(CAS_water)   # Molecular weight [g/mol]\n    18.01528\n    \u003e\u003e\u003e Tb(CAS_water)   # Normal boiling point [K]\n    373.124\n    \u003e\u003e\u003e Tm(CAS_water)   # Melting point [K]\n    273.15\n    \u003e\u003e\u003e Tc(CAS_water)   # Critical temperature [K]\n    647.096\n    \u003e\u003e\u003e Pc(CAS_water)   # Critical pressure [Pa]\n    22064000.0\n    \u003e\u003e\u003e Vc(CAS_water)   # Critical volume [m^3/mol]\n    5.59480372671e-05\n    \u003e\u003e\u003e Hfus(CAS_water) # Heat of fusion [J/mol]\n    6010.0\n    \u003e\u003e\u003e Hfs('101-81-5')  # Solid heat of formation of Diphenylmethane, [J/mol] \n    71500.0\n    \u003e\u003e\u003e Hfl(CAS_water)  # Liquid heat of formation [J/mol]\n    -285825.0\n    \u003e\u003e\u003e Hfg(CAS_water)  # Gas heat of formation [J/mol] \n    -241822.0\n    \u003e\u003e\u003e S0s('101-81-5')  # Absolute solid enthalpy of formation of Diphenylmethane [J/mol/K]\n    239.3\n    \u003e\u003e\u003e S0l(CAS_water)  # Absolute liquid enthalpy of formation [J/mol/K]\n    70.0\n    \u003e\u003e\u003e S0g(CAS_water)  # Absolute gas enthalpy of formation [J/mol/K]\n    188.8\n\nSuch \"lookup functions\" search through many databanks until the value for the \ngiven CASRN is found. When no value is available, None is returned. Note that chemicals\nis not a project to exhaustively obtain recommended property values for all properties\nand chemicals; it is a collection of cited and openly published data and equations.\n\nYou can optionally pass a \"method\" to select  which from databank to retrieve data:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e Tb(CAS_water, method='YAWS')\n    373.15\n \nTo view all available methods for a given chemical, just use the functions with \n\"_methods\" tagged at the end of the name:\n\n.. code-block:: python\n    \n    \u003e\u003e\u003e from chemicals import Tb_methods\n    \u003e\u003e\u003e Tb_methods(CAS_water)\n    ['HEOS', 'CRC_INORG', 'COMMON_CHEMISTRY', 'WEBBOOK', 'YAWS', 'WIKIDATA']\n\nThe databanks can also be accessed through their respective module:\n\n\u003e\u003e\u003e from chemicals.critical import critical_data_Yaws\n\u003e\u003e\u003e critical_data_Yaws # doctest: +SKIP\n                               Chemical       Tc         Pc        Vc  omega        Zc\nCASRN                                                                                 \n100-00-5           p-chloronitrobenzene   751.00  3980000.0  0.000432  0.491  0.275355\n100-01-6                 p-nitroaniline   851.00  4420000.0  0.000406  0.782  0.253621\n100-10-7    p-dimethylaminobenzaldehyde   832.00  3070000.0  0.000471  0.527  0.209027\n100-18-5           p-diisopropylbenzene   689.00  2450000.0  0.000598  0.390  0.255749\n100-21-0              terephthalic acid  1113.00  3950000.0  0.000424  1.059  0.180981\n...                                 ...      ...        ...       ...    ...       ...\n99814-65-0            1-pentadeceN-3-ol   713.00  1500000.0  0.000850    NaN  0.215149\n999-21-3                diallyl maleate   693.00  2330000.0  0.000606  0.789  0.245054\n999-52-0                3-chloroheptane   621.08  2693000.0  0.000476  0.418  0.248495\n999-78-0         4,4-dimethyl-2-pentyne   552.81  3416000.0  0.000378  0.191  0.281303\n999-97-3           hexamethyldisilazane   544.00  1920000.0  0.000613  0.510  0.260213\n\n[7549 rows x 6 columns]\n\nAn extensive set of functions for calculating all sorts of chemical properties \nare available along with their respective coefficients for a wide range of chemicals:\n\n\u003e\u003e\u003e from chemicals import Antoine\n\u003e\u003e\u003e from chemicals.vapor_pressure import Psat_data_AntoinePoling\n\u003e\u003e\u003e antoine_coefficients = Psat_data_AntoinePoling.loc[CAS_water] # For calculating saturated vapor pressure \n\u003e\u003e\u003e antoine_coefficients  # doctest: +SKIP\nChemical     water \nA              10.1\nB          1.69e+03\nC               -43\nTmin            273\nTmax            473\nName: 7732-18-5, dtype: object\n\u003e\u003e\u003e A, B, C = float(antoine_coefficients['A']), float(antoine_coefficients['B']), float(antoine_coefficients['C'])\n\u003e\u003e\u003e T = 373.15 # Temperature [K]\n\u003e\u003e\u003e Antoine(T, A, B, C) # Vapor pressure [Pa]\n101047.2535\n\nTo use JIT compiled functions, import the `numba` module:\n\n\u003e\u003e\u003e from chemicals import numba  # doctest: +SKIP\n\u003e\u003e\u003e numba.Antoine(T, A, B, C)  # doctest: +SKIP\n101047.2535\n\nTo use Quantity objects, import the `units` module: \n\n\u003e\u003e\u003e from chemicals import units\n\u003e\u003e\u003e from chemicals.units import u\n\u003e\u003e\u003e units.Antoine(T * u.K, A, B * u.K, C * u.K)\n\u003cQuantity(101047.254, 'pascal')\u003e\n\nTo use vectorized functions, import the `vectorized` module:\n\n\u003e\u003e\u003e from chemicals import vectorized\n\u003e\u003e\u003e vectorized.Antoine([300, 350], A, B, C)\narray([ 3546.98, 41603.98 ])\n\nRoadmap\n-------\n\nThe authors' main development item is to provide the latest methods\nfor the calculation of chemical properties (both thermodynamic and transport) \nand extending the local databank.\n\nLatest source code\n------------------\n\nThe latest development version of chemicals's sources can be obtained at\n\n    https://github.com/CalebBell/chemicals\n\n\nBug reports\n-----------\n\nTo report bugs, please use the chemicals's Bug Tracker at:\n\n    https://github.com/CalebBell/chemicals/issues\n\n\nLicense information\n-------------------\n\nSee ``LICENSE.txt`` for information on the terms \u0026 conditions for usage\nof this software, and a DISCLAIMER OF ALL WARRANTIES.\n\nAlthough not required by the chemicals license, if it is convenient for you,\nplease cite chemicals if used in your work. Please also consider contributing\nany changes you make back, and benefit the community.\n\n\nCitation\n--------\n\nTo cite chemicals in publications use:\n\n    Caleb Bell, Yoel Rene Cortes-Pena, and Contributors (2016-2024). Chemicals: Chemical properties component of Chemical Engineering Design Library (ChEDL)\n    https://github.com/CalebBell/chemicals.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalebbell%2Fchemicals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalebbell%2Fchemicals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalebbell%2Fchemicals/lists"}