Skip to content

Fix gradients calculation with sample selection#427

Merged
Luthaf merged 1 commit intometatensor:mainfrom
Luthaf:fix-sample-selection-gradients
Mar 17, 2026
Merged

Fix gradients calculation with sample selection#427
Luthaf merged 1 commit intometatensor:mainfrom
Luthaf:fix-sample-selection-gradients

Conversation

@Luthaf
Copy link
Copy Markdown
Member

@Luthaf Luthaf commented Mar 17, 2026

There where two bugs, one about wrong indexing (since the number of pairs used for the calculation would not match the full number of pairs, but the same index was used for both); and one about the gradient not being stored if the second atom in the pair was selected.

Many thanks to @TheophaneBernhard and @andreagrisafi who found and reported this issue!

@Luthaf Luthaf force-pushed the fix-sample-selection-gradients branch from 01c7fbd to 840c574 Compare March 17, 2026 09:43
There where two bugs, one about wrong indexing (since the
number of pairs used for the calculation would not match the
full number of pairs, but the same index was used for both); and
one about the gradient not being stored if the second atom in the
t pair was selected.
@Luthaf Luthaf force-pushed the fix-sample-selection-gradients branch from 840c574 to e3c01e4 Compare March 17, 2026 13:27
@Luthaf Luthaf merged commit c907c0c into metatensor:main Mar 17, 2026
64 checks passed
@Luthaf Luthaf deleted the fix-sample-selection-gradients branch March 17, 2026 13:47
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