Skip to content

update guides for inserting terminal groups - #65

Merged
sreekanth221998 merged 1 commit into
mainfrom
updatehowtoguides
Aug 6, 2025
Merged

update guides for inserting terminal groups#65
sreekanth221998 merged 1 commit into
mainfrom
updatehowtoguides

Conversation

@sreekanth221998

@sreekanth221998 sreekanth221998 commented Aug 6, 2025

Copy link
Copy Markdown
Collaborator

Summary by Sourcery

Clarify and expand the guide for adding terminal groups to polymers by demonstrating separate backbone, sidechain, and full polymer workflows

Documentation:

  • Update section heading to reflect sidechain, backbone, and full polymer terminal group insertion
  • Replace the single terminal_groups attribute with backbone_terminal_groups and sidechain_terminal_groups
  • Add FullPolymerFeaturizer to imports and include a full polymer featurization example

@sourcery-ai

sourcery-ai Bot commented Aug 6, 2025

Copy link
Copy Markdown

Reviewer's Guide

This PR revises the terminal group insertion guide in the documentation by restructuring the example to support separate backbone, sidechain, and full polymer workflows, updating imports and the example polymer, and adding new featurizer use cases.

Class diagram for updated featurizer usage with terminal groups

classDiagram
    class Polymer {
        +from_psmiles(psmiles: str)
        +backbone_terminal_groups: dict
        +sidechain_terminal_groups: dict
    }
    class NumBackBoneFeaturizer
    class BackBoneFeaturizer {
        +BackBoneFeaturizer(featurizer)
    }
    class NumSideChainFeaturizer
    class SideChainFeaturizer {
        +SideChainFeaturizer(featurizer)
    }
    class FullPolymerFeaturizer {
        +FullPolymerFeaturizer(featurizer)
    }
    class MultipleFeaturizer {
        +MultipleFeaturizer(featurizers: list)
        +featurize(polymer)
    }
    class NumRings
    class NumAtoms
    class NumHBondDonors
    class TopologicalSurfaceArea

    Polymer <|-- NumBackBoneFeaturizer
    Polymer <|-- BackBoneFeaturizer
    Polymer <|-- NumSideChainFeaturizer
    Polymer <|-- SideChainFeaturizer
    Polymer <|-- FullPolymerFeaturizer
    MultipleFeaturizer o-- NumBackBoneFeaturizer
    MultipleFeaturizer o-- BackBoneFeaturizer
    MultipleFeaturizer o-- NumSideChainFeaturizer
    MultipleFeaturizer o-- SideChainFeaturizer
    MultipleFeaturizer o-- FullPolymerFeaturizer
    BackBoneFeaturizer o-- NumRings
    SideChainFeaturizer o-- NumAtoms
    SideChainFeaturizer o-- NumHBondDonors
    SideChainFeaturizer o-- TopologicalSurfaceArea
    FullPolymerFeaturizer o-- NumAtoms
    FullPolymerFeaturizer o-- NumHBondDonors
    FullPolymerFeaturizer o-- TopologicalSurfaceArea
Loading

File-Level Changes

Change Details Files
Expanded terminal group insertion guide to cover backbone, sidechain, and full polymer workflows
  • Updated section title and introductory text for three insertion scopes
  • Removed generic terminal_groups example and narrative
  • Added description of backbone_terminal_groups and sidechain_terminal_groups attributes
docs/how_to_guides.md
Enhanced imports and example polymer instantiation
  • Imported FullPolymerFeaturizer and chemical featurizers (NumRings, NumAtoms, TopologicalSurfaceArea)
  • Replaced the example PSMILES string with a more detailed polymer structure
docs/how_to_guides.md
Replaced single terminal_groups assignment with separate backbone and sidechain assignments
  • Removed polymer.terminal_groups usage
  • Added polymer.backbone_terminal_groups and polymer.sidechain_terminal_groups assignments
docs/how_to_guides.md
Added sidechain and full polymer featurizer workflows to the example
  • Introduced sidechain_featurizers list and MultipleFeaturizer invocation
  • Introduced full_polymer_featurizers list and MultipleFeaturizer invocation
docs/how_to_guides.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey @sreekanth221998 - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `docs/how_to_guides.md:189` </location>
<code_context>
-### Adding terminal groups to polymers (user has to specify the terminal groups)
+### Adding terminal groups to polymers (sidechain, backbone and full polymer)
+
+When working with polymers, you may want to add terminal groups to the polymer backbone or sidechains. This can be done by specifying the terminal groups in the `terminal_groups` attribute of the `Polymer` class.

 ```python
</code_context>

<issue_to_address>
Update reference to 'terminal_groups' attribute to match code example.

Update the sentence to reference 'backbone_terminal_groups' and 'sidechain_terminal_groups' instead of 'terminal_groups' to match the code.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread docs/how_to_guides.md
### Adding terminal groups to polymers (user has to specify the terminal groups)
### Adding terminal groups to polymers (sidechain, backbone and full polymer)

When working with polymers, you may want to add terminal groups to the polymer backbone or sidechains. This can be done by specifying the terminal groups in the `terminal_groups` attribute of the `Polymer` class.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue: Update reference to 'terminal_groups' attribute to match code example.

Update the sentence to reference 'backbone_terminal_groups' and 'sidechain_terminal_groups' instead of 'terminal_groups' to match the code.

@sreekanth221998
sreekanth221998 merged commit 0b0398e into main Aug 6, 2025
1 check passed
@sreekanth221998
sreekanth221998 deleted the updatehowtoguides branch August 11, 2025 12:59
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