Conversation
n_degrees_of_freedom was hardcoded to 3*len(atoms), which biases the target temperature upward when constraints (e.g. FixCom) remove DOF, and silently divides by zero if velocities haven't been set yet. Both fixes mirror ASE's own reference ase.md.bussi.Bussi implementation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
n_degrees_of_freedomused a hardcoded3 * len(atoms), biasing the target temperature upward whenever DOF-removing constraints (e.g.FixCom) are attached. Now usesatoms.get_number_of_degrees_of_freedom(), matching ASE's own referencease.md.bussi.Bussiimplementation.__init__that raisesValueErrorif the initial kinetic energy is ~0, to avoid a silent divide-by-zero/NaN when velocities haven't been set yet. Also matches ASE's reference implementation.Test plan
FixComconstraint and confirm the reported/sampled temperature matches target (previously biased ~1-33% high depending on system size)Bussiwith zero-velocity atoms raisesValueError🤖 Generated with Claude Code