Skip to content

Bug fix: dimers + unique_pairs_only#348

Merged
chrisiacovella merged 5 commits intochoderalab:mainfrom
chrisiacovella:bf-dimers
Apr 1, 2025
Merged

Bug fix: dimers + unique_pairs_only#348
chrisiacovella merged 5 commits intochoderalab:mainfrom
chrisiacovella:bf-dimers

Conversation

@chrisiacovella
Copy link
Copy Markdown
Member

@chrisiacovella chrisiacovella commented Mar 29, 2025

Pull Request Summary

This fixes a bug where the shape of the underlying tensors in the PairListData was incorrect when evaluating the neighbors of a dimer with unique_pairs_only.

This issue stemmed from squeezing the array for masking; when that mask only had dimension 1, it was squashed. The addition of a reshape(-1) fixes this issue. Tests for the dimer edge case were also added.

This also addresses the issue with calculating the AngularSymmetryFunction for dimers. As discussed in the linked issue, for a dimer, where there are no angles, this tensor is empty. Reshaping the empty tensor was undefined; changing this to use flatten instead works for all cases. This edge case was missed in the ani testing due to the fact the 1000 conformer test say does not feature one of the ~10 dimer systems in the dataset (and thus failure was only observed when training with the full dataset). Additional tests still are required to cover this edge case.

Associated Issue(s)

Pull Request Checklist

  • Issue(s) raised/addressed and linked
  • Includes appropriate unit test(s)
  • Appropriate docstring(s) added/updated
  • Appropriate .rst doc file(s) added/updated
  • PR is ready for review

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.58%. Comparing base (ba16705) to head (25395b7).
⚠️ Report is 382 commits behind head on main.

❌ Your project status has failed because the head coverage (81.58%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chrisiacovella chrisiacovella merged commit 660b3fb into choderalab:main Apr 1, 2025
14 checks passed
@chrisiacovella chrisiacovella deleted the bf-dimers branch April 1, 2025 21:22
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.

2 participants