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

Merged
merged 35 commits into from
Nov 4, 2024
Merged

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

Attention: Patch coverage is 95.55556% with 2 lines in your changes missing coverage. Please review.

Project coverage is 93.62%. Comparing base (7f93571) to head (82a9034).
Report is 36 commits behind head on main.

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
mattwthompson and others added 2 commits October 15, 2024 15:35
Co-authored-by: Josh A. Mitchell <yoshanuikabundi@gmail.com>
Co-authored-by: Josh A. Mitchell <yoshanuikabundi@gmail.com>
mattwthompson and others added 6 commits October 15, 2024 15:35
Co-authored-by: Josh A. Mitchell <yoshanuikabundi@gmail.com>
Co-authored-by: Josh A. Mitchell <yoshanuikabundi@gmail.com>
Co-authored-by: Josh A. Mitchell <yoshanuikabundi@gmail.com>
Co-authored-by: Josh A. Mitchell <yoshanuikabundi@gmail.com>
@mattwthompson
Copy link
Member Author

Aiming to sync this up and re-visit, probably to finish it up, after #1053 is merged in

@mattwthompson mattwthompson changed the base branch from develop to main November 4, 2024 20:09
@mattwthompson mattwthompson merged commit 25e3eec into main Nov 4, 2024
22 checks passed
@mattwthompson
Copy link
Member Author

Thank you @Yoshanuikabundi!

@mattwthompson mattwthompson deleted the preset-charges branch November 7, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment