rdkit: Chem.ResonanceMolSupplier freezes/hangs
Describe the bug While running:
from rdkit import Chem
mol = Chem.MolFromSmiles('COc1cc(-c2ccc(-[n+]3nc(-c4ccc([N+](=O)[O-])cc4)nn3-c3ccc([N+](=O)[O-])cc3)c(OC)c2)ccc1-[n+]1nc(-c2ccc([N+](=O)[O-])cc2)nn1-c1ccc([N+](=O)[O-])cc1')
resonance_mols = list(Chem.ResonanceMolSupplier(mol))
The ResonanceMolSupplier freezes.
To Reproduce run the code above.
Expected behavior Not freeze but return.
Configuration (please complete the following information):
- RDKit version: 2023.3.1
- OS: Windows 10
- Python version (if relevant): 3.11
- Are you using conda: yes
- If you are using conda, which channel did you install the rdkit from? rdkit 2023.3.1 pypi_0 pypi
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (5 by maintainers)
This is still an issue in 2023.9.4
update:
rdkit.Chem.rdchem.ResonanceFlags.UNCONSTRAINED_CATIONSis givenResonanceMolSupplierEmptyResonanceMolSupplierCallbackworkaround above, ifrms.SetProgressCallback(None), rdkit seems better,ResonanceMolSupplierreturns results after a couple of minutes. Very slow, but not completely frozen.@simonmb I will fix this before next release.