Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
<!-- markdownlint-disable -->
# Changelog

## Unreleased

### 🎉 New Features
* Constraints support for molecular dynamics and optimization by @thomasloux in [#294](https://github.com/TorchSim/torch-sim/pull/294)
- Added `FixAtoms` constraint to fix specific atoms in place
- Added `FixCom` constraint to prevent center of mass drift
- Constraints automatically adjust degrees of freedom for accurate temperature calculations
- Full support across all integrators (NVE, NVT, NPT) and optimizers (FIRE, Gradient Descent)
- Constraints preserved during state manipulation (slicing, splitting, concatenation)

## v0.4.0

Thank you to everyone who contributed to this release! This release includes significant API improvements and breaking changes. @janosh led a major API redesign to improve usability. @stefanbringuier added heat flux calculations. @curtischong continued improving type safety across the codebase. @CompRhys, @orionarcher, @WillEngler, and @thomasloux all made valuable contributions. 🚀
Expand Down
3 changes: 1 addition & 2 deletions examples/scripts/3_Dynamics/3.10_Hybrid_swap_mc.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ class HybridSwapMCState(ts.SwapMCState, MDState):
last_swap: Last swap attempted
"""

last_permutation: torch.Tensor
_atom_attributes = (
ts.SwapMCState._atom_attributes | MDState._atom_attributes | {"last_permutation"} # noqa: SLF001
ts.SwapMCState._atom_attributes | MDState._atom_attributes # noqa: SLF001
)
_system_attributes = (
ts.SwapMCState._system_attributes | MDState._system_attributes # noqa: SLF001
Expand Down
6 changes: 4 additions & 2 deletions examples/tutorials/hybrid_swap_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ class HybridSwapMCState(SwapMCState, MDState):
from MDState.
"""

last_permutation: torch.Tensor
_atom_attributes = (
MDState._atom_attributes | {"last_permutation"} # noqa: SLF001
ts.SwapMCState._atom_attributes | MDState._atom_attributes # noqa: SLF001
)
_system_attributes = (
ts.SwapMCState._system_attributes | MDState._system_attributes # noqa: SLF001
)


Expand Down
Loading
Loading