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

Handle some edge cases with preset charges #1070

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

mattwthompson
Copy link
Member

@mattwthompson mattwthompson commented Oct 3, 2024

Description

This PR better handles user inputs around the charge_from_molecules argument from the toolkit. Resolves #1057 #1058 #1059

Checklist

  • Error if charge_from_molecules contains any molecule without partial charges
  • Error if charge_from_molecules contains any duplicate molecules (defined by isomorphism, approximated by SMILES without hydrogens)
  • Test behavior discussed in Partial charge assignment using charge_from_molecules on virtual sites / charge increments can be unexpected. #1050
  • Add tests
  • Lint
  • Update docstrings
    • Update from_smirnoff docstring
    • Add user guide
      • Describe charge assignment hierarchy
      • Describe limitations with preset charges
      • Add FAQ entry I guess we don't have an FAQ here, maybe should check openff-docs

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.61%. Comparing base (7b571ca) to head (23a4c26).

Additional details and impacted files

@mattwthompson mattwthompson marked this pull request as ready for review October 4, 2024 20:08
Copy link
Collaborator

@Yoshanuikabundi Yoshanuikabundi left a comment

Choose a reason for hiding this comment

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

These are great improvements I think. I think the documentation changes from #1048 could be merged with this so that the charge hierarchy is only documented once, which might improve findability - I think if there is similar documentation in two places, people sometimes read one place carefully, then later find the second place and think they're already familiar with it coz it looks the same.

My notes are mostly just adding more detail to what you've written, but this is great!

docs/using/edges.md Outdated Show resolved Hide resolved
docs/using/edges.md Outdated Show resolved Hide resolved
docs/using/edges.md Show resolved Hide resolved
openff/interchange/components/interchange.py Outdated Show resolved Hide resolved
openff/interchange/smirnoff/_create.py Outdated Show resolved Hide resolved
openff/interchange/smirnoff/_create.py Outdated Show resolved Hide resolved
@mattwthompson mattwthompson added this to the 0.4.1 milestone Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment