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

MolToSmiles with doRandom=True raises errors with molecules containing fragments. #5372

Closed
greglandrum opened this issue Jun 17, 2022 Discussed in #5371 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@greglandrum
Copy link
Member

Discussed in #5371

Originally posted by claushofmann June 16, 2022
Hi everyone,

I am new to Chemoinformatics and was playing around with rdkit for generating different random SMILES strings for the same molecule:

from rdkit import Chem
smiles = 'O=C([O-])c1ccccc1O.O=C([O-])c1ccccc1O.[Zn+2]'
mol = Chem.MolFromSmiles(smiles)
Chem.MolToSmiles(mol, doRandom=True, canonical=False)

For this specific molecule, I get this error:

RuntimeError: Range Error
	idx
	Violation occurred on line 206 in file Code/GraphMol/ROMol.cpp
	Failed Expression: 17 < 1
	RDKIT: 2022.03.3
	BOOST: 1_75
@greglandrum greglandrum self-assigned this Jun 17, 2022
greglandrum added a commit to greglandrum/rdkit that referenced this issue Jun 17, 2022
@greglandrum greglandrum added this to the 2022_03_4 milestone Jun 17, 2022
greglandrum added a commit that referenced this issue Jul 5, 2022
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

1 participant