PERFUMEme is a pip-installable package for analysis of odorous molecules giving main properties. It checks if the molecule has a smell,is toxic for the skin and simulates its evaporation trace. Finally, it indicates in which famous perfumes the molecule is present and eventually its odor.
Project description
- PERFUMEme -
- Python Package for analysis of odorous molecules giving main properties
⚛️ Package description
PERFUMEme is a Python package designed to evaluate the suitability of molecules for use in perfumes. Combining cheminformatics, volatility modeling, and cosmetic safety criteria, it helps determine whether a compound has an odor, is safe for skin contact, and evaporates at a rate consistent with fragrance formulation (top, heart, or base note). It also tells in which famous perfumes the molecule is present.
Whether you're a fragrance formulator, a cosmetic chemist, or simply curious about scent molecules, PERFUMEme brings together data from PubChem and evaporation theory to support informed and creative olfactory design.
Creators :
- Marie Lacroix, student in chemistry at EPFL
- Lilia Cretegny, student in chemistry at EPFL
- Coline Lepers, student in chemistry at EPFL
🧑💻 Installation
Create a new environment, you can give an other name to this new environment. Then activate this environment
conda create -n fragrance python=3.10
conda activate fragrance
As the PERFUMEme package is dedicated for usage in a Jupyter Lab, you should install Jupyter Lab by executing the following command.
pip install jupyter lab
PERFUMEme can be then installed using pip as
pip install perfumeme
As an alternative, the package can be installed directly from the GitHub repository by executing the following pip command in your terminal
pip install git+https://github.com/mlacrx/PERFUMEme
The package can also be installed from source by executing the following steps: First, clone the repository from GitHub and navigate into the project directory
git clone https://github.com/mlacrx/PERFUMEme.git
cd path/to/perfumeme
Then, install the package in editable mode using:
pip install -e .
📖 Requirements
The PERFUMEme package runs on python 3.10. Its correct use requires several other packages.
rdkit
pandas
numpy
matplotlib
requests
If the installation completes successfully, all those required packages should be installed automatically. To verify that everything is correctly set up in your environment, you can list the installed packages by running the following command in your terminal:
conda list
If you don't see them, install them by running the following commands. You have to make sure they are installed, otherwise the package will not run.
pip install rdkit
pip install pandas
pip install numpy
pip install matplotlib
pip install requests
🔥 Usage
As you may have gathered, the PERFUMEme package is destinated for usage in Jupyter Lab. After installing the package and opening a Jupyter Notebook, you can use PERFUMEme to evaluate the olfactory and physicochemical profile of a molecule using its SMILES representation or its name.
This includes:
- Odor detectability
- Skin toxicity
- Evaporation modeling (vapor pressure, boiling point, vaporization enthalpy)
- Evaporation curve plot
- Perfume compatibility (note type)
- Perfumes in which the molecule appears
An example on how to make our key functions (usable_in_perfume and perfume_molecule) work is shown below for linalool.
import perfumeme as pm
mol = "Linalool"
summary, plot_path = pm.usable_in_perfume(mol)
print (summary)
display(Image(filename=plot_path))
The output of this first command will be :
Now you can find out the presence of your molecule in famous fragrances and extract olfactory information.
import perfumeme as pm
mol = "Linalool"
pm.combination(mol)
The output of this second command will be :
Now if you just want to obtain simple properties of the molecule (smell, toxic, vapor pressure, vapor pressure temperature, boiling point, enthalpy of vaporisation), you can use our small functions : has_a_smell, is_toxic_skin and evaporation_trace.
To have information on smell :
import perfumeme as pm
mol = "Linalool"
pm.has_a_smell(mol)
The output of this command will be: True.
Information on toxicity :
import perfumeme as pm
mol = "Linalool"
pm.is_toxic_skin(mol)
The output will be: True.
Informations on physical properties :
from perfumeme.main_functions import evaporation_trace
molecule = "linalool"
vapor_pressure, boiling_point, vp_temp, enthalpy, image_path = evaporation_trace(molecule)
print(f"💨 Vapor Pressure: {vapor_pressure} mmHg")
print(f"🔥 Boiling Point: {boiling_point} °C")
print(f"🌡️ Vapor Pressure Measured at: {vp_temp} °C")
print(f"⚡ Enthalpy of Vaporization: {enthalpy} J/mol")
The output will be :
💨 Vapor Pressure: 0.16 mmHg 🔥 Boiling Point: 194°C 🌡️ Vapor Pressure Measured at: 23.5 °C ⚡ Enthalpy of Vaporization: 51400 J/mol
🔧 Fixing issues
If you encounter an issue with the package’s functions, start by ensuring that you are using the latest version. You can do this by running the following command in your terminal:
pip show perfumeme
You can then compare your installed version with the latest available version listed on the PyPI page, https://pypi.org/project/perfumeme/
If your installed version is outdated, update it by running the following command in your terminal:
pip install perfumeme -U
🚀 Start
Open a Jupyter Notebook and discover more about your favourite molecules ! Try it out and maybe… find your next signature scent!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file perfumeme-1.0.2.tar.gz.
File metadata
- Download URL: perfumeme-1.0.2.tar.gz
- Upload date:
- Size: 2.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4564e01b928d6e0d84b074b0cadb54bbb375dfb12366dfb4994f2b8152d4334
|
|
| MD5 |
5437c5a8e46376b1282d38e11791de07
|
|
| BLAKE2b-256 |
823a9d204d1f51a9d1b8a38940094c8d24494f73cc14ac7a41244d0cc96dccff
|
File details
Details for the file perfumeme-1.0.2-py3-none-any.whl.
File metadata
- Download URL: perfumeme-1.0.2-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98489d590665a9132d7b3c89312337f389a51e8e4eefe3213afd0802a6481766
|
|
| MD5 |
1a953929d273d365b9a42fcadeaddbab
|
|
| BLAKE2b-256 |
f71043ff737886f8cdc77ee6db5221755d156d3dd54399aef4937469841cb6cd
|