From 4309561c91fa1322c775b2450c0532e003114099 Mon Sep 17 00:00:00 2001 From: Timo Reents Date: Wed, 16 Oct 2024 16:08:19 +0200 Subject: [PATCH 1/6] Move README from `.rst` to `.md` --- README.md | 46 ++++++++++++++++++++++++++++++ README.rst | 84 ------------------------------------------------------ 2 files changed, 46 insertions(+), 84 deletions(-) create mode 100644 README.md delete mode 100644 README.rst diff --git a/README.md b/README.md new file mode 100644 index 0000000..9dd415d --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# SeeK-path + +Test status for default branch: [![Test status](https://github.com/giovannipizzi/seekpath/actions/workflows/ci.yml/badge.svg)](https://github.com/giovannipizzi/seekpath/actions/workflows/ci.yml) + +`SeeK-path` is a python module to obtain band paths in the Brillouin zone of crystal structures. + +The definition of k-point labels follows crystallographic convention, as defined and discussed in the [HPKOT paper](http://dx.doi.org/10.1016/j.commatsci.2016.10.015). Moreover, the Bravais lattice is detected properly using the spacegroup symmetry. Also, the suggested band path provided in the [HPKOT paper](http://dx.doi.org/10.1016/j.commatsci.2016.10.015) is returned. Systems without time-reversal and inversion-symmetry are also properly taken into account. + +## Contents + +1. [How to cite](#how-to-cite) +2. [How to install and how to use](#how-to-install-and-how-to-use) +3. [Acknowledgements](#acknowledgements) +4. [License](#license) +5. [Online service/tool](#online-service-tool) + +## How to cite + +If you use this tool, please cite the following work: + +- Y. Hinuma, G. Pizzi, Y. Kumagai, F. Oba, I. Tanaka, *Band structure diagram paths based on crystallography*, Comp. Mat. Sci. 128, 140 (2017) ([JOURNAL LINK](http://dx.doi.org/10.1016/j.commatsci.2016.10.015), [arXiv link](https://arxiv.org/abs/1602.06402)). +- You should also cite [spglib](http://atztogo.github.io/spglib/) that is an essential library used in the implementation: A. Togo, I. Tanaka, "Spglib: a software library for crystal symmetry search", arXiv:1808.01590 (2018) ([spglib arXiv link](https://arxiv.org/abs/1808.01590)). + +## How to install and how to use + +Please check the SeeK-path [user guide on ReadTheDocs](http://seekpath.readthedocs.io). + +## Acknowledgements + +- Jae-Mo Lihm: k-point paths for the original unit cell (i.e., the one provided in input by the user) without standardization or symmetrization + +## License + +The code is open-source (licensed with a MIT license, see LICENSE.txt). + +## Online service/tool + +In the [tools-seekpath](http://www.github.com/materialscloud-org/tools-seekpath/) repository we also provide the code to deploy an online service for the visualization of the band paths and primitive cells of the crystal structures. A live version is hosted on the [Materials Cloud](http://www.materialscloud.org/tools/seekpath/) web portal. + +The following is a screenshot of the selection window: + +![SeeK-path web service selection window](https://raw.githubusercontent.com/materialscloud-org/tools-seekpath/master/misc/screenshots/selector.png) + +And the following is a screenshot of the main output window, showing the Brillouin zone, the primitive crystal structure, the coordinates of the k-points and the suggested band path. + +![SeeK-path web service main output](https://raw.githubusercontent.com/materialscloud-org/tools-seekpath/master/misc/screenshots/mainwindow.png) diff --git a/README.rst b/README.rst deleted file mode 100644 index e4be08a..0000000 --- a/README.rst +++ /dev/null @@ -1,84 +0,0 @@ -######### -SeeK-path -######### - -Test status for default branch: |continuousintegration| - -.. |continuousintegration| image:: https://github.com/giovannipizzi/seekpath/actions/workflows/ci.yml/badge.svg - :target: https://github.com/giovannipizzi/seekpath/actions/workflows/ci.yml - -``SeeK-path`` is a python module to obtain band paths in the -Brillouin zone of crystal structures. - -The definition of k-point labels follows crystallographic convention, as defined -and discussed in the `HPKOT paper`_. Moreover, the Bravais lattice is detected -properly using the spacegroup symmetry. Also the suggested band path provided -in the `HPKOT paper`_ is returned. -Systems without time-reversal and inversion-symmetry are also properly -taken into account. - -.. contents:: - -.. section-numbering:: - -=========== -How to cite -=========== -If you use this tool, please cite the following work: - -- Y. Hinuma, G. Pizzi, Y. Kumagai, F. Oba, I. Tanaka, *Band structure diagram - paths based on crystallography*, Comp. Mat. Sci. 128, 140 (2017) - (`JOURNAL LINK`_, `arXiv link`_). -- You should also cite `spglib`_ that is an essential library used in the - implementation: A. Togo, I. Tanaka, - "Spglib: a software library for crystal symmetry search", arXiv:1808.01590 (2018) (`spglib arXiv link`_). - -============================= -How to install and how to use -============================= - -Please check the SeeK-path `user guide on ReadTheDocs`_. - -================ -Acknowledgements -================ - -* Jae-Mo Lihm: k-point paths for the original unit cell (i.e., the one provided in input by the user) without standardization or symmetrization - -======= -License -======= - -The code is open-source (licensed with a MIT license, see LICENSE.txt). - -=================== -Online service/tool -=================== - -In the `tools-seekpath`_ repository we also provide the code to deploy a online service for -the visualization of the band paths and primitive cells of the crystal -structures. A live version is hosted on the `Materials Cloud`_ web portal. - -The following is a screenshot of the selection window: - -.. image:: https://raw.githubusercontent.com/materialscloud-org/tools-seekpath/master/misc/screenshots/selector.png - :alt: SeeK-path web service selection window - :width: 50% - :align: center - -And the following is a screenshot of the main output window, showing the Brillouin zone, the primitive crystal structure, the coordinates of the k-points and the suggested band path. - -.. image:: https://raw.githubusercontent.com/materialscloud-org/tools-seekpath/master/misc/screenshots/mainwindow.png - :alt: SeeK-path web service main output - :width: 50% - :align: center - -.. _HPKOT paper: http://dx.doi.org/10.1016/j.commatsci.2016.10.015 -.. _JOURNAL LINK: http://dx.doi.org/10.1016/j.commatsci.2016.10.015 -.. _arXiv link: https://arxiv.org/abs/1602.06402 -.. _spglib: http://atztogo.github.io/spglib/ -.. _Materials Cloud: http://www.materialscloud.org/tools/seekpath/ -.. _docker hub: https://hub.docker.com/r/giovannipizzi/seekpath/ -.. _user guide on ReadTheDocs: http://seekpath.readthedocs.io -.. _spglib arXiv link: https://arxiv.org/abs/1808.01590 -.. _tools-seekpath: http://www.github.com/materialscloud-org/tools-seekpath/ From b0d9dd3bd4b89e5432256c3948d7a366d255be4d Mon Sep 17 00:00:00 2001 From: Timo Reents Date: Mon, 9 Dec 2024 12:29:11 +0100 Subject: [PATCH 2/6] Replace ``setup.py`` by ``pyproject.toml`` --- pyproject.toml | 53 ++++++++++++++++++++++++++++++++ setup.py | 82 -------------------------------------------------- 2 files changed, 53 insertions(+), 82 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d0bf0e3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,53 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "seekpath" +dynamic = ["version"] +description = "A module to obtain and visualize k-vector coefficients and obtain band paths in the Brillouin zone of crystal structures" +readme = "README.rst" +requires-python = ">=3.5" +license = {text = "MIT License"} +authors = [ + { name = "Giovanni Pizzi" } +] +keywords = ["path", "band structure", "Brillouin", "crystallography", "physics", "primitive cell", "conventional cell"] +classifiers = [ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Topic :: Scientific/Engineering :: Physics", + "Topic :: Scientific/Engineering :: Chemistry", + "Topic :: Software Development :: Libraries :: Python Modules" +] + +dependencies = [ + "numpy>=1.0", + "spglib>=1.14.1" +] + +[project.optional-dependencies] +bz = ["scipy>=1"] +dev = [ + "pre-commit==3.3.2", + "black==23.3.0", + "prospector==1.2.0", + "pylint==2.4.4", + "pytest==7.3.1" +] + +[project.urls] +Repository = "http://github.com/giovannipizzi/seekpath" + +[tool.setuptools] +packages = ["seekpath"] +include-package-data = true + +[tool.setuptools.dynamic] +version = {attr = "seekpath.__version__"} + diff --git a/setup.py b/setup.py deleted file mode 100644 index 168ea63..0000000 --- a/setup.py +++ /dev/null @@ -1,82 +0,0 @@ -"""Install the seekpath package.""" -import os -import io - -try: - from setuptools import setup, find_packages -except ImportError: - from distutils.core import setup - -MODULENAME = "seekpath" - -# Get the version number in a dirty way -FOLDER = os.path.split(os.path.abspath(__file__))[0] -FNAME = os.path.join(FOLDER, MODULENAME, "__init__.py") -with open(FNAME) as init: - # Get lines that match, remove comment part - # (assuming it's not in the string...) - VERSIONLINES = [ - l.partition("#")[0] for l in init.readlines() if l.startswith("__version__") - ] -if len(VERSIONLINES) != 1: - raise ValueError("Unable to detect the version lines") -VERSIONLINE = VERSIONLINES[0] -VERSION = VERSIONLINE.partition("=")[2].replace('"', "").strip() - -setup( - name=MODULENAME, - description="A module to obtain and visualize k-vector coefficients and obtain band paths " - "in the Brillouin zone of crystal structures", - url="http://github.com/giovannipizzi/seekpath", - license="The MIT license", - author="Giovanni Pizzi", - version=VERSION, - # Abstract dependencies. Concrete versions are listed in - # requirements.txt - # See https://caremad.io/2013/07/setup-vs-requirement/ for an explanation - # of the difference and - # http://blog.miguelgrinberg.com/post/the-package-dependency-blues - # for a useful dicussion - install_requires=["numpy>=1.0", "spglib>=1.14.1"], - extras_require={ - "bz": ["scipy>=1"], - "dev": [ - "pre-commit==3.3.2", - "black==23.3.0", - "prospector==1.2.0", - "pylint==2.4.4", - "pytest==7.3.1", - ], - }, - python_requires=">=3.5", - packages=find_packages(), - # Needed to include some static files declared in MANIFEST.in - include_package_data=True, - download_url="https://github.com/giovannipizzi/seekpath/archive/v{}.tar.gz".format( - VERSION - ), - keywords=[ - "path", - "band structure", - "Brillouin", - "crystallography", - "physics", - "primitive cell", - "conventional cell", - ], - long_description=io.open( - os.path.join(FOLDER, "README.rst"), encoding="utf-8" - ).read(), - classifiers=[ - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Topic :: Scientific/Engineering :: Physics", - "Topic :: Scientific/Engineering :: Chemistry", - "Topic :: Software Development :: Libraries :: Python Modules", - ], -) From 9752344d32da8ed79d1cfeb0f30870c809f207c7 Mon Sep 17 00:00:00 2001 From: Timo Reents Date: Wed, 15 Jan 2025 12:01:37 +0100 Subject: [PATCH 3/6] Finalyze pyproject.toml --- pyproject.toml | 64 ++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d0bf0e3..5a8753b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,53 +1,51 @@ -[build-system] -requires = ["setuptools>=42", "wheel"] -build-backend = "setuptools.build_meta" [project] name = "seekpath" -dynamic = ["version"] +version = "2.1.0" description = "A module to obtain and visualize k-vector coefficients and obtain band paths in the Brillouin zone of crystal structures" -readme = "README.rst" -requires-python = ">=3.5" -license = {text = "MIT License"} +keywords = ["path", "band structure", "Brillouin", "crystallography", "physics", "primitive cell", "conventional cell"] +readme = "README.md" authors = [ - { name = "Giovanni Pizzi" } + {name = "Giovanni Pizzi"}, +] +maintainers = [ + {name = "Timo Reents"} ] -keywords = ["path", "band structure", "Brillouin", "crystallography", "physics", "primitive cell", "conventional cell"] classifiers = [ - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", - "Topic :: Scientific/Engineering :: Physics", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Chemistry", - "Topic :: Software Development :: Libraries :: Python Modules" + "Topic :: Scientific/Engineering :: Physics", + "Topic :: Software Development :: Libraries :: Python Modules", ] - +requires-python = ">=3.8" dependencies = [ "numpy>=1.0", - "spglib>=1.14.1" + "spglib>=1.14.1", ] +license = {text = "The MIT license"} + +[project.urls] +Homepage = "http://github.com/giovannipizzi/seekpath" +Downloads = "https://github.com/giovannipizzi/seekpath/archive/v2.1.0.tar.gz" [project.optional-dependencies] -bz = ["scipy>=1"] +bz = [ + "scipy>=1", +] dev = [ - "pre-commit==3.3.2", "black==23.3.0", - "prospector==1.2.0", - "pylint==2.4.4", - "pytest==7.3.1" + "pre-commit==4.6.0", + "prospector==1.11.0", + "pytest==7.3.1", ] -[project.urls] -Repository = "http://github.com/giovannipizzi/seekpath" - -[tool.setuptools] -packages = ["seekpath"] -include-package-data = true - -[tool.setuptools.dynamic] -version = {attr = "seekpath.__version__"} - +[build-system] +build-backend = 'flit_core.buildapi' +requires = ['flit_core >=3.4,<4'] From e1a32ea3d6ecaced0b004ba40da37667a2cd82b3 Mon Sep 17 00:00:00 2001 From: Timo Reents Date: Wed, 15 Jan 2025 12:10:45 +0100 Subject: [PATCH 4/6] Add Acknowledgements to README --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 9dd415d..ae2b2c1 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,9 @@ If you use this tool, please cite the following work: Please check the SeeK-path [user guide on ReadTheDocs](http://seekpath.readthedocs.io). ## Acknowledgements +The `SeeK-path` package was mainly developed by [Giovanni Pizzi](https://github.com/giovannipizzi) and is now maintained by [Timo Reents](https://github.com/t-reents). + +Further Acknowledgements: - Jae-Mo Lihm: k-point paths for the original unit cell (i.e., the one provided in input by the user) without standardization or symmetrization From 2ccad3a9159e38e7bfed5a62f4fbd66e442f0750 Mon Sep 17 00:00:00 2001 From: Timo Reents Date: Wed, 15 Jan 2025 12:14:50 +0100 Subject: [PATCH 5/6] Fix pre-commit --- .github/workflows/ci.yml | 8 ++++---- pyproject.toml | 8 +++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e80a911..97b98bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,10 +7,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Set up Python 3.8 - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: 3.8 @@ -28,10 +28,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Set up Python 3.8 - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: 3.8 diff --git a/pyproject.toml b/pyproject.toml index 5a8753b..39e5431 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,6 @@ +[build-system] +build-backend = 'flit_core.buildapi' +requires = ['flit_core >=3.4,<4'] [project] name = "seekpath" @@ -46,6 +49,5 @@ dev = [ "pytest==7.3.1", ] -[build-system] -build-backend = 'flit_core.buildapi' -requires = ['flit_core >=3.4,<4'] +[tool.ruff.format] +quote-style = 'single' From d2c22ffde8f004653efb4cde2cf9668b5b9cd85a Mon Sep 17 00:00:00 2001 From: Timo Reents Date: Wed, 15 Jan 2025 12:26:14 +0100 Subject: [PATCH 6/6] Fix pre-commit dependency --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 39e5431..6e2da0c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ bz = [ ] dev = [ "black==23.3.0", - "pre-commit==4.6.0", + "pre-commit~=3.5", "prospector==1.11.0", "pytest==7.3.1", ]