Skip to main content

RankChem project

Project description

project logo

ChemInterface for Reactivity Analysis

Project in the Practical programming in chemistry course EPFL CH-200

python GitHub jup license

🔥 Usage

This repository provides the user with a package which will display an interactive interface where the user will be able to analyse the reactivity of meolecules based on their electrophilicity or nucleophilicity. The package leads the user to a streamlit hompage. Two features are available. The first one enables the user to visulaize a molecule in 3D with the reactive site highlighted. The second feature ranks multiple molecule in the order of decreasing reactivity based on descriptors. Both these feature were made using XTB calculations.

The developpers of this package are:

  • Ludovica Fracassi jhc github
  • Emma Kappeler jhc github

Before installing everything, let's first define electrophilicity and nucleophilicity!!

What is electrophilicity and nucleophilicity ?

Electrophilicity and nucleophilicity are fundamental concepts in organic chemistry that describe the reactivity of molecules. Electrophilicity refers to the ability of a molecule or ion to accept an electron pair, making it an electron-loving species (electrophile). Electrophiles typically have a positive charge, partial positive charge, or an electron-deficient atom, making them attracted to electron-rich regions. On the other hand, nucleophilicity describes the ability of a molecule or ion to donate an electron pair, making it an electron-rich species (nucleophile). Nucleophiles are usually negatively charged or have lone pairs of electrons, such as anions, amines, and alcohols. The interaction between nucleophiles and electrophiles drives many chemical reactions, particularly in organic synthesis, where nucleophiles attack electrophiles to form new bonds.

Now let's go through the steps required to use this package.

👩‍💻 Installation

RankChem can be installed using pip as followed:

pip install Rankchem

The package can also be installed from source by running the following commands:

First, clone the repository from Github and go in the RankChem folder.

git clone [https://github.com/fracaludo/RankChem.git]
cd RankChem

Then, install the package using :

pip install -e .

Or by installing it directly from Github via pip:

pip install git+https://github.com/fracaludo/RankChem.git

Imported packages

In order to run the package correctly, the following packages need to be installed using the following commands. The package runs on python 3.10 but supports python 3.8 through 3.10. It is recommended that dependencies are installed with conda if possible as the performance of the linear algebra backends is generally better than with pip.

❗ xtb-python only works for IOS and Linux. If you are using Windows, you should install Ubuntu. Further information is available on: https://ubuntu.com/desktop/wsl

Libblas and xtb-python are not pip installable, however, you can install them by running the following commands in your terminal:

conda install "libblas=*=*mkl"
conda install xtb-python

The packages below should have been installed but if not, use the following commands:

conda install -c conda-forge morfeus-ml
conda install -c conda-forge rdkit
conda install -c conda-forge pyvistaqt
conda install -c conda-forge numpy
conda install -c conda-forge py3Dmol
conda install -c streamlit
conda install -c stmol

Specifically, from these packages, the following subpackages are required:

import streamlit as st
from rdkit import Chem
from rdkit.Chem import AllChem, rdDistGeom
from morfeus import read_xyz, XTB
from stmol import showmol
import py3Dmol

🎥 How it works

The user arrives to the RankChem Homepage where they can choose which feature they want to use.

homepage

The Highlight feature enabnles the user to input the smiles of a molecule and choose if nucleophilicity or electrophilicity is highlighted. The interface will then display the molecule in 3D with the chosen site highlighted. The user can also choose the visualiation style and the number of iterations in order to get a more precise result. The Fukui values of each atom will also be displayed. An example of the input and output is shown below:

highlight

Lastly, the Ranking feature enable the user to input multiple smiles and again choose if nucleophilicity or electrophilicity is analysed. The interface will then return the moelcules with highest: the most electrophile/nucleophile molecule and lowest the least electrophile/nucleophile molecule. Their corresponding descriptors values are also displayed. An example is shown below:

ranking

🚥 Let's get started!

The streamlit interface can now finally be used!!

Just click on the logo below ;)

Streamlit App

🔎 References an documentation

Here is some usefull reading on the packages that we used to create this project.

https://digital-chemistry-laboratory.github.io/morfeus/ https://github.com/digital-chemistry-laboratory/morfeus https://github.com/napoles-uach/stmol https://xtb-python.readthedocs.io/en/latest/index.html#

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

rankchem-0.0.1.tar.gz (993.0 kB view details)

Uploaded Source

Built Distribution

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

rankchem-0.0.1-py3-none-any.whl (237.3 kB view details)

Uploaded Python 3

File details

Details for the file rankchem-0.0.1.tar.gz.

File metadata

  • Download URL: rankchem-0.0.1.tar.gz
  • Upload date:
  • Size: 993.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for rankchem-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e9722d243035d7eb996e99f9dfa82b97f37a9e4bf656a751bea0076fad9dc5a1
MD5 c67cc77668610878bae042f3952a35ed
BLAKE2b-256 0272be36b0a0672d64bfb43e6fd192fd6878b4678bf6e4cef4064d49dd3e68af

See more details on using hashes here.

File details

Details for the file rankchem-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: rankchem-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 237.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for rankchem-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1dfdbdd5943035eab51ec60d8bffacf5e716ff840525fad98bd9adf101eb2306
MD5 cf3a88927d7a2a84474bf5381166c2b9
BLAKE2b-256 ed954d689c5ccd1e2c489148b7463235a96e91de1823b6a03a0effb8416e7958

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