Skip to content

Replace in-place operation with out-of-place one to allow energy backward pass.#150

Merged
lilyminium merged 3 commits intoopenforcefield:mainfrom
JMorado:issue-148-in-place-operations
Mar 6, 2026
Merged

Replace in-place operation with out-of-place one to allow energy backward pass.#150
lilyminium merged 3 commits intoopenforcefield:mainfrom
JMorado:issue-148-in-place-operations

Conversation

@JMorado
Copy link
Copy Markdown
Collaborator

@JMorado JMorado commented Mar 5, 2026

Description

This PR fixes #148 by replacing an in-place operation by an out-of-place one and adds a test to ensure backward pass works when optimising attributes and parameters.

Status

  • Ready to go

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@4a3fc64). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #150   +/-   ##
=======================================
  Coverage        ?   98.16%           
=======================================
  Files           ?       25           
  Lines           ?     2348           
  Branches        ?        0           
=======================================
  Hits            ?     2305           
  Misses          ?       43           
  Partials        ?        0           
Flag Coverage Δ
unittests 98.16% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Copy link
Copy Markdown
Contributor

@lilyminium lilyminium left a comment

Choose a reason for hiding this comment

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

LGTM -- thanks @JMorado! CI is failing because forks can't access secrets. I've invited you to as a collaborator, which I think will let you make branches on this repo itself in the future?

@lilyminium lilyminium merged commit 8483a22 into openforcefield:main Mar 6, 2026
13 of 18 checks passed
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.

In-place operations breaking gradient flow for attributes

3 participants