Feature/neb workflow and FIRE logic modified #173
Closed
mstapelberg wants to merge 14 commits intoTorchSim:optimizer_ase_testfrom
Closed
Feature/neb workflow and FIRE logic modified #173mstapelberg wants to merge 14 commits intoTorchSim:optimizer_ase_testfrom
mstapelberg wants to merge 14 commits intoTorchSim:optimizer_ase_testfrom
Conversation
* fix virial calculations in optimizers and integrators * refactor cell_forces in optimizers.py * clarify test_state_round_trip not testing round trip for masses with pymatgen and phonopy
* update mace checkpoint URLs * tweak float formatting in prints * add torch_sim/typing.py * docs CI remove invalid workflow_run context access * fix broken import * rename MemoryScaler -> MemoryScaling * move BravaisType enum to typing.py * move StateLike union to typing.py * use simpler torch.as_tensor instead of if/else
* pad max memory estimation in autobatcher by 0.9 * prevent mace logic from running and ignore env files * comment out note in PR template * multiply by max memory scaler and don't use *= * lint * *= -> more explicit
* throw error if autobatcher type is wrong * make InFlight.load_stes return max memory scaler * refactor _get_first_batch to save memory estimation evaluation * fix testing * lint
* removed unused today variable in `torch_sim/__init__.py` * add docs/_static/draw_pkg_treemap.py script to draw treemap of the torch_sim package structure, show HTML in docs/reference/index.rst * try iframe to render ../_static/torch-sim-pkg-treemap.html * run python docs/_static/draw_pkg_treemap.py in docs.yml * draw_pkg_treemap.py use uv run to resolve script deps
* fix broken image rendering as raw markdown in InFlightAutoBatcher doc string * bump mace-torch to v0.3.12 in pyproject.toml and example scripts
enable markdownlint pre-commit hook and fix errors
Calculates power before velocity updates velocity mixing is applied conditionally, if P > 0, otherwise velocities are reset maxstep parameter (default 0.2) is added and uses global scaling based on norm of entire displacement vector like ASE removed explicit velocity-verlet half-steps from fire_step to mimic ASE feat(neb): added NEB implementation with improved tangent based on ASE NEB includes interpolation (mic optional), climbing image (optional), and batched processing.
…ror stefan's code
…d updated the default spring constant
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
This PR implements a NEB workflow (
torch_sim.workflows.neb) and several changes to the FIRE optimizer (torch_sim.optimizers.fire). The changes closely emulate ASE's results and implement batching for fast NEB simulations. This is meant to be added to pull request #146 based on @janosh suggestion.Key changes include:
torch_sim.workflows.neb.NEBclass:torch-sim.torch-simoptimizers (fire,gd,frechet_cell_fire).use_climbing_image=True).TorchSimTrajectory.torch_sim.optimizers.fire):fire_steplogic more closely with standard FIRE implementations (like ASE's) regarding power calculation (F·V), adaptive timestep/alpha updates, and velocity mixing/resetting, resolving previous discrepancies.Checklist
Before a pull request can be merged, the following items must be checked:
Run ruff on your code.
Adds NEB workflow feature and addresses issues identified during debugging NEB workflow related to #146