8000 Added functional group nomenclature method by whitead · Pull Request #149 · ur-whitelab/exmol · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added functional group nomenclature method #149

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

Merged
merged 1 commit into from
Mar 8, 2025
Merged

Conversation

whitead
Copy link
Contributor
@whitead whitead commented Mar 8, 2025

No description provided.

@whitead whitead requested a review from Copilot March 8, 2025 07:26
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR adds a new method for extracting functional group names from molecules and updates test cases and workflow configurations.

  • Introduces get_functional_groups to extract and prioritize functional groups based on SMARTS definitions.
  • Updates tests to validate functional group extraction and adjusts tolerances in sample generation tests.
  • Upgrades Python versions in CI workflows to include newer releases.

Reviewed Changes

File Description
exmol/exmol.py Added get_functional_groups method for functional group extraction.
tests/test_exmol.py Added tests for functional groups and adjusted sample generation tolerances.
.github/workflows/tests.yml Updated Python versions from 3.10 to 3.13 (excluding 3.10).
.github/workflows/docs.yml Updated Python version from 3.11 to 3.12 in documentation build workflow.

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (3)

exmol/exmol.py:262

  • Ensure that '_SMARTS' is initialized at the module level (e.g., _SMARTS = None) before using it to prevent potential NameError issues.
global _SMARTS

exmol/exmol.py:278

  • This sorting assumes each item in _SMARTS is a tuple with a rank as the second element; ensure the data in 'smarts.txt' always adheres to this structure to avoid runtime errors.
sorted_smarts = sorted(_SMARTS.items(), key=lambda x: x[1][1])

tests/test_exmol.py:65

  • [nitpick] Increasing the tolerance from 1 to 2 may mask potential issues in sample generation; please verify that this change is intentional and that edge cases are adequately covered.
assert abs(len(result[0]) - 12) <= 2

@whitead whitead merged commit 4897570 into main Mar 8, 2025
4 checks passed
@whitead whitead deleted the functional-groups branch March 8, 2025 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0