Python for Chemistry: An introduction to Python algorithms, Simulations, and Programing for Chemistry 9789355517951

A one-stop guide to teach chemists how to use Python for coding and iterations in a hands-on and practical manner Key F

759 142 7MB

English Pages 206 Year 2023

Report DMCA / Copyright

DOWNLOAD EPUB FILE

Table of contents :
1. Understanding Python Functions for Chemistry
Introduction
Structure
Dictionary for atomic numbers and atomic masses
Adding elements to the dictionary
Updating elements in the dictionary
Deleting elements from the dictionary
Atomic mass percentage from molecular formula
Data module for physical and chemical constants
Molar gas constant from Boltzmann’s constant
Estimation of volume of an ideal gas
Quantum efficiency of photochemical reactions
Fetching R f data of amino acids from .csv file
Fetching selective data for amino acids from .csv file
Converting 'amino_acids.csv' to dictionary
Estimation of rate constant with data as a list
Exporting rate constant data to .csv
math module
Power of 10 (e)
pH metric acid-base titration
R.M.S and average velocity of ideal gas molecules
Rate constant from activation energy
Calculating sine (angle) from radians
Estimating bond length from the bond angle
Priority for arithmetical operators
Quotient and modulo operators
Assignment operators
Comparison operators
Logical operators
Identity operators
Membership operators
cmath module
Scrutinizing user input data
Tackling of errors in user inputs
Number of electrons transferred in a redox reaction
Conditions and loops
if … elif … else statements
Error handling with if … else loops
Nested loops
while loops
for loops
range() function
Fetching selective rows of amino_acid.csv file
timer() function
Recording concentration with time (reaction rate)
Recursion
Predicting spin–spin coupling in NMR spectra
Lambda function
Conclusion
2. Computations in Chemistry with NumPy
Introduction
Structure
Why NumPy
Dimension in arrays
Indexing for arrays
Negative indexing
Shape of an array
Reshaping the arrays
Slicing of arrays
Iterating the arrays
Entropy calculation for Beryllium compounds
Concatenating arrays
Concatenating 1-D arrays
Concatenating based on axis values
np.stack() function with axis 0 and 1
Stacking arrays along rows, columns, and height
Transpose of arrays
Distribution coefficient for phenol
Association factor of phenol in H 2 O and CHCl 3 75
Important functions in NumPy
Balancing equation by matrix row echelon form
Solving systems of linear equations
Equilibrium reactions and Quadratic equation
Coefficients for 3 rd order polynomial equations
Interpolations for unknown variables
Reading and writing .csv file
Lagrange interpolation – Viscosity of glycerol
Basics of Lagrange interpolation
3 rd order polynomial fit for viscosity of glycerol
Conclusion
3. Interpolation, Physico-chemical Constants, and Units with SciPy
Introduction
Structure
SciPy for scientific computations
Built-in scientific constants
List of scientific constants
Default unit for physical and chemical constants
Base units for physical and chemical constants
Interconversion of units
SI prefixes
Binary prefixes
Current density – Electrochemical deposition of Cu
Interconversion of units of pressure
Interconversion of units of time
Interconversion of units of length
Interconversion of units of angle
Interconversion of units of temperature
Interconversion of units of energy
Interconversion of units of power
Interconversion of units of force
Interconversion of units of different dimensions
Interconversion of temperature units
Sub packages
SciPy Integration
Integration with quad
Integration with romberg
Integration in NMR spectra – number of H atoms
Roots of an equation
Interpolation of viscosity of glycerol
Cubic splines for irregular intervals with three data points
Cubic splines for irregular intervals with higher accuracy
Cubic Spline interpolation – Viscosity of glycerol
Solving system of linear equations
Straight line curve fitting – II order reactions
Balancing chemical equations with matrices – Combustion of hexane
Finding minima for a function – Vapor pressure
Statistical functions
Conclusion
4. SymPy for Symbolic Computations in Chemistry
Introduction
Structure
Why SymPy
Basics of symbolic calculations
Differential derivatives with diff() module
Integration with integrate() module
Solving equations
Matrix operations
Binomial functions
Sets
Rate of a formation of CH 3 COOH by fermentation from I derivative
Estimation of charge in an electrochemical cell – Definite integral
Stoichiometric coefficient of a reaction – Matrix row echelon form
Solving simultaneous arbitrary equations for concentrations
Equilibrium reactions and quadratic equation
Conclusion
5. Interactive Plotting of Physico-chemical Data with Matplotlib
Introduction
Structure
Why Matplotlib
2D line graph
Optimizing marker styles
Optimizing line styles
Font style
Grid lines
Tick marks
Tick mark intervals
Subplot
Multiple data sets in a plot
Data legend
Bar charts
Bar chart for thermodynamic parameters
Pie chart – Composition of electrodeposited Ni-Co magnetic alloy
Conclusion
6. Introduction to Cheminformatics with RDKit
Introduction
Structure
Installation and importing RDKit
Chemical structure from SMILES
Structure of molecule from .mol file
Conversion of .mol to SMILES
Kekule form of SMILES
SMILES to .mol blocks
Saving .mol in local directory
Fetching number of atoms
Fetching individual atoms
Fetching bond types
Position in ring (Boolean)
Ring size (Boolean)
Working with .sdf formats
Stereochemical notation in molecules
Highlighting bonds and atoms
Conclusion
7. ChemFormula for Atomic and Molecular Data
Introduction
Structure
Installation and importing ChemFormula
Formats for molecular formula
To check radioactivity (Boolean)
Fetching number of individual elements
Estimation of molar / atomic mass
Mass fraction / atomic percentage
Calculating elemental fractions in %
Conclusion
8. Chemlib for Physico-chemical Parameters
Introduction
Structure
Installation and importing chemlib
Fetching elemental data
Molar mass and atomic percentage
Number of moles and molecules
Empirical formula
Combustion reaction
Balancing the chemical equation
Finding limiting reagent
pH and pOH
Molarity calculation
Electrode potential of an electrochemical cell
Electrolysis
Cathodic current efficiency (CCE)
Frequency and wavelength of electromagnetic radiation
Energy of an electron in Bohr orbital
Conclusion
9. ChemPy for Computations in Chemistry
Introduction
Structure
Installation and importing ChemPy
Fetching molar mass of compounds
LaTeX, Unicode and .html formats
Balancing the chemical equation
Stoichiometric molar mass fractions
Balancing equations of ionic equilibria
Ionic strength
.chemistry.Reaction module
Web publishing the reaction
LaTeX form for reactions
Unicode form for reactions
Number of phases
Reaction rates
Segregating elements with atomic number
Derived units
.kinetics.arrhenius module
Conclusion
10. Mendeleev Package For Atomic and Ionic Data
Introduction
Structure
Installation and importing Mendeleev
Fetching properties of element
Fetching oxidation states of an element
Ionization energies of an element
Fetching isotopic parameters
Fetching ionic radii and crystal radii
Effective nuclear charge
Electronegativity
Fetching elemental data
Conclusion
11. Computations of Parameters of Electrolytes with PyEQL
Introduction
Structure
Installation and importing pyEQL
Density of the solutions
Specific conductance
Ionic strength
Weight of the ionic components
Activity coefficients
Diffusion coefficients
Functions related to molecular formula
Solution parameters
Simulation of ionic conductance
Osmotic pressure
Data for kinematic and dynamic viscosities
Units for ionic concentration
Conclusion
12. STK Module for Molecular Structures
Introduction
Structure
Installation and importing stk
Molecule with a specific functional group more than one
Constructing polymeric reaction from monomers
Constructing cage structures
Optimizing the structure of molecules with rdkit
Covalent organic frameworks
Metal complexes
Conclusion

Python for Chemistry: An introduction to Python algorithms, Simulations, and Programing for Chemistry
 9789355517951

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
Recommend Papers