Restore #460 seed-removal semantics after #339#477
Merged
Conversation
- remove reintroduced seed kwargs from NVE/NVT/NPT init APIs and route seeding through state.rng again - restore initialize_momenta usage in integrator init paths and drop calculate_momenta helper reintroduced by #339 edits - update affected examples/tutorial and testing helper to use state-bound RNG behavior
Collaborator
|
Overall looks good to me, but I haven't checked that it covered all cases of seed. |
Revert DOF aggregation in constraint DOF helper back to per-system tensor behavior and align tests with explicit per-system assertions.
Collaborator
|
@janosh actually I've added |
Collaborator
|
If it happens that some people use this function, actually the fix is change the type annotation. It should return a torch.Tensor and not a int. That's actually the error on my side + changing the check for non negativity. |
3 tasks
Member
Member
|
Will merge this and let #479 resolve itself separately |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
seedkwarg and instead usestate.rnginitialize_momenta(..., generator=state.rng)and remove the reintroducedcalculate_momentahelperstate.rng = ...)Context
These are surgical restorations of intentional changes from #460 that were unintentionally lost during the large
ty-fixing merge in #339.@CompRhys sorry about this oversight on my side while polishing the #339 LLM type fixes. I think this surgical restore might be easier to review than the broader revert path in #476.