Repository navigation
Bug fixes in MD, cell optimizers, Ewald stress and elastic tensors - #626
Merged
Merged
Conversation
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
rngfrom torch's global generator instead oftorch.Generator()'s fixed default seed, so unseeded runs differ andtorch.manual_seed()makes them reproducible. Nosé-Hoover and NVE draw their starting momenta fromrngtoo, so their unseeded runs now differ as well. The reproducibility docs are updated to match, and their Nosé-Hoover example now seeds the state.BinningAutoBatchergives each batch after the first its own seed drawn from the state's generator, so replicas in different batches no longer get identical noise, seeded or not.chain,thermostatandbarostatare now per-system attributes, so slicing, splitting and concatenating keep each system's own chain, and.to()converts it.mu @ hto match the position update, so atoms keep their fractional coordinates. The old update heated a 60 K run to 88 K.muis now the upper-triangularRof the deformation's QR decomposition instead ofR^T, becauseR^T @ hwould slowly rotate upper-triangular cells such as ASE's.concatenate_statespads the BFGS Hessian and L-BFGS history before the cell block instead of after it, so cell-optimizer states of different sizes keep their cell DOFs in place when merged. It also pads a shorter L-BFGS history at the front instead of the end, so the newest pair stays last. Before, the last pair of a merged system with a shorter history was zero padding, so its step lost the usual initial Hessian scaling and differed from the step it would take alone.set_constrained_celland scales atoms with the cell, as L-BFGS does, so FixSymmetry now holds.vv_firewith a cell filter now moves the cell; it only ever moved the atoms.vv_firemixes velocities with the current alpha before decaying it, thevv_firecounterpart of ase_fire departs from ASE's FIRE: alpha decayed before mixing, and dt halved for structures joining a running batch #611.EwaldModelrecomputes a system's stress on its own when the batch's shared k-space grid gives it a 0/0 virial, instead of returning NaN.make_sb_sim_statenow rotates its axis onto z.main.torch.manual_seed(0).test_optimizer_sym_convergesuses noise that FixSymmetry cancels exactly, because before it passed for only about 1 seed in 10. Its LJ now has σ = 2.5 Å, near the hcp neighbor distance, so the strained cell starts well above the force tolerance instead of already converged, and it gets twiceMAX_STEPS.Checklist
Before a pull request can be merged, the following items must be checked: