Skip to main content

Tools for Chemistry Part II programming

Project description

ChemIITools

Documentation can be found at https://kgrewal1.github.io/ChemIITools/

Install

pip install ChemIITools

How to use

Solve the Huckel Equation

Easily solve the Huckel equation for complex systems

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)] 

mol.plot()

Parse .out files and plot energy surfaces

Plot potential energy surfaces of symmetric triatomics and find the vibrational frequencies

surface_plot(h2o_vals)

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$$

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()

Caclualte time evolution of a chemical system

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
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()

Optimise Cluster Geometry

lj7 = System(7, '(4*((1/r)**12 -(1/r)**6))')
lj7.optimise()
print(lj7)
lj7.plot()
Energy -16.505384, for 7 points

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ChemIITools-0.0.4.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ChemIITools-0.0.4-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file ChemIITools-0.0.4.tar.gz.

File metadata

  • Download URL: ChemIITools-0.0.4.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for ChemIITools-0.0.4.tar.gz
Algorithm Hash digest
SHA256 6b72a56b46228931e5e52d0ab9417ac6eaa101aac073fceaaef7ed856e383b0e
MD5 79674ce329c20f60d37f1fb070496bd3
BLAKE2b-256 5d651dd098033a7a0bafccf4e4957fdd44a04ee0eeb65b6b3504fc63fa3e9365

See more details on using hashes here.

File details

Details for the file ChemIITools-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: ChemIITools-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for ChemIITools-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 042579efa54b56b1a1d1855f5d6c63eafb260c0df0e7afba5b7cc2bc5a676bc2
MD5 fe2ab1b88635307ab3bf728d21ee5904
BLAKE2b-256 54461904fe01cc7fa0fc54308d78022cdc0419efa6f25a15b933161d9c5e447c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page