Skip to content

Lucandia/molecule-icon-generator

Repository files navigation

Molecule icon Generator!

Generate nice icons of molecules from SMILES.

This program follows the topology of SMILES chemical structures and creates an icon. The atoms' colours are inspired by the CPK colouring convention

Try the web app:

Molecules-icons generator web app powered by streamlit

Streamlit App

Cite this work:

If you use the icons please cite this project:

Lucandia. Lucandia/Molecule-Icon-Generator; Zenodo, 2022. https://doi.org/10.5281/ZENODO.7388429.

DOI

Run it on local:

Step 1: clone the repository

git clone https://github.com/lmonari5/molecule-icon-generator.git

Step 2: install packages and requirements

For Linux:

xargs -a packages.txt sudo apt-get install 
pip install -r requirements.txt

Step 3: Have Fun

  • Run the code from the command line:
 python molecule_icon_generator.py "CC(=O)Nc1ccc(cc1)O" --name paracetamol --rdkit_svg
  • Or from the python interpreter:
import molecule_icon_generator as mig 
molecule = mig.parse_structure("CC(=O)Nc1ccc(cc1)O", remove_H=False)
mig.icon_print(molecule, name = 'paracetamol', rdkit_svg = True, single_bonds = False, remove_H = False, verbose=False)
  • Or use the Streamlit functionalities! From the terminal run:
python -m streamlit run streamlit_app.py

Donate

I enjoy working on this project in my free time, especially at night. If you want to support me with a coffee, just click here!

License

Code is licensed under the GNU General Public License v3.0 (GPL-3.0)

License: GPL-3.0

Graphics are licensed under the Creative Commons Non Commercial Share Alike License 4.0 (CC BY-NC-SA 4.0)

License: CC BY-NC-SA 4.0