Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional output is incorrect when FP count simulation is active #5838

Closed
ptosco opened this issue Dec 5, 2022 · 1 comment
Closed

Additional output is incorrect when FP count simulation is active #5838

ptosco opened this issue Dec 5, 2022 · 1 comment
Assignees
Labels
Milestone

Comments

@ptosco
Copy link
Contributor

ptosco commented Dec 5, 2022

Simple reproducible:

from rdkit import Chem
from rdkit.Chem import rdFingerprintGenerator

smiles = 'OCCCCCCN'
mol = Chem.MolFromSmiles(smiles)

generator = rdFingerprintGenerator.GetTopologicalTorsionGenerator(fpSize=2048, torsionAtomCount=6)
additional_output = rdFingerprintGenerator.AdditionalOutput()
additional_output.AllocateBitPaths()
fingerprint = generator.GetFingerprint(mol, additionalOutput=additional_output)
bit_paths = additional_output.GetBitPaths()
print('bits', [bit for bit in range(2048) if fingerprint[bit] > 0])
print('additional_output', list(bit_paths.keys()))

bits [1576, 1716, 1960]
additional_output [394, 429, 490]

The bits are 2048-based in the returned fingerprint, but only 512-based in the additional output, which is inconsistent.

@ptosco ptosco added the bug label Dec 5, 2022
@greglandrum greglandrum self-assigned this Dec 5, 2022
greglandrum added a commit to greglandrum/rdkit that referenced this issue Jan 11, 2023
greglandrum added a commit to greglandrum/rdkit that referenced this issue Jan 11, 2023
@greglandrum greglandrum added this to the 2022_09_4 milestone Jan 11, 2023
@greglandrum greglandrum changed the title FP count simulation is not accounted for when additional output is requested Additional output is incorrect when FP count simulation is active Jan 14, 2023
@greglandrum
Copy link
Member

Changing the milestone for this since it's too dependent on the additions made in #5748, which is scheduled for 2023.03

@greglandrum greglandrum modified the milestones: 2022_09_4, 2023_03_1 Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants