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
The toolkit fails to generate InChi for molecules with more than 1024 atoms.
To Reproduce
In this example, C340 passes but C341 errors. This is where the number of atoms crosses 1024.
fromopenff.toolkitimportForceField, Moleculefromopenff.toolkit.utils.exceptionsimportEmptyInChiErrorfornin [340, 341]:
molecule=Molecule.from_smiles(n*"C")
try:
molecule.to_inchi()
exceptEmptyInChiErroraserror:
print(f"failed with {n=}")
print(f"{error=}")
continueprint(f"passed with {n=}")
# double-check that the SMILES conversion doesn't crash, and is probably correctassertn==len(molecule.to_smiles(explicit_hydrogens=False))
Output
With OpenEye installed and licensed:
passed with n=340
Warning: OECreateInChI: InChI only supports molecules with between 1 and 1023 atoms! (note: large molecule support is experimental)
failed with n=341
error=EmptyInChiError('OEChem failed to generate an InChI for the molecule.')
Without the license accessible:
passed with n=340
[14:27:42] ERROR: Too many atoms [did you forget 'LargeMolecules' switch?]
failed with n=341
error=EmptyInChiError('RDKit failed to generate an InChI for the molecule.')
Computing environment (please complete the following information):
InChi versions prior to 1.05 (2017) were limited to 1024 atoms. OpenEye says they use version 1.06, so their error message is outdated in saying that InChi only supports molecules up to 1023 atoms and, as far as the release notes indices, that large molecule support is experimental.
I can't find what version of InChi is used by RDKit, but its error message indicates it uses 1.05+ and does support it with a flag being passed through.
Describe the bug
The toolkit fails to generate InChi for molecules with more than 1024 atoms.
To Reproduce
In this example, C340 passes but C341 errors. This is where the number of atoms crosses 1024.
Output
With OpenEye installed and licensed:
Without the license accessible:
Computing environment (please complete the following information):
conda list
: https://gist.github.com/mattwthompson/39e450a1cb21e088debde9fc1756b677Additional context
InChi versions prior to 1.05 (2017) were limited to 1024 atoms. OpenEye says they use version 1.06, so their error message is outdated in saying that InChi only supports molecules up to 1023 atoms and, as far as the release notes indices, that large molecule support is experimental.
I can't find what version of InChi is used by RDKit, but its error message indicates it uses 1.05+ and does support it with a flag being passed through.
https://docs.eyesopen.com/toolkits/python/oechemtk/OEChemFunctions/OEMolToInChI.html?highlight=inchi#OEChem::OEMolToInChI
https://github.com/IUPAC-InChI/InChI/blob/v1.07.1/INCHI-1-DOC/CHANGELOG.md#v105-release-2017-02-04
The text was updated successfully, but these errors were encountered: