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

Error handling for PaDEL-Descriptor not returning any calculated values #13

Merged
merged 3 commits into from
Jun 16, 2020

Conversation

tjkessler
Copy link
Member

This update includes handling for an error observed in issue #12, where some compounds would return no computed descriptors/fingerprints (temporary CSV not saving an entry for the compound).

For example, the compound "buprenorphine" with SMILES string "Oc7ccc5c1c7O[C@H]3[C@]6(OC)C@HC@@(C)C(C)(C)C" would produce an output CSV file with no entry for the compound when the following is executed:

from padelpy import from_smiles

from_smiles('Oc7ccc5c1c7O[C@H]3[C@]6(OC)C@HC@@(C)C(C)(C)C', output_csv='output.csv')

When PaDELPy re-imports these descriptors to return to the user, an indexing error occurred due to the from_smiles function (and the from_mdl function, it has the same behavior) looking through an empty list.

This update ensures that the following exception is raised if this behavior occurs:

RuntimeError: PaDEL-Descriptor returned no calculated values. Ensure the input structure is correct.

One of buprenorphine's alternate SMILES strings, "C[C@([C@H]1C[C@@]23CC[C@@]1([C@H]4[C@@]25CCN([C@@h]3CC6=C5C(=C(C=C6)O)O4)CC7CC7)OC)(C(C)(C)C)O", also produces this error. Another alternate SMILES string, "CC(C)(C)C(C)(C1CC23CCC1(C4C25CCN(C3CC6=C5C(=C(C=C6)O)O4)CC7CC7)OC)O", simply causes a timeout error (unable to calculate descriptors given 60 minutes of available runtime, as stated in the above issue).

The issue cited above states that the GUI version of PaDEL-Descriptor is also unable to calculate values for these SMILES, therefore I theorize that the underlying issue is likely within PaDEL-Descriptor.

This update also includes updated DocStrings.

@tjkessler tjkessler added bug Something isn't working documentation Improvements or additions to documentation labels Jun 16, 2020
@tjkessler tjkessler self-assigned this Jun 16, 2020
@tjkessler tjkessler merged commit fd09a3c into master Jun 16, 2020
@tjkessler tjkessler deleted the dev branch June 16, 2020 01:56
@tjkessler tjkessler mentioned this pull request Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant