====== Calculation methods applied to chemistry ======
===== Synopsis (english) =====
==== Mathematical prerequisites====
==== Programming bases and tools ====
* Python programming language
* [[http://www.learnpython.org/|LearnPython.org]] interactive tutorial with code execution
* [[https://www.datacamp.com/courses/intro-to-python-for-data-science|DataCamp free course "Intro to Python for Data Science"]]
* [[https://www.sololearn.com/Course/Python/|Python 3 Tutorial]], interactive, with [[https://code.sololearn.com/#py|code use in web browser]]
* MOOCs (massive open online courses) :
* [[https://www.coursera.org/course/interactivepython|An Introduction to Interactive Programming in Python (Beginners)]] (Coursera)
* [[https://www.edx.org/course/introduction-computer-science-mitx-6-00-1x-9|Introduction to Computer Science and Programming Using Python]] (edX)
* [[wp>Anaconda_(Python_distribution)|Anaconda Python distribution]] (64 bits, with Python 3.x) : [[https://www.anaconda.com/download/]]
* Includes these tools :
* Jupyter notebook (interactive web-based environment)
* qtconsole (high level Python console with graphics & colors)
* spyder (powerful Python IDE)
* includes lot of Python libraries : matplotlib, numpy, scipy, pandas,...
* package management system (conda), virtual environments
* Anaconda Navigator includes extensive documentation (on anaconda website and dedicated websites)
* GNU/Linux OS (preferred)
* Jupyter introductions, tutorials, ...
* [[https://medium.com/@denkasyanov/jupyter-notebook-tutorial-9c0ffa5ae9a1#.ufaor34wp|Jupyter Notebook Tutorial]], par Den Kasyanov (Medium)
* [[https://jupyter.readthedocs.io/en/latest/|Jupyter official documentation]]
* [[https://www.datacamp.com/community/blog/jupyter-notebook-cheat-sheet|Jupyter DataCamp Cheat Sheet]]
The Microsoft Azure Notebooks environment can be used to execute sample codes, using a professionnal, personnal or student login/account (i.e. student login from UMONS). The following public sample notebooks are then available to test Jupyter text and coding features :
* [[https://notebooks.azure.com/linusable/libraries/samples-public]]
* //e.g. :// [[https://notebooks.azure.com/linusable/libraries/samples-public/html/notebooks/second_degree_polynomial_and_roots-01.ipynb]] (Second degree polynomial and roots)
* Python scientific libraries (official websites including tutorials and documentation)
* //cf.// [[teaching:progappchim:start#les_librairies_scientifiques_essentielles|this]] (french)
* [[http://matplotlib.org/|Matplotlib]] (scientific graphs)
* [[http://www.numpy.org/|NumPy]] (array manipulations, linear algebra, Fourier transforms, random numbers,...
* [[http://scipy.org/scipylib/index.html|SciPy]] numerical methods (integrations, ODE, PDE,...)
* [[http://sympy.org/en/index.html|SymPy]] symbolis maths
* [[http://pandas.pydata.org/|Pandas]], data analysis
* Pylab, combine Matplotlib, NumPy and SciPy
* [[http://scikit-learn.org/|Scikit-learn]], machine learning
==== Fundamental numerical methods ====
* [[system_of_linear_equations|Systems of linear equations]]
* Diagonalisation and triangularisation
* LU decomposition : factorization in triangular matrices
* [[root-finding_algorithm|Root findings : equations f(x) = 0]]
* Polynomial equations
* Dichotomy
* Secant method, Regula falsi
* Newton-Raphson method
* [[numerical_integration|Numerical intégration]] (integrals)
* Simpson method and gaussian quadratures
Learning outcomes :
* Systems of linear equations
* failing of the theoretical way to solve a linear system using determinant and cofactors (np complexity)
* triangularisation and diagonalisation principles : algorithm and complexity
* "divide by zero" errors and pivot solutions
* extension towards the matrix inversion
* lower-upper LU decomposition and complexity (N³ for the decomposition step and N² for substitution step). How to solve systems with varying independant vectors
* special matrix require special algorithms : tridiagonal matrix algorithm (Thomas algorithm)
* Root findings
* Bisection method (dichotomy) : simple and robust algorithm, invariant loop, slow convergence
* iterative transformation x = f(x), convergence and divergence situations
* secant and regula falsi methods, Convergence Criterion of the Fixed Point Method
* Newton-Raphson method (use of derivatives), quadratic convergence, failure, tolerance and stop condition
* Van Wijngaardeb-Dekker-Brent method ("black box" in numerical packages)
* Roots of polynomials and Bairstow's method
* Numerical intégration
* Equally Spaced methods (trapezoidal, Simpson), accuracy, error dependance,...
* Gaussian Quadratures and orthogonal polynomials (special integrals, scale transformations, error estimates,...)
==== Classical numerical methods ====
=== Ordinary_differential_equations (ODE) ===
[[numerical_methods_for_ordinary_differential_equations|Numerical solutions of ODE]]
* principe de discrétisation, méthode d'Euler
* Améliorations et méthodes de Runge-Kutta
* Runge-Kutta d'ordre 4
* Contrôle du pas d'intégration
* Méthodes predictor-corrector
* Méthodes d'extrapolation (Richardson, Burlish-Stoer)
* applications :
* équations de cinétique chimique
* Équation logistique
* [[wp>fr:Modèle_de_Verhulst|Modèle de Verhulst]], [[wp>fr:Dynamique_des_populations|dynamique des populations]] et non-linéarité
* Bifurcation, doublements de périodes et transition vers le chaos
* Réactions chimiques oscillantes : Belousov-Zhabotinsky, Brusselator, Oregonator
* Modèle proie-prédateur
* Attracteur étrange, modèle atmosphérique de Lorenz
=== Partial_differential_equations (PDE) ===
[[partial_differential_equation|Numerical solutions of PDE]]
* Domaine d'application des équations : équation de diffusion, équation d'ondes, équations de Navier-Stokes
* Types de traitements numériques
* Différences finies et problèmes de diffusion
* Schémas classiques de différences finies
* Résolutions stationnaires
* Résolutions dépendantes du temps
* Méthodes explicites, critère de (ou d'in)stabilités et méthodes implicites
=== Eigenvalues and eigenvectors ===
[[eigenvalues_and_eigenvectors|Eigenvalues and eigenvectors]]
applications à des problèmes de relaxation et de population, analyse de modes normaux de vibration, PCA (principal component analysis),...
=== Non-linear systems of equations ===
* Newton-Raphson method
=== Linear and non-linear least squares approximations ===
* Application to deconvolution (Levenberg–Marquardt algorithm)
* Reférences :
* [[https://pubs.acs.org/doi/abs/10.1021/acs.jchemed.8b00649|An Open-Source, Cross-Platform Resource for Nonlinear Least-Squares Curve Fitting]] Andreas Möglich, J. Chem. Educ., 2018, 95 (12), pp 2273–2278 DOI: 10.1021/acs.jchemed.8b00649
=== Chebyshev approximation ===
+ discussion of some approximations like [[wp>Bhaskara_I's_sine_approximation_formula|Bhaskara I's sine approximation formula]]
* [[https://twitter.com/fermatslibrary/status/1267450081151782913]]
* [[https://medium.com/@mathcube7/chebyshev-interpolation-with-python-2f2e89bb7c30|Chebyshev Interpolation With Python]] Mathcube, Medium, 03/02/2023
=== Molecules modelisation and visualization ===
=== Minimization ===
Conformational problems
----
===== Additional subjects =====
* Bioinformatics and related algorithm (biochemistry, mass spectrometry,...)
* Chemistry
* quantum calculations, optimization, molecular mechanics
* visualization, virtual reality
* chemical informations on structures and reactions
* Data science, statistics (Python modules : Scipy, Pandas,...)
* Time series analysis
* Machine learning (Scikit-learn,...)
* Data visualization
* boxplot, 3D, animations, graphs,...
* Sensors and interfaces, Arduino, Raspberry Pi, IoT
* Simulations
* Agent base modelling and complex systems
* cellular automaton
* Simpy, active matter simulations...
* Digital image processing, image recognition
* particle tracking,...
* Voronoi diagrams, Delaunay triangulation,... ([[https://towardsdatascience.com/the-fascinating-world-of-voronoi-diagrams-da8fc700fa1b|ref1]])
===== References =====
* Gradient descent optimization
* [[https://machinelearningmastery.com/gradient-descent-optimization-from-scratch/|How to Implement Gradient Descent Optimization from Scratch]] By Jason Brownlee on April 16, 2021
* [[https://towardsdatascience.com/implementing-gradient-descent-in-python-from-scratch-760a8556c31f|Implementing Gradient Descent in Python from Scratch]] Vatsal Sheth, Medium, 18/02/2022
* Bioinformatics
* [[http://biopython.org/|Biopython]]
* [[http://rosalind.info/problems/locations/|Rosalind.info]], learning bioinformatics by problem solutions
* Machine Learning
* Scikit-learn
* [[https://towardsdatascience.com/linear-regression-in-6-lines-of-python-5e1d0cd05b8d|Linear Regression in 6 lines of Python]] (using scikit-learn)
* [[https://datafloq.com/read/12-algorithms-every-data-scientist-should-know/2024|12 Algorithms Every Data Scientist Should Know]]
* Deep Learning
* TensorFlow
* [[https://www.datacamp.com/community/tutorials/deep-learning-python#gs.PPrcRR4|Keras Tutorial: Deep Learning in Python]]
* Arduino
* [[http://pubs.acs.org/doi/abs/10.1021/acs.jchemed.6b00639|Fabrication of an Economical Arduino-Based Uniaxial Tensile Tester]], Julien H. Arrizabalaga, Aaron D. Simmons, and Matthias U. Nollert, J. Chem. Educ., 2017, 94 (4), pp 530–533 DOI: 10.1021/acs.jchemed.6b00639
* PCA (principal component analysis)
* [[http://pubs.acs.org/doi/abs/10.1021/acs.jchemed.6b00550|Learning Principal Component Analysis by Using Data from Air Quality Networks]], Luis Vicente Pérez-Arribas, María Eugenia León-González, and Noelia Rosales-Conrado, ,J. Chem. Educ., 2017, 94 (4), pp 458–464 DOI: 10.1021/acs.jchemed.6b00550
* [[http://benalexkeen.com/principle-component-analysis-in-python/|Principle Component Analysis in Python]]
* K-Means
* [[http://benalexkeen.com/k-means-clustering-in-python/|K-means Clustering in Python]]
* [[https://medium.com/thrive-in-ai/k-means-clustering-in-python-9f00b3d7abc3|K Means Clustering in Python]] Rohit Raj, Medium, 02/03/2022
* [[https://medium.com/thrive-in-ai/classification-algorithms-in-python-5f58a7a27b88|Classification Algorithms in Python]] Rohit Raj, Medium, 15/03/2022
* Applications (suggestions, examples,...)
* [[https://scicomp.stackexchange.com/questions/28195/2d-ising-model-in-python|2D Ising Model in Python]]
* chemistry
* misc docs :
* [[https://pdfs.semanticscholar.org/3161/89e419212794e74bf83442f65de96b5320ba.pdf|Extraction of chemical structures and reactions from the literature]]
* [[https://medium.com/nerd-for-tech/animating-schrodinger-wave-function-%CF%88-of-a-particle-using-python-with-full-code-5ad9e4852906|Animating Schrodinger Wave Function(ψ) of a Particle Using Python (with full code) - Solving Particle in a Box Using Crank-Nicolson Method]], Kowshik chilamkurthy, Medium, 02/03/2021
* Blog articles
* [[https://py.plainenglish.io/linear-regression-in-plain-python-3b20bb56b31d|Simple Linear Regression Explained With Python - Explained in details which are easy to understand]] Arjan de Haan, Medium, Jan 23 (+ [[https://github.com/Vepnar/Script-Collection/blob/master/linear-regression/Linear%20regression.ipynb|jupyter notebook]])
* simpy : [[https://towardsdatascience.com/simulate-real-life-events-in-python-using-simpy-e6d9152a102f|Simulate Real-life Events in Python Using SimPy]] by Khuyen Tran, May, 2021, Medium, Towards Data Science
* Active matter simulations ([[https://arxiv.org/pdf/cond-mat/0611743.pdf|Vicsek]], 1995) :
* [[https://medium.com/swlh/create-your-own-active-matter-simulation-with-python-76fce4a53b6f|Create Your Own Active Matter Simulation (With Python)]] Philip Mocz, The Startup, Medium 2021 + [[https://github.com/pmocz/activematter-python]]
* Fourier transforms : [[https://towardsdatascience.com/fourier-transforms-an-intuitive-visualisation-ba186c7380ee|Fourier Transforms: An Intuitive Visualisation - An intuitive visualization of discrete Fourier transforms applied to simple time-series data]] Diego Unzueta, Towards Data Science, Medium, 17/09/2021
* Monte-Carlo simulations : [[Monte Carlo Simulation — a practical guide - A versatile method for parameters estimation. Exemplary implementation in Python programming language]] Robert Kwiatkowski, Medium, 31/01/2022
* régression logistique : [[https://mlu-explain.github.io/logistic-regression/]]
* [[https://towardsdatascience.com/cubic-splines-the-ultimate-regression-model-bd51a9cf396d|Cubic Splines: The Ultimate Regression Model - Why cubic splines are the best regression model out there]] Brendan Artley, Medium, 27/07/2022
==== Books ====
* [[http://www.springer.com/statistics/computational+statistics/book/978-3-642-28069-6|Solving Differential Equations in R]], chez Springer, et en version électronique sur [[http://www.springerlink.com/content/978-3-642-28070-2#section=1080286&page=1|SpringerLink]]
* [[http://www.cambridge.org/us/academic/subjects/engineering/engineering-mathematics-and-programming/numerical-methods-engineering-python-3-3rd-edition|Numerical Methods in Engineering with Python 3]] 3rd Edition, Jaan Kiusalaas, 2013, Cambridge University Press, isbn: 9781107033856
* ...
==== Jupyter notebooks ====
* [[https://github.com/mandli/intro-numerical-methods|Jupyter notebooks and other materials developed for the Columbia course APMA 4300]]
* [[http://nbviewer.jupyter.org/url/norvig.com/ipython/Probability.ipynb|A Concrete Introduction to Probability (using Python)]]
==== MOOCs ====
* [[https://openedx.seas.gwu.edu/courses/course-v1:MAE+MAE6286+2017/about|Practical Numerical Methods with Python]]
==== Miscellaneous ====
* [[https://github.com/numerical-mooc/numerical-mooc|Practical Numerical Methods with Python]]
* [[https://github.com/cfgnunes/numerical-methods-python]] (?)
* [[https://medium.com/@mjspeck/presenting-code-using-jupyter-notebook-slides-a8a3c3b59d67|Presenting Code Using Jupyter Notebook Slides]]
* [[https://choosealicense.com]]
* [[https://creativecommons.org/choose/?lang=en]]
* Published applications
* [[http://pubs.acs.org/doi/10.1021/acs.jchemed.7b00395|Introduction to Stochastic Simulations for Chemical and Physical Processes: Principles and Applications]] Charles J. Weiss, Journal of Chemical Education 2017 94 (12), 1904-1910 DOI: 10.1021/acs.jchemed.7b00395
* [[https://medium.freecodecamp.org/an-overview-of-the-gradient-descent-algorithm-8645c9e4de1e|An overview of the Gradient Descent algorithm]]
* [[https://towardsdatascience.com/building-a-logistic-regression-in-python-step-by-step-becd4d56c9c8|Building A Logistic Regression in Python, Step by Step]]
* [[https://medium.com/swlh/building-linear-regression-in-python-75a429b0d3ba|Building Linear Regression in Python]]
* [[https://towardsdatascience.com/17-types-of-similarity-and-dissimilarity-measures-used-in-data-science-3eb914d2681|17 types of similarity and dissimilarity measures used in data science]] : explains various methods for computing distances and showing their instances in our daily lives. Additionally, it will introduce you to the pydist2 package. Mahmoud Harmouch, Medium, 14/03/2021
* [[http://jakevdp.github.io/|Pythonic Perambulations]] de Jake VanderPlas
----
===== Synopsis (français) =====
(Méthodes de calcul appliqué à la chimie)
* Learning outcomes teaching unit (UE):
* Apply standard numerical methods or existing software to solve numerical problems related to scientific research activities
* Be active in the search for existing numerical methods adapted to problems encountered by chemists
* Content of the UE:
* widespread methods : linear systems, numerical integration, root findings
* Ordinary differential equations (numerical solutions, kinetic applications,...)
* Partial differential equations (finite differences, diffusion problems)
* Nonlinear systems of equations (Newton-Raphson method)
* Eigenvalues eignevectors problems (applications to relaxation and population problems)
* Approximation by linear and non-linear least squares methods (maximum likelihood, application to deconvolution)
* Chebyshev approximation
* Molecular modeling and visualization
* Minimization and conformational problems
* Prerequisite skills
* Basic knowledge of a programming language
* Basics of Mathematics
* Exercises and applications: codes written in or mainly written in Python, with the general libraries matplotlib, numpy, scipy, pandas as well as other specialized libraries, especially in chemistry
* Types of evaluations: Oral examination based on an in-depth study on one of the chapters of the course or an additional theme
* Acquis d'apprentissage UE :
* Appliquer des méthodes numériques standards ou des logiciels existant pour résoudre des problèmes fondamentaux ou annexes, liés à des activités de recherche scientifique
* Être actif dans la recherche de méthodes de résolution numérique existantes et adaptées à des problèmes auxquels les chimistes sont confrontés
* Contenu de l'UE :
* Équations différentielles ordinaires (résolutions numériques et applications cinétiques)
* Équations aux dérivées partielles (différences finies, problèmes de diffusion)
* Systèmes d’équations non linéaires (méthode de Newton-Raphson)
* Problèmes aux valeurs propres (applications à des problèmes de relaxation et de population)
* Approximation par moindre carrés linéaires et non-linéaires (application à la déconvolution)
* Approximation de Tchébyshev
* Modélisation et visualisation de molécules
* Minimisation et problèmes conformationnels
* Compétences préalables
* Connaissance de base d'un langage de programmation
* Bases des mathématiques
* Exercices et applications : codes écrits ou à écrire principalement en Python, avec les librairies générales matplotlib, numpy et scipy, ainsi que d'autres librairies spécialisées, notamment en chimie
* Types d'évaluations : Examen oral sur base d'un travail approfondi sur un des chapitres du cours ou un thème additionnel
==== Pré-requis mathématiques ====
==== Base de la programmation ====
==== Méthodes numériques de base ====
* [[system_of_linear_equations|Systèmes d'équations linéaires]]
* Diagonalisation et triangularisation
* Décomposition LU en matrices triangulaires
* [[numerical_integration|Intégration numérique]]
* Simpson et quadratures gaussiennes
* [[root-finding_algorithm|Résolutions d'équations du type f(x) = 0]]
* Équations polynomiales
* Recherche dichotomique
* Méthode de la sécante
* Méthode de Newton-raphson
==== Méthodes numériques usuelles ====
=== Équations différentielles ordinaires ===
[[numerical_methods_for_ordinary_differential_equations|Résolutions numériques des ODE]]
* principe de discrétisation, méthode d'Euler
* Améliorations et méthodes de Runge-Kutta
* Runge-Kutta d'ordre 4
* Contrôle du pas d'intégration
* Méthodes predictor-corrector
* Méthodes d'extrapolation (Richardson, Burlish-Stoer)
* applications :
* équations de cinétique chimique
* Équation logistique
* [[wp>fr:Modèle_de_Verhulst|Modèle de Verhulst]], [[wp>fr:Dynamique_des_populations|dynamique des populations]] et non-linéarité
* Bifurcation, doublements de périodes et transition vers le chaos
* Réactions chimiques oscillantes : Belousov-Zhabotinsky, Brusselator, Oregonator
* Modèle proie-prédateur
* Attracteur étrange, modèle atmosphérique de Lorenz
=== Équations aux dérivées partielles ===
[[partial_differential_equation|Résolutions numériques des équations aux dérivées partielles]]
* Domaine d'application des équations : équation de diffusion, équation d'ondes, équations de Navier-Stokes
* Types de traitements numériques
* Différences finies et problèmes de diffusion
* Schémas classiques de différences finies
* Résolutions stationnaires
* Résolutions dépendantes du temps
* Méthodes explicites, critère de (ou d'in)stabilités et méthodes implicites
=== Problèmes aux valeurs propres ===
[[eigenvalues_and_eigenvectors|Valeurs propres et vecteurs propres]]
applications à des problèmes de relaxation et de population, analyse de modes normaux de vibration, PCA (principal component analysis),...
=== Systèmes d’équations non linéaires ===
Méthode de Newton-Raphson
=== Approximation par moindre carrés linéaires et non-linéaires ===
application à la déconvolution
=== Approximations de Tchébyshev ===
=== Modélisation et visualisation de molécules ===
=== Minimisation ===
problèmes conformationnels
----
===== Thèmes additionnels =====
* Bioinformatique et algorithmes spécifiques
* Chimie
* calculs quantiques, de minimisation, de mécanique moléculaire
* représentations
* Data science, statistiques (librairie Python Pandas,...)
* Time series analysis
* Machine learning (Scikit-learn,...)
* Data visualization
* boxplot, 3D, animations, graphes,...
* Senseurs et interfaçage, Arduino, Raspberry Pi, IoT
* Simulations
* Agent base modelling et systèmes complexes
* Automates cellulaires
* Simpy,...
* Traitement d'image
* particle tracking,...