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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
if [[ "${{ matrix.example }}" == *"fairchem"* ]]; then
uv pip install huggingface_hub --system
fi
uv run --with . ${{ matrix.example }}
uv run --with-editable . ${{ matrix.example }}

all-required-pass:
if: always()
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ If you use TorchSim in your research, please cite our [publication](https://iops

## Due Credit

We aim to recognize all [duecredit](https://github.com/duecredit/duecredit) for the decades of work that TorchSim builds on top of, an automated list of references can be obtained for the package by running `DUECREDIT_ENABLE=yes uv run --with . --extra docs --extra test python -m duecredit <(printf 'import pytest\nraise SystemExit(pytest.main(["-q"]))\n')`. This list is incomplete and we welcome PRs to help improve our citation coverage.
We aim to recognize all [duecredit](https://github.com/duecredit/duecredit) for the decades of work that TorchSim builds on top of, an automated list of references can be obtained for the package by running `DUECREDIT_ENABLE=yes uv run --with-editable . --extra docs --extra test python -m duecredit <(printf 'import pytest\nraise SystemExit(pytest.main(["-q"]))\n')`. This list is incomplete and we welcome PRs to help improve our citation coverage.

To collect citations for a specific tutorial run, for example autobatching, use:

```sh
DUECREDIT_ENABLE=yes uv run --with . --extra docs --extra test python -m duecredit examples/tutorials/autobatching_tutorial.py
DUECREDIT_ENABLE=yes uv run --with-editable . --extra docs --extra test python -m duecredit examples/tutorials/autobatching_tutorial.py
```
2 changes: 1 addition & 1 deletion examples/benchmarking/neighborlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Directly times each torch-sim NL backend without any model evaluation.

Example:
uv run --with . examples/benchmarking/neighborlists.py \
uv run --with-editable . examples/benchmarking/neighborlists.py \
--source wbm --n-structures 100 --device cpu
"""

Expand Down
14 changes: 7 additions & 7 deletions examples/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@ If you'd like to execute the scripts or examples locally, you can run them with:
curl -LsSf https://astral.sh/uv/install.sh | sh

# pick any of the examples
uv run --with . examples/scripts/1_introduction.py
uv run --with . examples/scripts/2_structural_optimization.py
uv run --with . examples/scripts/3_dynamics.py
uv run --with . examples/scripts/4_high_level_api.py
uv run --with-editable . examples/scripts/1_introduction.py
uv run --with-editable . examples/scripts/2_structural_optimization.py
uv run --with-editable . examples/scripts/3_dynamics.py
uv run --with-editable . examples/scripts/4_high_level_api.py

# or any of the tutorials
uv run --with . examples/tutorials/diff_sim.py
uv run --with-editable . examples/tutorials/diff_sim.py
```

## Benchmarking Scripts

The `examples/benchmarking/` folder contains standalone benchmark scripts. They
declare their own dependencies via [PEP 723 inline script metadata](https://peps.python.org/pep-0723/)
and should be run with `uv run --with .` so that the local `torch-sim` package
and should be run with `uv run --with-editable .` so that the local `torch-sim` package
is available alongside the script's isolated dependency environment:

```sh
# Neighbor-list backend benchmark on WBM or MP structures
uv run --with . examples/benchmarking/neighborlists.py \
uv run --with-editable . examples/benchmarking/neighborlists.py \
--source wbm --n-structures 100 --device cpu

# Scaling benchmark: static, relax, NVE, NVT
Expand Down
Loading
Loading