Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
be14d74
chore: update repository configurations, licenses, and README metadata
ymzhang0 May 26, 2026
364cbd2
chore: port package dependency definitions and AiiDA entry points in …
ymzhang0 May 26, 2026
d5a90d9
feat: port utility scripts and example structure files
ymzhang0 May 26, 2026
5efc2db
doc: sync docstring in calculations/thermo_pw.py
ymzhang0 May 26, 2026
3b5f120
feat: port updates to structural tools
ymzhang0 May 26, 2026
39e3158
style: consolidate analyser imports in tools/__init__.py
ymzhang0 May 26, 2026
6852fae
feat: port updates to process analyzer
ymzhang0 May 26, 2026
2edea56
feat: port updates to base workchain
ymzhang0 May 26, 2026
0543632
refactor: rename package and imports to aiida-mechanical
ymzhang0 May 26, 2026
631ffd5
ci: configure automated pre-commit & tests and format code with Ruff
ymzhang0 May 26, 2026
4a296cf
ci: fix double matrix error by targeting specific Python version in h…
ymzhang0 May 26, 2026
406093e
chore: add SFE dependencies and register dislocation entry points
ymzhang0 May 26, 2026
7ea6a6a
feat: port custom Cleavaged & Faulted data models, gliding systems, a…
ymzhang0 May 26, 2026
e2d0c85
feat: port structural utility tools for gliding systems, builders, an…
ymzhang0 May 26, 2026
8d71205
feat: port SFE calculations / structure-generating calcfunctions
ymzhang0 May 26, 2026
d7aff54
feat: port ESFE, GSFE, ISFE, USFE, twinning, and relaxation workflows…
ymzhang0 May 26, 2026
93eaf58
ci: format and verify integrated dislocation codebase
ymzhang0 May 26, 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
4 changes: 2 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v0.11.1
_src_path: https://github.com/mbercx/python-copier
description: AiiDA plugin for thermo_pw software
description: AiiDA plugin for mechanical properties
doc_deploy: github
docs: myst
package_name: aiida-thermo_pw
package_name: aiida-mechanical
2 changes: 1 addition & 1 deletion .github/workflows/.ci.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- run: pip install click==8.1.8 hatch
- run: hatch test
- run: hatch test --py ${{ matrix.python-version }}
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

# Abstra
# Abstra is an AI-powered process automation framework.
Expand All @@ -186,7 +186,7 @@ cython_debug/
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
# .vscode/
.vscode/

# Ruff stuff:
.ruff_cache/
Expand All @@ -209,6 +209,4 @@ __marimo__/
# MyST documentation build
docs/_build

# Jupytext sync is a tool for writing notebooks in `.ipynb` format, and syncing them to a `.md` file
# https://marketplace.visualstudio.com/items?itemName=caenrigen.jupytext-sync
.jupytext-sync-ipynb
dev/
112 changes: 91 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,91 @@
MIT License

Copyright (c) 2025 Marnik Bercx

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Non-Commercial, End-User Software License Agreement for AiiDA-Supercon

Copyright (c), 2021-2025, University of Bremen, Germany (U Bremen Excellence Chair),
École Polytechnique Fédérale de Lausanne (Theory and Simulation of Materials (THEOS)
and National Centre for Computational Design and Discovery of Novel Materials
(NCCR MARVEL)), Switzerland and Paul Scherrer Institut (Laboratory for Materials
Simulations (LMS)), Switzerland. All rights reserved.

INTRODUCTION

- This license agreement sets forth the terms and conditions under which the
Authors and their Institutions (hereafter "LICENSORS") of the program
"AiiDA-Supercon" (hereafter "PROGRAM"), will grant you (hereafter
"LICENSEE") a fully-paid, non-exclusive, and non-transferable license for
academic, non-commercial purposes only (hereafter "LICENSE") to use the PROGRAM
computer software and associated documentation furnished hereunder.

- LICENSEE acknowledges that the PROGRAM is a research tool still in the
development stage, that is being supplied "as is", without any related
services, improvements or warranties from LICENSORS and that this license is
entered into in order to enable others to utilize the PROGRAM in their academic
activities.

TERMS AND CONDITIONS OF THE LICENSE

1. LICENSORS grant to LICENSEE a fully-paid up, non-exclusive, and
non-transferable license to use the PROGRAM for academic, non-commercial
purposes, upon the terms and conditions hereinafter set out and until
termination of this license as set forth below.

2. LICENSEE acknowledges that the PROGRAM is a research tool still in the
development stage. The PROGRAM is provided "as is", without any related
services or improvements from LICENSORS and that the LICENSE is entered into in
order to enable others to utilize the PROGRAM in their academic activities.

3. LICENSORS MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING WITHOUT LIMITATION ANY REPRESENTATIONS OR WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR PARTICULAR PURPOSE OR THAT THE USE OF THE
PROGRAM WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
LICENSORS shall not be liable for any direct, indirect or consequential damages
with respect to any claim by LICENSEE or any third party arising from this
Agreement or use of the PROGRAM.

4. LICENSEE agrees that it will use the PROGRAM, and any modifications,
improvements, or derivatives to PROGRAM that LICENSEE may create (collectively,
"IMPROVEMENTS") solely for academic, non-commercial purposes and shall not
distribute or transfer the PROGRAM or any IMPROVEMENTS to any person without
prior written permission from LICENSORS. The terms "academic, non-commercial",
as used in this Agreement, mean academic or other scholarly research which (a)
is not undertaken for profit, or (b) is not intended to produce works,
services, or data for commercial use, or (c) is neither conducted, nor funded,
by a person or an entity engaged in the commercial use, application or
exploitation of works similar to the PROGRAM.

5. LICENSEE agrees that he/she shall make the following acknowledgement in
publications resulting from the use of the PROGRAM: "Sebastiaan. P. Huber, Spyros Zoupanos,
Martin Uhrin, Leopold Talirz, Leonid Kahle, Rico Häuselmann, Dominik Gresch,
Tiziano Müller, Aliaksandr V. Yakutovich, Casper W. Andersen, Francisco F.
Ramirez, Carl S. Adorf, Fernando Gargiulo, Snehal Kumbhar, Elsa Passaro,
Conrad Johnston, Andrius Merkys, Andrea Cepellotti, Nicolas Mounet, Nicola
Marzari, Boris Kozinsky, and Giovanni Pizzi, AiiDA 1.0, a scalable computational
infrastructure for automated reproducible workflows and data provenance,
Scientific Data 7, 300 (2020), DOI: 10.1038/s41597-020-00638-4"
(http://www.aiida.net), plus any additional reference explicitly mentioned in
the custom workflow used. Except for the above-mentioned acknowledgment,
LICENSEE shall not use the PROGRAM title or the names or logos of LICENSORS,
nor any adaptation thereof, nor the names of any of its employees or
laboratories, in any advertising, promotional or sales material without prior
written consent obtained from LICENSORS in each case.

6. Ownership of all rights, including copyright in the PROGRAM and in any
material associated therewith, shall at all times remain with LICENSORS, and
LICENSEE agrees to preserve the same. LICENSEE agrees not to use any portion of
the PROGRAM or of any IMPROVEMENTS in any machine-readable form outside the
PROGRAM, nor to make any copies except for its internal use, without prior
written consent of LICENSORS. LICENSEE agrees to place the following copyright
notice on any such copies: © All rights reserved. Paul Scherrer Institut, Switzerland,
Laboratory for Materials Simulations (LMS), 2025; Authors: Marnik Bercx and Nicola
Marzari.

7. The LICENSE shall not be construed to confer any rights upon LICENSEE by
implication or otherwise except as specifically set forth herein.

8. This Agreement shall be governed by the material laws of Switzerland and any
dispute arising out of this Agreement or use of the PROGRAM shall be brought
before the courts of Lausanne, Switzerland.

9. This Agreement and the LICENSE shall remain effective until expiration of
the copyrights of the PROGRAM except that upon any breach of this Agreement by
LICENSEE, LICENSORS shall have the right to terminate the LICENSE immediately
upon notice to LICENSEE.
24 changes: 24 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
The MIT License (MIT)

Copyright (c), 2015-2020, ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE
(Theory and Simulation of Materials (THEOS) and National Centre for
Computational Design and Discovery of Novel Materials (NCCR MARVEL)).
All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[![Templated from python-copier](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/mbercx/python-copier/refs/heads/main/docs/img/badge.json)](https://github.com/mbercx/python-copier)
# `aiida-mechanical`

# `aiida-thermo_pw`

AiiDA plugin for thermo_pw software
AiiDA plugin package with workflows for mechanical properties
2 changes: 1 addition & 1 deletion docs/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ First clone the repository from GitHub

and install the package locally in **editable** mode (`-e`):

cd aiida-thermo_pw
cd aiida-mechanical
pip install -e .

:::{note}
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Introduction

This is the documentation of the `aiida-thermo_pw` Python package.
This is the documentation of the `aiida-mechanical` Python package.

AiiDA plugin for thermo_pw software
AiiDA plugin for mechanical properties
4 changes: 2 additions & 2 deletions docs/myst.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# See docs at: https://mystmd.org/guide/frontmatter
version: 1
project:
title: aiida-thermo_pw
description: AiiDA plugin for thermo_pw software
title: aiida-mechanical
description: AiiDA plugin for mechanical properties
# keywords: []
# authors: []
# github: https://github.com/
Expand Down
58 changes: 58 additions & 0 deletions examples/example_01.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env python
"""Run a ``Thermo_pwBaseWorkChain`` for a scf calculation.

Usage: ./example_01.py
"""

import click

from aiida import cmdline, orm

from aiida_mechanical.workflows.base import Thermo_pwBaseWorkChain

from aiida_mechanical.cli.params import RUN
from aiida_mechanical.utils.structure import read_structure
from aiida_mechanical.utils.workflows.builder.serializer import print_builder
from aiida_mechanical.utils.workflows.builder.setter import set_parallelization
from aiida_mechanical.utils.workflows.builder.submit import (
submit_and_add_group,
)


def submit(
code: orm.Code,
structure: orm.StructureData,
group: orm.Group = None,
run: bool = False,
):
"""Submit a ``Thermo_pwBaseWorkChain`` to calculate the thermodynamic properties."""
builder = Thermo_pwBaseWorkChain.get_builder_from_protocol(
code, structure=structure
)

# You can change parallelization here
parallelization = {
"num_mpiprocs_per_machine": 8,
"npool": 4,
}
set_parallelization(builder, parallelization, process_class=Thermo_pwBaseWorkChain)

print_builder(builder)

if run:
submit_and_add_group(builder, group)


@click.command()
@cmdline.utils.decorators.with_dbenv()
@cmdline.params.options.CODE(help="The pw.x code identified by its ID, UUID or label.")
@cmdline.params.options.GROUP(help="The group to add the submitted workchain.")
@click.argument("filename", type=click.Path(exists=True))
@RUN()
def cli(filename, code, group, run):
"""Run a ``Thermo_pwBaseWorkChain`` to calculate the scf.

FILENAME: a crystal structure file, e.g., ``structures/Si.xsf``.
"""
struct = read_structure(filename, store=True)
submit(code, struct, group, run)
8 changes: 8 additions & 0 deletions examples/structures/Pb.xsf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CRYSTAL
PRIMVEC 1
0.0000000000 2.4595782679 2.4595782679
2.4595782679 0.0000000000 2.4595782679
2.4595782679 2.4595782679 0.0000000000
PRIMCOORD 1
1 1
82 0.0000000000 0.0000000000 0.0000000000
9 changes: 9 additions & 0 deletions examples/structures/Si.xsf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CRYSTAL
PRIMVEC 1
0.0000000000 2.7164586260 2.7164586260
2.7164586260 0.0000000000 2.7164586260
2.7164586260 2.7164586260 0.0000000000
PRIMCOORD 1
2 1
14 1.3582293131 4.0746879391 1.3582293131
14 -0.0000000000 -0.0000000000 2.7164586260
Loading
Loading