Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .coderabbit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
reviews:
high_level_summary: false
auto_review:
enabled: false
drafts: false
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
path: ./docs_build

deploy:
if: github.repository_owner == 'Radical-AI' && github.ref == 'refs/heads/main'
if: github.repository_owner == 'TorchSim' && github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
82 changes: 41 additions & 41 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,89 +6,89 @@

### 💥 Breaking Changes

* Remove higher level model imports by @CompRhys in https://github.com/Radical-AI/torch-sim/pull/179
* Remove higher level model imports by @CompRhys in https://github.com/TorchSim/torch-sim/pull/179

### 🛠 Enhancements

* Add per atom energies and stresses for batched LJ by @abhijeetgangan in https://github.com/Radical-AI/torch-sim/pull/144
* throw error if autobatcher type is wrong by @orionarcher in https://github.com/Radical-AI/torch-sim/pull/167
* Add per atom energies and stresses for batched LJ by @abhijeetgangan in https://github.com/TorchSim/torch-sim/pull/144
* throw error if autobatcher type is wrong by @orionarcher in https://github.com/TorchSim/torch-sim/pull/167

### 🐛 Bug Fixes

* Fix column->row cell vector mismatch in integrators by @CompRhys in https://github.com/Radical-AI/torch-sim/pull/175
* Mattersim fix tensors on wrong device (CPU->GPU) by @orionarcher in https://github.com/Radical-AI/torch-sim/pull/154
* fix `npt_langevin` by @jla-gardner in https://github.com/Radical-AI/torch-sim/pull/153
* Make sure to move data to CPU before calling vesin by @Luthaf in https://github.com/Radical-AI/torch-sim/pull/156
* Fix virial calculations in `optimizers` and `integrators` by @janosh in https://github.com/Radical-AI/torch-sim/pull/163
* Pad memory estimation by @orionarcher in https://github.com/Radical-AI/torch-sim/pull/160
* Refactor sevennet model by @YutackPark in https://github.com/Radical-AI/torch-sim/pull/172
* `io` optional dependencies in `pyproject.toml` by @curtischong in https://github.com/Radical-AI/torch-sim/pull/185
* Fix column->row cell vector mismatch in integrators by @CompRhys in https://github.com/TorchSim/torch-sim/pull/175
* Mattersim fix tensors on wrong device (CPU->GPU) by @orionarcher in https://github.com/TorchSim/torch-sim/pull/154
* fix `npt_langevin` by @jla-gardner in https://github.com/TorchSim/torch-sim/pull/153
* Make sure to move data to CPU before calling vesin by @Luthaf in https://github.com/TorchSim/torch-sim/pull/156
* Fix virial calculations in `optimizers` and `integrators` by @janosh in https://github.com/TorchSim/torch-sim/pull/163
* Pad memory estimation by @orionarcher in https://github.com/TorchSim/torch-sim/pull/160
* Refactor sevennet model by @YutackPark in https://github.com/TorchSim/torch-sim/pull/172
* `io` optional dependencies in `pyproject.toml` by @curtischong in https://github.com/TorchSim/torch-sim/pull/185

### 📖 Documentation

* (tiny) add graph-pes to README by @jla-gardner in https://github.com/Radical-AI/torch-sim/pull/149
* Better module fig by @janosh in https://github.com/Radical-AI/torch-sim/pull/168
* (tiny) add graph-pes to README by @jla-gardner in https://github.com/TorchSim/torch-sim/pull/149
* Better module fig by @janosh in https://github.com/TorchSim/torch-sim/pull/168

### 🚀 Performance

* More efficient Orb `state_to_atoms_graph` calculation by @AdeeshKolluru in https://github.com/Radical-AI/torch-sim/pull/165
* More efficient Orb `state_to_atoms_graph` calculation by @AdeeshKolluru in https://github.com/TorchSim/torch-sim/pull/165

### 🚧 CI

* Refactor `test_math.py` and `test_transforms.py` by @janosh in https://github.com/Radical-AI/torch-sim/pull/151
* Refactor `test_math.py` and `test_transforms.py` by @janosh in https://github.com/TorchSim/torch-sim/pull/151

### 🏥 Package Health

* Try out hatchling for build vs setuptools by @CompRhys in https://github.com/Radical-AI/torch-sim/pull/177
* Try out hatchling for build vs setuptools by @CompRhys in https://github.com/TorchSim/torch-sim/pull/177

### 🏷️ Type Hints

* Add `torch_sim/typing.py` by @janosh in https://github.com/Radical-AI/torch-sim/pull/157
* Add `torch_sim/typing.py` by @janosh in https://github.com/TorchSim/torch-sim/pull/157

### 📦 Dependencies

