Skip to content

Fix center of mass shifting#304

Merged
wiederm merged 2 commits intochoderalab:mainfrom
chrisiacovella:ref-fix_com_shift
Oct 29, 2024
Merged

Fix center of mass shifting#304
wiederm merged 2 commits intochoderalab:mainfrom
chrisiacovella:ref-fix_com_shift

Conversation

@chrisiacovella
Copy link
Copy Markdown
Member

@chrisiacovella chrisiacovella commented Oct 29, 2024

Center of mass shifting was failing when a dataset had multiple conformers (accidentally was using indices for the atom_numbers, which are not duplicated between multiple conformers, instead of using the indices that referred to series data). As such, this was working fine for qm9, which was used for testing, but failing for all other datasets PhAlkEthOH.

Key changes

Notable points that this PR has either accomplished or will accomplish.

  • Revise indexing in center of mass removal
  • Add tests over PhAlkEthOH that also include ensuring r_ij and d_ij match (i.e., ensure we are invariant under translation)

Associated Issue(s)

  • Issue 1

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

…ic_numbers array (single_atom) not series_atom properties. This was causing shifting to be imporperly applied for any system with more than one conformer.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.33%. Comparing base (710d1e4) to head (9a3236e).
Report is 3 commits behind head on main.

Additional details and impacted files

Copy link
Copy Markdown
Member

@wiederm wiederm left a comment

Choose a reason for hiding this comment

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

Thanks! That should fix the issue!

@wiederm wiederm enabled auto-merge October 29, 2024 13:29
@wiederm wiederm merged commit f20c713 into choderalab:main Oct 29, 2024
@chrisiacovella chrisiacovella deleted the ref-fix_com_shift branch August 27, 2025 18:27
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.

3 participants