- Python: >= 3.11
- gcc: 11.3.1 (or later)
- rdkit: 2023.9.1
- pybind11: 2.11.1
pip install --upgrade git+https://github.com/LazyShion/GESim.gitfrom rdkit import Chem
from gesim import gesim
mol1 = Chem.MolFromSmiles('Cc1nn(C2CCN(Cc3cccc(C#N)c3)CC2)cc1-c1ccccc1')
mol2 = Chem.MolFromSmiles('Cc1nn(C2CCN(Cc3cccc(Cl)c3)CC2)cc1-c1ccccc1')
mols = [mol1, mol2, Chem.MolFromSmiles('c1ccc(CN2CCC(n3nccc3-c3ccccc3)CC2)cc1')]
print(gesim.graph_entropy_similarity(mol1, mol2))
# 0.9580227325517037
print(gesim.graph_entropy_similarity_batch(mol1, mols))
# [1.0, 0.9580227325517037, 0.7766178810633495]from rdkit import Chem
from rdkit.Chem import Draw
mol1 = Chem.MolFromSmiles('Cc1nn(C2CCN(Cc3cccc(C#N)c3)CC2)cc1-c1ccccc1')
mol2 = Chem.MolFromSmiles('Cc1nn(C2CCN(Cc3cccc(Cl)c3)CC2)cc1-c1ccccc1')
mol1_matched, mol2_matched = gesim.get_matched_mapping_numbers(mol1, mol2)
mol1_hal = [i for i, mv in enumerate(mol1_matched) if mv == 1]
mol2_hal = [i for i, mv in enumerate(mol2_matched) if mv == 1]
Draw.MolsToGridImage([mol1, mol2], highlightAtomLists=[mol1_hal, mol2_hal], molsPerRow=2, useSVG=True, subImgSize=(250, 200))@article{Shiokawa2025,
title = {GESim: ultrafast graph-based molecular similarity calculation via von Neumann graph entropy},
volume = {17},
ISSN = {1758-2946},
url = {http://dx.doi.org/10.1186/s13321-025-01003-6},
DOI = {10.1186/s13321-025-01003-6},
number = {1},
journal = {Journal of Cheminformatics},
publisher = {Springer Science and Business Media LLC},
author = {Shiokawa, Hiroaki and Ishida, Shoichi and Terayama, Kei},
year = {2025},
month = apr
}
- Hiroaki Shiokawa
- Shoichi Ishida
This package is distributed under the MIT license.