Allow disabling 3D descriptors while enabling 2D descriptors #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for disabling the calculation of 3D descriptors independently in the
from_smilesfunction, while preserving backward compatibility.Problem
Currently, the
from_smilesfunction uses a singledescriptorsflag to control both 2D and 3D descriptor calculation. However, some SMILES strings (e.g., "C") causeRuntimeErrorwhen 3D descriptors are enabled, even though they work fine with only 2D descriptors.For example:
Usage behavior
If
descriptors_3dis not provided, it defaults to the value of descriptors (preserving current behavior).If
descriptors_3d=False, 3D descriptor calculation is skipped even when descriptors=True.Usage example:
Potential fix for
This change may also help fix related issues such as #51 or #9 and #11.