ChemIITools
================
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
Documentation can be found at https://kgrewal1.github.io/ChemIITools/
## Install
``` sh
pip install ChemIITools
```
## How to use
### Solve the Huckel Equation
Easily solve the Huckel equation for complex systems
``` python
mol = Huckel("c1cc2ccc3ccc4ccc5ccc6ccc1c7c2c3c4c5c67")
print(mol)
mol.molecule
```
Huckel Energies (degeneracy) for c1cc2ccc3ccc4ccc5ccc6ccc1c7c2c3c4c5c67: [-2.675 (1)] [-2.214 (2)] [-1.675 (2)] [-1.539 (1)] [-1.214 (1)] [-1.000 (3)] [-0.539 (2)] [0.539 (2)] [1.000 (3)] [1.214 (1)] [1.539 (1)] [1.675 (2)] [2.214 (2)] [2.675 (1)]
![](index_files/figure-gfm/cell-3-output-2.svg)
``` python
mol.plot()
```
![](index_files/figure-gfm/cell-4-output-1.png)
### Parse .out files and plot energy surfaces
Plot potential energy surfaces of symmetric triatomics and find the
vibrational frequencies
``` python
surface_plot(h2o_vals)
```
![](index_files/figure-gfm/cell-6-output-1.png)
``` python
r_opt, theta_opt, nu_r, nu_theta = vib_calc(h2o_vals)
print('the optimum bond length of water is ', r_opt, ' angstroms with angle ', theta_opt, ' degrees' )
print('the stretching frequency ', round(nu_r), ' cm-1 and bending frequency ', round(nu_theta), ' cm-1' )
```
the optimum bond length of water is 0.95 angstroms with angle 105.0 degrees
the stretching frequency 3113 cm-1 and bending frequency 1665 cm-1
### Calculate steady state concentrations
Find the steady state concentration for chemical systems of the form
$$D \xrightleftharpoons[k_{u}^{R15}]{k_{f}^{R15}} I \xrightleftharpoons[k_{u}^{R16}]{k_{f}^{R16}} N$$
``` python
kf1 = 26000
kr1 = 0.06
kf2 = 730
kr2 = 0.00075
urea_conc = np.linspace(0, 8, num=1000)
ss_conc = np.array([steady_state_calc(kf1*np.exp(-1.68*conc), kr1*np.exp(0.95*conc), kf2*np.exp(-1.72*conc), kr2*np.exp(1.20*conc)) for conc in urea_conc])
plt.plot(urea_conc,ss_conc[:, 0],label='D')
plt.plot(urea_conc,ss_conc[:, 1],label='I')
plt.plot(urea_conc,ss_conc[:, 2],label='N')
plt.xlabel('[Urea]/ M')
plt.ylabel('Fraction of Species')
plt.legend()
plt.show()
```
![](index_files/figure-gfm/cell-8-output-1.png)
### Caclualte time evolution of a chemical system
``` python
A, B, X, Y, Z, P, Q = 0.06, 0.06, 10**(-9.8),10**(-6.52), 10**(-7.32), 0, 0
concs = [A, B, X, Y, Z, P, Q]
t, conc_t= oreg_calc(concs)
As, Bs, Xs, Ys, Zs, Ps, Qs = conc_t
```
``` python
plt.plot(t[::10000],Xs[::10000],label='X')
plt.plot(t[::10000],Ys[::10000],label='Y')
plt.plot(t[::10000],Zs[::10000],label='Z')
plt.yscale('log')
plt.xlabel('time/ s')
plt.ylabel('Concentration/ M')
plt.legend(bbox_to_anchor =(1.15, 0.6))
plt.show()
```
![](index_files/figure-gfm/cell-10-output-1.png)
### Optimise Cluster Geometry
``` python
lj7 = System(7, '(4*((1/r)**12 -(1/r)**6))')
lj7.optimise()
print(lj7)
lj7.plot()
```
Energy -16.505384, for 7 points
![](index_files/figure-gfm/cell-11-output-2.png)
Raw data
{
"_id": null,
"home_page": "https://github.com/KGrewal1/ChemIITools",
"name": "ChemIITools",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "nbdev jupyter notebook python",
"author": "KGrewal1",
"author_email": "45569241+KGrewal1@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/5d/65/1dd098033a7a0bafccf4e4957fdd44a04ee0eeb65b6b3504fc63fa3e9365/ChemIITools-0.0.4.tar.gz",
"platform": null,
"description": "ChemIITools\n================\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\nDocumentation can be found at https://kgrewal1.github.io/ChemIITools/\n\n## Install\n\n``` sh\npip install ChemIITools\n```\n\n## How to use\n\n### Solve the Huckel Equation\n\nEasily solve the Huckel equation for complex systems\n\n``` python\nmol = Huckel(\"c1cc2ccc3ccc4ccc5ccc6ccc1c7c2c3c4c5c67\")\nprint(mol)\nmol.molecule\n```\n\n Huckel Energies (degeneracy) for c1cc2ccc3ccc4ccc5ccc6ccc1c7c2c3c4c5c67: [-2.675 (1)] [-2.214 (2)] [-1.675 (2)] [-1.539 (1)] [-1.214 (1)] [-1.000 (3)] [-0.539 (2)] [0.539 (2)] [1.000 (3)] [1.214 (1)] [1.539 (1)] [1.675 (2)] [2.214 (2)] [2.675 (1)] \n\n![](index_files/figure-gfm/cell-3-output-2.svg)\n\n``` python\nmol.plot()\n```\n\n![](index_files/figure-gfm/cell-4-output-1.png)\n\n### Parse .out files and plot energy surfaces\n\nPlot potential energy surfaces of symmetric triatomics and find the\nvibrational frequencies\n\n``` python\nsurface_plot(h2o_vals)\n```\n\n![](index_files/figure-gfm/cell-6-output-1.png)\n\n``` python\nr_opt, theta_opt, nu_r, nu_theta = vib_calc(h2o_vals)\nprint('the optimum bond length of water is ', r_opt, ' angstroms with angle ', theta_opt, ' degrees' )\nprint('the stretching frequency ', round(nu_r), ' cm-1 and bending frequency ', round(nu_theta), ' cm-1' )\n```\n\n the optimum bond length of water is 0.95 angstroms with angle 105.0 degrees\n the stretching frequency 3113 cm-1 and bending frequency 1665 cm-1\n\n### Calculate steady state concentrations\n\nFind the steady state concentration for chemical systems of the form\n$$D \\xrightleftharpoons[k_{u}^{R15}]{k_{f}^{R15}} I \\xrightleftharpoons[k_{u}^{R16}]{k_{f}^{R16}} N$$\n\n``` python\nkf1 = 26000\nkr1 = 0.06\nkf2 = 730\nkr2 = 0.00075\nurea_conc = np.linspace(0, 8, num=1000)\nss_conc = np.array([steady_state_calc(kf1*np.exp(-1.68*conc), kr1*np.exp(0.95*conc), kf2*np.exp(-1.72*conc), kr2*np.exp(1.20*conc)) for conc in urea_conc])\nplt.plot(urea_conc,ss_conc[:, 0],label='D')\nplt.plot(urea_conc,ss_conc[:, 1],label='I')\nplt.plot(urea_conc,ss_conc[:, 2],label='N')\nplt.xlabel('[Urea]/ M')\nplt.ylabel('Fraction of Species')\nplt.legend()\nplt.show()\n```\n\n![](index_files/figure-gfm/cell-8-output-1.png)\n\n### Caclualte time evolution of a chemical system\n\n``` python\nA, B, X, Y, Z, P, Q = 0.06, 0.06, 10**(-9.8),10**(-6.52), 10**(-7.32), 0, 0\nconcs = [A, B, X, Y, Z, P, Q]\nt, conc_t= oreg_calc(concs)\nAs, Bs, Xs, Ys, Zs, Ps, Qs = conc_t\n```\n\n``` python\nplt.plot(t[::10000],Xs[::10000],label='X')\nplt.plot(t[::10000],Ys[::10000],label='Y')\nplt.plot(t[::10000],Zs[::10000],label='Z')\nplt.yscale('log')\nplt.xlabel('time/ s')\nplt.ylabel('Concentration/ M')\nplt.legend(bbox_to_anchor =(1.15, 0.6))\nplt.show()\n```\n\n![](index_files/figure-gfm/cell-10-output-1.png)\n\n### Optimise Cluster Geometry\n\n``` python\nlj7 = System(7, '(4*((1/r)**12 -(1/r)**6))')\nlj7.optimise()\nprint(lj7)\nlj7.plot()\n```\n\n Energy -16.505384, for 7 points\n\n![](index_files/figure-gfm/cell-11-output-2.png)\n\n\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "Tools for Chemistry Part II programming",
"version": "0.0.4",
"split_keywords": [
"nbdev",
"jupyter",
"notebook",
"python"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "54461904fe01cc7fa0fc54308d78022cdc0419efa6f25a15b933161d9c5e447c",
"md5": "fe2ab1b88635307ab3bf728d21ee5904",
"sha256": "042579efa54b56b1a1d1855f5d6c63eafb260c0df0e7afba5b7cc2bc5a676bc2"
},
"downloads": -1,
"filename": "ChemIITools-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fe2ab1b88635307ab3bf728d21ee5904",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 15711,
"upload_time": "2023-01-04T21:41:35",
"upload_time_iso_8601": "2023-01-04T21:41:35.534544Z",
"url": "https://files.pythonhosted.org/packages/54/46/1904fe01cc7fa0fc54308d78022cdc0419efa6f25a15b933161d9c5e447c/ChemIITools-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5d651dd098033a7a0bafccf4e4957fdd44a04ee0eeb65b6b3504fc63fa3e9365",
"md5": "79674ce329c20f60d37f1fb070496bd3",
"sha256": "6b72a56b46228931e5e52d0ab9417ac6eaa101aac073fceaaef7ed856e383b0e"
},
"downloads": -1,
"filename": "ChemIITools-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "79674ce329c20f60d37f1fb070496bd3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 16550,
"upload_time": "2023-01-04T21:41:37",
"upload_time_iso_8601": "2023-01-04T21:41:37.579202Z",
"url": "https://files.pythonhosted.org/packages/5d/65/1dd098033a7a0bafccf4e4957fdd44a04ee0eeb65b6b3504fc63fa3e9365/ChemIITools-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-04 21:41:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "KGrewal1",
"github_project": "ChemIITools",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "chemiitools"
}