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

add support for patterns in scaffold decoration #59

Merged
merged 6 commits into from
Sep 12, 2024
Merged

add support for patterns in scaffold decoration #59

merged 6 commits into from
Sep 12, 2024

Conversation

maclandrol
Copy link
Member

Changelogs

  • Add support for pattern-based decoration in SAFE.

Checklist:

  • Add tests to cover the fixed bug(s) or the new introduced feature(s) (if appropriate).
  • Update the API documentation if a new function is added, or an existing one is deleted. Eventually consider making a new tutorial for new features.
  • Write concise and explanatory changelogs below.
  • If possible, assign one of the following labels to the PR: feature, fix or test (or ask a maintainer to do it for you).

In this PR, scaffold decoration with SAFE is extended to support molecular patterns (SMARTS). Note that the full specification of SMARTS is not supported in this implementation due to various limitations with the tokenizer and how SMARTS patterns are matched with the tokens for constrained-sampling.

@maclandrol maclandrol added enhancement New feature or request feature labels Sep 11, 2024
@maclandrol maclandrol requested a review from a team September 11, 2024 20:54
safe/_pattern.py Outdated Show resolved Hide resolved
safe/_pattern.py Outdated Show resolved Hide resolved
safe/_pattern.py Outdated Show resolved Hide resolved
safe/_pattern.py Outdated Show resolved Hide resolved
Copy link
Contributor

@zhu0619 zhu0619 left a comment

Choose a reason for hiding this comment

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

Thanks @maclandrol

The generation process is the constrained generation based on scaffold with pattern, followed by fragment extension.
Could you also add a few bullet points docstrings on the generation logic for both classes to make the explanation easier to understand for others?

@maclandrol
Copy link
Member Author

Thanks, I will address those comments.

@maclandrol maclandrol requested a review from zhu0619 September 12, 2024 17:57
safe/sample.py Outdated Show resolved Hide resolved
docs/tutorials/design-with-safe.ipynb Outdated Show resolved Hide resolved
@maclandrol
Copy link
Member Author

All fixed now. Thanks @zhu0619

@maclandrol maclandrol merged commit 752b101 into main Sep 12, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants