Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
6fd7ccd
untested update of core logic and organization to match quacc
orionarcher Nov 21, 2025
ae5e289
ignore uv lock file
orionarcher Nov 23, 2025
3aca26e
write tests and get them passing
orionarcher Nov 23, 2025
a5d313c
lint
orionarcher Nov 23, 2025
1e266e6
TS -> TorchSim
orionarcher Dec 5, 2025
c2935b9
split out torchsim tests in pyproject
orionarcher Dec 5, 2025
703d8a8
refactor to single TorchSimCalculation schema to avoid union types
orionarcher Dec 5, 2025
188f070
remove arrays and arbitrary types
orionarcher Dec 5, 2025
589fc35
add torchsim dep to testing
orionarcher Dec 5, 2025
e3b2330
Merge branch 'main' into torchsim
orionarcher Dec 5, 2025
bfbd2a3
fix import in testing.yml and pyproject.toml
orionarcher Dec 5, 2025
b4171c5
skip torchsim tests if not on python 3.12
orionarcher Dec 5, 2025
ac7c932
Merge branch 'main' into torchsim
orionarcher Dec 8, 2025
daeb490
try locking py >= 3.12 in install
orionarcher Dec 8, 2025
340c532
Merge branch 'main' into torchsim
orionarcher Dec 8, 2025
83bc720
Merge branch 'main' into torchsim
orionarcher Dec 11, 2025
b0298f3
Merge branch 'main' into torchsim
orionarcher Jan 14, 2026
903cb2f
match output structure of FF taskdoc by adding automatic calculation …
orionarcher Jan 14, 2026
99207c2
write torch_sim tutorial jupyter notebook
orionarcher Jan 14, 2026
6e1545d
update testing to support torchsim notebook
orionarcher Jan 14, 2026
c2de281
add tests for energy, force, stress output
orionarcher Jan 14, 2026
8b2b63d
make torchsim makers also accept single structures in addition to bat…
orionarcher Jan 15, 2026
1706f89
run phonon workflow and test and change nomenclature for compatability
orionarcher Jan 15, 2026
b1c1f38
update tutorial
orionarcher Jan 15, 2026
e7e5193
try using cpu pytorch without cuda to fix OOM error?
orionarcher Jan 15, 2026
8896338
fix typo in testing.yml
orionarcher Jan 15, 2026
2465b1a
try running test in one liner
orionarcher Jan 15, 2026
2249169
try pinning torch to fix CHGNet tests
orionarcher Jan 15, 2026
f79e57a
try standalone torchsim tests
orionarcher Jan 15, 2026
84ba3dc
small
orionarcher Jan 15, 2026
34c8e0e
correct test path
orionarcher Jan 15, 2026
b996fe6
add ase
orionarcher Jan 15, 2026
bc3e36a
add mace
orionarcher Jan 15, 2026
ed267f4
add phonons
orionarcher Jan 15, 2026
8770c9e
add unit cell filter
orionarcher Jan 15, 2026
d1f2328
delete random depdency addition
orionarcher Jan 15, 2026
318bc3f
Merge branch 'main' into torchsim
orionarcher Jan 19, 2026
385cb96
add max_force property
orionarcher Jan 19, 2026
65ca05c
improve documentation
orionarcher Jan 20, 2026
2a36222
Merge branch 'main' into torchsim
orionarcher Jan 27, 2026
8dc27bb
Merge remote-tracking branch 'upstream/main' into torchsim
esoteric-ephemera Jan 28, 2026
d181321
if...else --> match...case
esoteric-ephemera Jan 28, 2026
47a530b
imports cleanup
esoteric-ephemera Jan 28, 2026
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
66 changes: 63 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,16 @@ jobs:

- name: Install pymatgen from master if triggered by pymatgen repo dispatch
if: github.event_name == 'repository_dispatch' && github.event.action == 'pymatgen-ci-trigger'
run: uv pip install --upgrade 'git+https://github.com/materialsproject/pymatgen@${{ github.event.client_payload.pymatgen_ref }}'
run: |
micromamba activate a2
uv pip install --upgrade 'git+https://github.com/materialsproject/pymatgen@${{ github.event.client_payload.pymatgen_ref }}'

- name: Test Notebooks
env:
MP_API_KEY: ${{ secrets.MP_API_KEY }}
run: |
micromamba activate a2
pytest -n auto --nbmake ./tutorials --ignore=./tutorials/openmm_tutorial.ipynb --ignore=./tutorials/force_fields
pytest -n auto --nbmake ./tutorials --ignore=./tutorials/openmm_tutorial.ipynb --ignore=./tutorials/force_fields --ignore=./tutorials/torchsim_tutorial.ipynb

- name: Test ASE
env:
Expand Down Expand Up @@ -304,6 +306,64 @@ jobs:



test-torchsim:
# prevent this action from running on forks
if: github.repository == 'materialsproject/atomate2'

services:
local_mongodb:
image: mongo:4.0
ports:
- 27017:27017

runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}

steps:
- name: Check out repo
uses: actions/checkout@v4

- name: Set up micromamba
uses: mamba-org/setup-micromamba@main
with:
environment-name: a2
cache-environment: false
create-args: >-
python=3.12

- name: Install uv
run: micromamba run -n a2 pip install uv

- name: Install dependencies
run: |
micromamba activate a2
python -m pip install --upgrade pip
uv pip install torch --index-url https://download.pytorch.org/whl/cpu
uv pip install .[torchsim,ase,phonons] --group tests
uv pip install mace-torch>=0.3.3

- name: Test TorchSim
env:
MP_API_KEY: ${{ secrets.MP_API_KEY }}
run: |
micromamba activate a2
pytest -n auto tests/torchsim --cov=atomate2 --cov-report=xml

- name: Test TorchSim notebook
env:
MP_API_KEY: ${{ secrets.MP_API_KEY }}
run: |
micromamba activate a2
pytest -n auto --nbmake ./tutorials/torchsim_tutorial.ipynb

- uses: codecov/codecov-action@v1
if: github.repository == 'materialsproject/atomate2'
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml

docs:
runs-on: ubuntu-latest

Expand All @@ -325,7 +385,7 @@ jobs:
run: sphinx-build docs docs_build

automerge:
needs: [docs, lint, test-force-field-notebook, test-non-ase, test-notebooks-and-ase, test-openff]
needs: [docs, lint, test-force-field-notebook, test-non-ase, test-notebooks-and-ase, test-openff, test-torchsim]
runs-on: ubuntu-latest

permissions:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ develop-eggs
.installed.cfg
lib
lib64
uv.lock

# Installer logs
pip-log.txt
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ forcefields = [
"sevenn>=0.9.3",
"deepmd-kit>=2.1.4",
]
torchsim = [
"torch-sim-atomistic==0.5.0; python_version >= '3.12'"
]
approxneb = ["pymatgen-analysis-diffusion>=2024.7.15"]
ase = ["ase>=3.26.0"]
ase-ext = ["tblite>=0.3.0; platform_system=='Linux'"]
Expand Down
2 changes: 1 addition & 1 deletion src/atomate2/common/flows/phonons.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from atomate2.forcefields.jobs import ForceFieldRelaxMaker, ForceFieldStaticMaker
from atomate2.vasp.jobs.base import BaseVaspMaker

SUPPORTED_CODES = frozenset(("vasp", "aims", "forcefields", "ase"))
SUPPORTED_CODES = frozenset(("vasp", "aims", "forcefields", "ase", "torchsim"))


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion src/atomate2/common/schemas/phonons.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def get_factor(code: str) -> float:
ValueError
If code is not defined
"""
if code in ["ase", "forcefields", "vasp"]:
if code in ["ase", "forcefields", "vasp", "torchsim"]:
return VaspToTHz
if code == "aims":
return omegaToTHz # Based on CODATA 2002
Expand Down
9 changes: 9 additions & 0 deletions src/atomate2/torchsim/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""TorchSim module for atomate2."""

from atomate2.torchsim.core import (
TorchSimIntegrateMaker,
TorchSimOptimizeMaker,
TorchSimStaticMaker,
)

__all__ = ["TorchSimIntegrateMaker", "TorchSimOptimizeMaker", "TorchSimStaticMaker"]
Loading
Loading