Skip to content

philippeloe/moser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Logo

Coverage Status

MOSER.py


MOSER.py (for Molecular Operations and Solutions for Equilibria and Reactions) is a versatile Python package designed for physical chemistry calculations. In honor of Pr. Jacques-Edouard Moser, whose course "Équilibres et Réactivités Chimiques" at EPFL from 2005 to 2022 inspired the creation of this Python package.

🔬 Features

Unlocking an abundance of analytical tools, MOSER.py serves as an invaluable companion for chemistry students, providing intuitive functionalities for essential calculations and analyses. MOSER.py streamlines complex tasks, empowering students to deepen their understanding of physical chemistry concepts and accelerate their learning journey. Among other features, it enables the users to:

1. Balance Chemical Equations
Easily balance chemical equations with a simple function call. MOSER.py uses advanced algorithms to ensure accurate balancing of equations.

2. Calculate Molar Mass
Determine the molar mass of chemical compounds effortlessly with MOSER.py. Input the chemical formula, and MOSER.py will compute the molar mass for you.

3. Determine the Reactional Quotient
Evaluate reaction quotients and kinetics parameters using MOSER.py's intuitive interface.

4. Evaluate a Solution's Concentration and pH
Quickly calculate the concentration of solutions and pH values using MOSER.py. Specify the relevant parameters, such as the initial concentration of the solute and the volume of the solution, to obtain accurate results.

5. Simualte Titration Curves
Trace titration curves for acid-base titrations and visualize the pH changes throughout the titration process. Specify the concentrations of the acid or base, as well as the volume of titrant added, to generate detailed titration curves.

from Titration import TitrationUI
TitrationUI()

Select the type of titration you want to perform.
∘ acid titrated by (strong) base --- 1base titrated by (strong) acid --- 2
Make your choice (1/2): 1

Please enter your data:
∘ chemical formula of titrated acid: HO2CCH(OH)CH(OH)CO2H 
∘ (acid) pKa1 [-] = 3.07
∘ (acid) pKa2 [-] (type '*' if there is none) =  4.34initial volume of titrated acid: Va [L] = 0.100chemical formula of titrant base: NaOHconcentration of titrant base: Ctit [molL⁻¹] = 0.010volume of titrant solution at (first) equivalence point: Veq [L] = 0.010

Find hereafter the corresponding titration curve.

Alt Text

5. Investigate Kinetics
Analyze reaction rates, rate constants, and other kinetic parameters with ease.

💿 Setup

In order to install MOSER.py, create a new conda environment moser (make sure you have installed Anaconda) with the following code:

conda create -n moser
conda activate moser

Clone MOSER.py:

git clone https://github.com/philippeloe/moser.git

Make sure you have installed pip in your moser environment:

conda install pip

Then, navigate to moser and install MOSER.py:

cd moser
pip install -e .

MOSER.py relies on the following Python packages:
⋅NumPy
⋅SciPy
⋅SymPy
⋅Matplotlib
⋅Tabulate
⋅Itertools
If the setup did not automatically install these dependencies, install them manually:

pip install anaconda numpy scipy sympy matplotlib itertools tabulate

If you need Jupyter Lab, install it:

pip install jupyterlab

🛠️ Development installation

Initialize Git (only for the first time).

Note: You should have create an empty repository on your github.

git init
git add * 
git add .*
git commit -m "Initial commit" 
git branch -M main
git remote add origin [email protected]:<your_profile>/<your_repo>.git 
git push -u origin main

Then add and commit changes as usual.

To install the package, run

(moser) $ pip install -e ".[test,doc]"

Run tests and coverage

(conda_env) $ pip install tox
(conda_env) $ tox

📖 Licence

Distributed under the MIT License. See LICENSE.txt for more information.

📯 Contact

You may contact us under philippe.loewen[at]epfl.ch