Skip to main content

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

logo

GitHub

- PERFUMEme -

python

  • 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 jhc github
  • Lilia Cretegny, student in chemistry at EPFL jhc github
  • Coline Lepers, student in chemistry at EPFL jhc github

🧑‍💻 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

PERFUMEme can be then installed using pip as

pip install perfumeme

GitHub

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 a Jupyter Notebook. 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

🥅 Goal functions of the package

An example on how to make our key functions (usable_in_perfume, perfume_molecule, what_notes) work is shown below for linalool.

from perfumeme import usable_in_perfume
molecule = "linalool"
summary= usable_in_perfume(molecule)
print(summary)

The output will be:

linalool usable in perfume

Now you can find out the presence of your molecule in famous fragrances and extract olfactory information.

from perfumeme import odor_molecule_perfume

molecule = "linalool"
print (odor_molecule_perfume(molecule))

The output will be:

odor molecule perfume linalool

You can also find out what notes the perfume has.

from perfumeme import what_notes

print (what_notes("Coco Mademoiselle", "top"))
print (what_notes("Coco Mademoiselle", "heart"))
print (what_notes("Coco Mademoiselle", "base"))

The output will be:

what notes coco mademoiselle

👩‍🔬 Physical properties

Now if you just want to obtain simple properties of the molecule (vapor pressure, vapor pressure temperature, boiling point, enthalpy of vaporisation), you can use our subfunction evaporation_trace.

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 :

output linalool evaporation trace

🔧 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 --upgrade perfumeme

If when importing perfumeme in a Jupyter Notebook doesn't work, it may be because it's installed in the wrong folder. You can verify this by running in your terminal.

pip show perfumeme

It has to be this /opt/anaconda3/envs/fragrance/lib/python3.10/site-packages If it is not the case, uninstall the package.

pip uninstall perfumeme

And reinstall it with this

python -m pip install perfumeme

For all future operations using pip, make sure to add

python -m  <what_you_want_to_do>

🚀 Start

Open a Jupyter Notebook and discover more about your favourite molecules ! Try it out and maybe… find your next signature scent!

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

perfumeme-1.2.4.tar.gz (3.0 MB view details)

Uploaded Source

Built Distribution

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

perfumeme-1.2.4-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file perfumeme-1.2.4.tar.gz.

File metadata

  • Download URL: perfumeme-1.2.4.tar.gz
  • Upload date:
  • Size: 3.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for perfumeme-1.2.4.tar.gz
Algorithm Hash digest
SHA256 fde972ed81984c968fd5d93d5d14eebe3a46ab728bfce58e7f9177d9689fa18e
MD5 9e8a174cadfcfa93ed0e3654da877c34
BLAKE2b-256 e8b7c25ec830dc5a626ccba7f2b03f8682612dee1930fce53497f972a1d33cd0

See more details on using hashes here.

File details

Details for the file perfumeme-1.2.4-py3-none-any.whl.

File metadata

  • Download URL: perfumeme-1.2.4-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for perfumeme-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 52cfc1de2102fff28f67adc4c3c5d9e9a86a3a4edd5ccb489e386a8450646348
MD5 77626f3fd1842802345ff6e646d2cbba
BLAKE2b-256 0b4a6db92498106172bb75968e6158a99aac25f6f6a47ea480dc09541e703a38

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