Skip to content

Conversation

@roccomoretti
Copy link
Member

@Bloeci noticed a substantial scoring discrepancy when working with poses which had been cloned and then minimized. It looks like there's an issue when you score the pose before cloning and then go into minimization. -- Notably, this seems to only be the case for beta & beta_nov16 energy functions.

I've tracked this down to some issue with the Energy Graph. If you reset the energy graph (basically delete and then re-add the EnergyEdges) this discrepancy goes away. -- I can't understand why, though, because it goes away even if you put all the energy edges back the way they were. I'm also not sure how/why that would be interacting with the beta_nov16 specifically.

Lacking the ability to take this any further, I've encapsulated things into a unit test. Hopefully this will help someone to investigate further.

(P.S. It looks like only the errant score-before-cloned minimization is resulting in the "Inaccurate G" messages -- which may or may lead into the discrepancy.)

@roccomoretti roccomoretti requested a review from fdimaio October 17, 2025 17:52
@roccomoretti roccomoretti added bug Something isn't working help wanted Extra attention is needed 01 unit labels Oct 17, 2025
@roccomoretti
Copy link
Member Author

Note that this likely shouldn't be merged until we figure out how to fix it.

@zznidar
Copy link

zznidar commented Oct 18, 2025

I think I've already asked Max this during the workshop, but does the minimiser take any of the already-calculated energies/forces/any other vectors? Because the shape of the minimised molecule was also different, as though it started with different starting conditions.

@roccomoretti
Copy link
Member Author

To save on computation, the ScoreFunction does a bunch of caching of energies, and only recomputes things as needed. This caching happens in the Energies object. I'm guessing that's what's causing the issue -- there's some issue with the use of the cached energies during minimization which causes the difference.

Note that while minimization should be deterministic, it's expected that if you have slightly different starting conditions, you'll possibly end up in completely different places. This would also be the case if you had a slightly different energy function, even if only for a few steps. The path you take through the energy landscape is highly sensitive to the exact energy function gradients you compute, and if those deviate slightly, you'll take a (potentially wildly) different trajectory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

01 unit bug Something isn't working help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants