You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The scale option in SimilarityMaps.GetSimilarityMapFromWeights has no effect.
According to the source code scale should work as
scale -- the scaling: scale < 0 -> the absolute maximum weight is used as maximum scale
scale = double -> this is the maximum scale
However, no difference is obtained when setting scale to different values. This is an issue when wanting to compare different molecules using similarity maps, e.g. for different partial charge schemes.
To Reproduce
from rdkit import Chem
from rdkit.Chem import Draw, rdPartialCharges
from rdkit.Chem.Draw import SimilarityMaps
import io
from PIL import Image
import rdkit
print(rdkit.__version__)
def show_png(data):
bio = io.BytesIO(data)
img = Image.open(bio)
return img
Configuration (please complete the following information):
RDKit version: rdkit-2024.3.5
OS: Mac OS Sonoma 14.5 (23F79)
Python version (if relevant): 3.11.5
Are you using conda? No
If you are using conda, which channel did you install the rdkit from?
If you are not using conda: how did you install the RDKit? pip install rdkit
Additional context
I would be happy to try to resolve this issue myself, if it is suitable for a first time contributor. Any guidance here would be appreciated.
The text was updated successfully, but these errors were encountered:
Describe the bug
The
scale
option inSimilarityMaps.GetSimilarityMapFromWeights
has no effect.According to the source code
scale
should work asHowever, no difference is obtained when setting scale to different values. This is an issue when wanting to compare different molecules using similarity maps, e.g. for different partial charge schemes.
To Reproduce
Expected behavior
The three different scales in the previous code should give different similarity maps, but currently give the same.
Screenshots
scale = -1
(default)scale = 1000.0
scale =0.01
Configuration (please complete the following information):
pip install rdkit
Additional context
I would be happy to try to resolve this issue myself, if it is suitable for a first time contributor. Any guidance here would be appreciated.
The text was updated successfully, but these errors were encountered: