Skip to content

Commit 46d13b6

Browse files
JaGeojanosh
andauthored
Tutorials for QHA and Grüneisen workflows (#1122)
* add info on jobflow remote and lobster workflow * remove file and fix linting * add another phonon example * add tutorial for phonons including mock_vasp * add tutorial test * test tutorial test * test tutorial test * test tutorial test * test tutorial test * split up workflow again * split up workflow again * split up workflow again * split up workflow again * add automerge * add automerge * add mock lobster and a lobster tutorial * fix bug in tutorial and fix calc summary * add plot * fix linting * fix linting * more type hints * fix linting * fix linting * fix linting * fix linting * fix more linting * fix final linting * Update pyproject.toml * adapt tutorial * fix linting and add a tmp dir to tutorial execution * remove file * print ref and actual values in testing.lobster.verify_inputs ValueError * add a qha tutorial * add unit in document * add tutorials to doc * fix linting * fix syntax * add tutorials to doc attempt2 * fix line length * fix line length * final fix linting * test fixing the linter again * update tests * fix linting * fix linting * fix more linting * fix more linting * fix more linting * fix tutorial * update gruneisen workflow * update gruneisen workflow * update gruneisen workflow * update test * fix linting * fix linting * fix linting * fix linting * hopefully fix linting errors * exclude grunisen file from ruff * ADD COMMENTS --------- Co-authored-by: Janosh Riebesell <[email protected]>
1 parent eccfaf1 commit 46d13b6

File tree

414 files changed

+804
-47
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

414 files changed

+804
-47
lines changed

.github/workflows/docs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ jobs:
3535
python -m pip install --upgrade pip
3636
pip install .[strict,docs]
3737
38+
- name: Copy tutorials
39+
run: |
40+
cp -r tutorials docs/
41+
jupyter nbconvert --to markdown docs/tutorials/*.ipynb
42+
jupyter nbconvert --to markdown docs/tutorials/*/*.ipynb
43+
3844
- name: Build
3945
run: sphinx-build docs docs_build
4046

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ docs/_build/*
55
docs/_build/*/*
66
docs/_build/*/*/*
77
docs_build/*
8+
docs/tutorials/*
9+
docs/tutorials/*/*
810

911
# C extensions
1012
*.so

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ repos:
77
hooks:
88
- id: ruff
99
args: [--fix]
10+
exclude: tutorials/grueneisen_workflow.ipynb
1011
- id: ruff-format
1112
- repo: https://github.com/pre-commit/pre-commit-hooks
1213
rev: v5.0.0

docs/index.md

Lines changed: 1 addition & 0 deletions

src/atomate2/common/flows/eos.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ def make(self, structure: Structure, prev_dir: str | Path = None) -> Flow:
9595
)
9696
relax_flow.name = "EOS equilibrium relaxation"
9797

98+
try:
99+
if len(relax_flow.jobs) > 1:
100+
for job in relax_flow.jobs:
101+
job.append_name(" EOS equilibrium relaxation")
102+
except AttributeError:
103+
pass
98104
flow_output["initial_relax"] = {
99105
"E0": relax_flow.output.output.energy,
100106
"V0": relax_flow.output.structure.volume,
@@ -153,6 +159,12 @@ def make(self, structure: Structure, prev_dir: str | Path = None) -> Flow:
153159
prev_dir=prev_dir,
154160
)
155161
relax_job.name += f" deformation {frame_idx}"
162+
try:
163+
if len(relax_job.jobs) > 1:
164+
for job in relax_job.jobs:
165+
job.append_name(f" deformation {frame_idx}")
166+
except AttributeError:
167+
pass
156168
jobs["relax"].append(relax_job)
157169

158170
if self.static_maker:

src/atomate2/common/schemas/qha.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class PhononQHADoc(StructureMetadata, extra="allow"): # type: ignore[call-arg]
3737
)
3838
helmholtz_volume: Optional[list[list[float]]] = Field(
3939
None,
40-
description="Free energies at temperatures and volumes."
41-
"shape (temperatures, volumes)",
40+
description="Free energies (eV) at temperatures and volumes (Angstrom^3)."
41+
"shape (temperatures, volumes)", # TODO: add units here
4242
)
4343
volume_temperature: Optional[list[float]] = Field(
4444
None,

tests/aims/test_flows/test_eos.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
# mapping from job name to directory containing test files
1515
ref_paths = {
16-
"Relaxation calculation 1": "double-relax-si/relax-1",
17-
"Relaxation calculation 2": "double-relax-si/relax-2",
16+
"Relaxation calculation 1 EOS equilibrium relaxation": "double-relax-si/relax-1",
17+
"Relaxation calculation 2 EOS equilibrium relaxation": "double-relax-si/relax-2",
1818
"Relaxation calculation (fixed cell) deformation 0": "eos-si/0",
1919
"Relaxation calculation (fixed cell) deformation 1": "eos-si/1",
2020
"Relaxation calculation (fixed cell) deformation 2": "eos-si/2",
217 Bytes
Binary file not shown.
605 Bytes
Binary file not shown.
35 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)