* Bump `mace-torch` to v0.3.12 by @janosh in https://github.com/Radical-AI/torch-sim/pull/170
* Update metatrain dependency by @Luthaf in https://github.com/Radical-AI/torch-sim/pull/186
* Bump `mace-torch` to v0.3.12 by @janosh in https://github.com/TorchSim/torch-sim/pull/170
* Update metatrain dependency by @Luthaf in https://github.com/TorchSim/torch-sim/pull/186

## New Contributors

* @Luthaf made their first contribution in https://github.com/Radical-AI/torch-sim/pull/156
* @YutackPark made their first contribution in https://github.com/Radical-AI/torch-sim/pull/172
* @curtischong made their first contribution in https://github.com/Radical-AI/torch-sim/pull/185
* @Luthaf made their first contribution in https://github.com/TorchSim/torch-sim/pull/156
* @YutackPark made their first contribution in https://github.com/TorchSim/torch-sim/pull/172
* @curtischong made their first contribution in https://github.com/TorchSim/torch-sim/pull/185

**Full Changelog**: https://github.com/Radical-AI/torch-sim/compare/v0.2.0...v0.2.1
**Full Changelog**: https://github.com/TorchSim/torch-sim/compare/v0.2.0...v0.2.1

## v0.2.0

### Bug Fixes 🐛

* Fix integrate reporting kwarg to arg error, https://github.com/Radical-AI/torch-sim/issues/113 (raised by @hn-yu)
* Allow runners to take large initial batches, https://github.com/Radical-AI/torch-sim/issues/128 (raised by @YutackPark)
* Add Fairchem model support for PBC, https://github.com/Radical-AI/torch-sim/issues/111 (raised by @ryanliu30)
* Fix integrate reporting kwarg to arg error, https://github.com/TorchSim/torch-sim/issues/113 (raised by @hn-yu)
* Allow runners to take large initial batches, https://github.com/TorchSim/torch-sim/issues/128 (raised by @YutackPark)
* Add Fairchem model support for PBC, https://github.com/TorchSim/torch-sim/issues/111 (raised by @ryanliu30)

### Enhancements 🛠

* **breaking** Rename `HotSwappingAutobatcher` to `InFlightAutobatcher` and `ChunkingAutoBatcher` to `BinningAutoBatcher`, https://github.com/Radical-AI/torch-sim/pull/143 @orionarcher
* Support for Orbv3, https://github.com/Radical-AI/torch-sim/pull/140, @AdeeshKolluru
* Support metatensor models, https://github.com/Radical-AI/torch-sim/pull/141, @frostedoyter @Luthaf
* Support for graph-pes models, https://github.com/Radical-AI/torch-sim/pull/118 @jla-gardner
* Support MatterSim and fix ASE cell convention issues, https://github.com/Radical-AI/torch-sim/pull/112 @CompRhys
* Implement positions only FIRE optimization, https://github.com/Radical-AI/torch-sim/pull/139 @abhijeetgangan
* Allow different temperatures in batches, https://github.com/Radical-AI/torch-sim/pull/123 @orionarcher
* FairChem model updates: PBC handling, test on OMat24 e-trained model, https://github.com/Radical-AI/torch-sim/pull/126 @AdeeshKolluru
* FairChem model from_data_list support, https://github.com/Radical-AI/torch-sim/pull/138 @ryanliu30
* New correlation function module, https://github.com/Radical-AI/torch-sim/pull/115 @stefanbringuier
* **breaking** Rename `HotSwappingAutobatcher` to `InFlightAutobatcher` and `ChunkingAutoBatcher` to `BinningAutoBatcher`, https://github.com/TorchSim/torch-sim/pull/143 @orionarcher
* Support for Orbv3, https://github.com/TorchSim/torch-sim/pull/140, @AdeeshKolluru
* Support metatensor models, https://github.com/TorchSim/torch-sim/pull/141, @frostedoyter @Luthaf
* Support for graph-pes models, https://github.com/TorchSim/torch-sim/pull/118 @jla-gardner
* Support MatterSim and fix ASE cell convention issues, https://github.com/TorchSim/torch-sim/pull/112 @CompRhys
* Implement positions only FIRE optimization, https://github.com/TorchSim/torch-sim/pull/139 @abhijeetgangan
* Allow different temperatures in batches, https://github.com/TorchSim/torch-sim/pull/123 @orionarcher
* FairChem model updates: PBC handling, test on OMat24 e-trained model, https://github.com/TorchSim/torch-sim/pull/126 @AdeeshKolluru
* FairChem model from_data_list support, https://github.com/TorchSim/torch-sim/pull/138 @ryanliu30
* New correlation function module, https://github.com/TorchSim/torch-sim/pull/115 @stefanbringuier

### Documentation 📖

* Improved model documentation, https://github.com/Radical-AI/torch-sim/pull/121 @orionarcher
* Plot of TorchSim module graph in docs, https://github.com/Radical-AI/torch-sim/pull/132 @janosh
* Improved model documentation, https://github.com/TorchSim/torch-sim/pull/121 @orionarcher
* Plot of TorchSim module graph in docs, https://github.com/TorchSim/torch-sim/pull/132 @janosh

### House-Keeping 🧹

* Only install HF for fairchem tests, https://github.com/Radical-AI/torch-sim/pull/134 @CompRhys
* Don't download MBD in CI, https://github.com/Radical-AI/torch-sim/pull/135 @orionarcher
* Tighten graph-pes test bounds, https://github.com/Radical-AI/torch-sim/pull/143 @orionarcher
* Only install HF for fairchem tests, https://github.com/TorchSim/torch-sim/pull/134 @CompRhys
* Don't download MBD in CI, https://github.com/TorchSim/torch-sim/pull/135 @orionarcher
* Tighten graph-pes test bounds, https://github.com/TorchSim/torch-sim/pull/143 @orionarcher

## v0.1.0

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TorchSim

[![CI](https://github.com/radical-ai/torch-sim/actions/workflows/test.yml/badge.svg)](https://github.com/radical-ai/torch-sim/actions/workflows/test.yml)
[![CI](https://github.com/TorchSim/torch-sim/actions/workflows/test.yml/badge.svg)](https://github.com/TorchSim/torch-sim/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/radical-ai/torch-sim/branch/main/graph/badge.svg)](https://codecov.io/gh/radical-ai/torch-sim)
[![This project supports Python 3.11+](https://img.shields.io/badge/Python-3.11+-blue.svg?logo=python&logoColor=white)](https://python.org/downloads)
[![PyPI](https://img.shields.io/pypi/v/torch_sim_atomistic?logo=pypi&logoColor=white)](https://pypi.org/project/torch_sim_atomistic)
Expand Down Expand Up @@ -113,7 +113,7 @@ pip install torch-sim-atomistic
### Installing from source

```sh
git clone https://github.com/radical-ai/torch-sim
git clone https://github.com/TorchSim/torch-sim
cd torch-sim
pip install .
```
Expand Down
6 changes: 3 additions & 3 deletions citation.cff
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ authors:
- family-names: Falletta
given-names: Stefano
license: MIT
license-url: https://github.com/Radical-AI/torch-sim/blob/main/LICENSE
repository-code: https://github.com/Radical-AI/torch-sim
url: https://github.com/Radical-AI/torch-sim
license-url: https://github.com/TorchSim/torch-sim/blob/main/LICENSE
repository-code: https://github.com/TorchSim/torch-sim
url: https://github.com/TorchSim/torch-sim
type: software
date-released: 2025-04-02
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
"footer_icons": [
{
"name": "GitHub",
"url": "https://github.com/Radical-AI/torch-sim",
"url": "https://github.com/TorchSim/torch-sim",
"html": """
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
Expand All @@ -165,7 +165,7 @@
"class": "",
},
],
"source_repository": "https://github.com/Radical-AI/torch-sim/",
"source_repository": "https://github.com/TorchSim/torch-sim/",
"source_branch": "main",
"source_directory": "docs/",
}
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/add_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
We welcome the addition of new models to `torch_sim`. We want
easy batched simulations to be available to the whole community
of MLIP developers and users.
See https://github.com/Radical-AI/torch-sim/discussions/120 for
See https://github.com/TorchSim/torch-sim/discussions/120 for
our current posture on adding models to TorchSim.

1. Open a PR or an issue to get feedback. We are happy to take a look,
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/dev_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ pip install torch-sim-atomistic

## Install from source

To install torch-sim from source, clone the repository from [github](https://github.com/Radical-AI/torch-sim)
To install torch-sim from source, clone the repository from [github](https://github.com/TorchSim/torch-sim)

```bash
git clone https://github.com/Radical-AI/torch-sim
git clone https://github.com/TorchSim/torch-sim
cd torch-sim
pip install . -e
```
Expand Down
6 changes: 2 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
:hidden:
user/introduction
user/overview
user/models
tutorials/index
```

Expand All @@ -19,7 +18,6 @@ reference/index
:hidden:
dev/dev_install
dev/add_model
dev/batching
```

```{toctree}
Expand All @@ -35,8 +33,8 @@ about/license
**Date**: {sub-ref}`today`

**Useful links**:
[Source Repository](https://github.com/Radical-AI/torch-sim) |
[Issues & Ideas](https://github.com/Radical-AI/torch-sim/issues)
[Source Repository](https://github.com/TorchSim/torch-sim) |
[Issues & Ideas](https://github.com/TorchSim/torch-sim/issues)

TorchSim is a next-generation open-source atomistic simulation engine for the MLIP era.

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tutorials

For a high-level overview of the tutorials see :doc:`../user/overview`. Runnable
versions of the tutorials can also be found in the `torch-sim /examples/tutorials
<https://github.com/Radical-AI/torch-sim/tree/main/examples/tutorials>`_ directory.
<https://github.com/TorchSim/torch-sim/tree/main/examples/tutorials>`_ directory.

.. currentmodule:: torch_sim

Expand Down
2 changes: 1 addition & 1 deletion examples/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Examples are provided in two foms:

* Tutorials are intended to provide pedagogical walkthroughs of TorchSim's core functionality
* Scripts are a holdover from early torch-sim development, they are not currently recommended as a learning resource. See issue [issue 109](https://github.com/Radical-AI/torch-sim/issues/109).
* Scripts are a holdover from early torch-sim development, they are not currently recommended as a learning resource. See issue [issue 109](https://github.com/TorchSim/torch-sim/issues/109).

## Tutorial Formatting

Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ dependencies = [
"tables>=3.10.2",
"torch>=2",
"tqdm>=4.67",
"vesin-torch>=0.3.7",
"vesin>=0.3.7",
"vesin[torch]>=0.3.7",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -61,14 +60,14 @@ docs = [
"jupytext==1.16.7",
"myst_parser==4.0.0",
"nbsphinx>=0.9.7",
"numpydoc==1.8.0",
"numpydoc==1.6.0",
"sphinx-copybutton==0.5.2",
"sphinx==8.1.3",
"sphinx==7.2.6",
"sphinx_design==0.6.1",
]

[project.urls]
Repo = "https://github.com/radical-ai/torch-sim"
Repo = "https://github.com/TorchSim/torch-sim"

[build-system]
requires = ["uv_build>=0.7.12"]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_autobatching.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def test_in_flight_auto_batcher_restore_order(
[
5, # At 5 steps, not every state will converge before the next batch.
# This tests the merging of partially converged states with new states
# which has been a bug in the past. See https://github.com/Radical-AI/torch-sim/pull/219
# which has been a bug in the past. See https://github.com/TorchSim/torch-sim/pull/219
10, # At 10 steps, all states will converge before the next batch
],
)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_integrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def test_compare_single_vs_batched_integrators(
) -> None:
"""Test NVE single vs batched for a tilted cell to verify PBC wrapping.

NOTE: added triclinic cell after https://github.com/Radical-AI/torch-sim/issues/171.
NOTE: added triclinic cell after https://github.com/TorchSim/torch-sim/issues/171.
Although the addition doesn't fail if we do not add the changes suggested in issue.
"""
sim_state = request.getfixturevalue(sim_state_fixture_name)
Expand Down Expand Up @@ -383,7 +383,7 @@ def test_compare_single_vs_batched_integrators(
def test_compute_cell_force_atoms_per_system():
"""Test that compute_cell_force correctly scales by number of atoms per system.

Covers fix in https://github.com/Radical-AI/torch-sim/pull/153."""
Covers fix in https://github.com/TorchSim/torch-sim/pull/153."""
from torch_sim.integrators.npt import _compute_cell_force

# Setup minimal state with two systems having 8:1 atom ratio
Expand Down
41 changes: 23 additions & 18 deletions torch_sim/autobatching.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,18 +591,20 @@ def next_batch(
where indices are the original positions of the states, or None if no
more batches.

Example::
Examples:
Get batches one by one:

# Get batches one by one
all_converged_state, convergence = [], None
while (result := batcher.next_batch(state, convergence))[0] is not None:
state, converged_states = result
all_converged_states.extend(converged_states)
.. code-block:: python

evolve_batch(state)
convergence = convergence_criterion(state)
else:
all_converged_states.extend(result[1])
all_converged_state, convergence = [], None
while (result := batcher.next_batch(state, convergence))[0] is not None:
state, converged_states = result
all_converged_states.extend(converged_states)

evolve_batch(state)
convergence = convergence_criterion(state)
else:
all_converged_states.extend(result[1])

"""
# TODO: need to think about how this intersects with reporting too
Expand Down Expand Up @@ -989,17 +991,20 @@ def next_batch( # noqa: C901
AssertionError: If convergence_tensor doesn't match the expected shape or
if other validation checks fail.

Example::
Examples:
Process states with convergence checking:

# Initial call
batch, completed = batcher.next_batch(None, None)
.. code-block:: python

# Process batch and check for convergence
batch = process_batch(batch)
convergence = check_convergence(batch)
# Initial call
batch, completed = batcher.next_batch(None, None)

# Process batch and check for convergence
batch = process_batch(batch)
convergence = check_convergence(batch)

# Get next batch with converged states removed and new states added
batch, completed = batcher.next_batch(batch, convergence)
# Get next batch with converged states removed and new states added
batch, completed = batcher.next_batch(batch, convergence)

Notes:
When max_iterations is set, states that exceed this limit will be
Expand Down
Loading
Loading