Summary of releases

Contents

Summary of releases#

[Unreleased]#

Fortran API#

  • Expose spg_get_symmetry_from_database.

Users can now access the rotation and translation operations from the database, provided the Hall number.

Python API#

  • Python package is now properly type annotated. Note that legacy tuple and dict interface still do not have reliable type annotation. This will be revisited when refactoring the interface to datastructures.

  • Added runtime and annotation deprecations using warnings.deprecated

Main changes#

The python bindings are now linked to the C library at build time, see the Python changes for more details.

Python API#

  • The PyPI wheel contains a bundled libsymspg library, and it always has priority through RPATH priority.

  • When building from source (repository or sdist) it will try to link to a system installed spglib and fallback to the bundled version if it failed.

v2.5.0 (9 Jul. 2024)#

Main changes#

Minimum supported python distribution is now 3.9. Numpy dependency now reflect the ABI compatibility of the wheels.

We now provide proper class types with type-hints (using dataclasses.dataclass) for the output data structure. See the Python API section for details for the list of new classes and affected functions.

For backward compatibility, the dict-like interface is still available, but it is planned to be removed:

spgtype: SpaceGroupType | None = get_spacegroup_type(cell)
assert spgtype is not None
print(spgtype['number'])
print(list(spgtype.items()))

However, we recommend using the dataclass interface:

spgtype: SpaceGroupType | None = get_spacegroup_type(cell)
assert spgtype is not None
print(spgtype.number)

# If you really need dictionary, ...
from dataclasses import asdict
print(asdict(spgtype))

Fixes (magnetic space group)#

  • [#479] Fix to check internal primitive symmetry search to avoid SEGV

Python API#

  • Raised minimum python requirements to 3.9

  • Added classes: SpaceGroupType, MagneticSpaceGroupType, SpglibDataset, and SpglibMagneticDataset

  • Added function: get_magnetic_spacegroup_type_from_symmetry

  • Changed functions: get_spacegroup_type, get_spacegroup_type_from_symmetry, get_magnetic_spacegroup_type, and get_magnetic_spacegroup_type_from_symmetry now return the equivalent SpaceGroupType or MagneticSpaceGroupType object

  • Changed functions: get_symmetry_dataset now returns the equivalent SpglibDataset object

  • Changed functions: get_magnetic_symmetry_dataset now returns the equivalent SpglibMagneticDataset object

C Interface#

  • Fix a potential segmentation fault in spacegroup.c:iterative_search_hall_number

v2.4.0 (11 Apr. 2024)#

Main Changes#

  • Separated the CMake sub-projects to be buildable as standalone projects with pre-installed Spglib C library: test, python, fortran

  • Bumped minimum CMake version to 3.20 (Note: previously the project was not tested for the minimum CMake version)

  • Migrated the example and package test to the ctest test-suite

  • Properly mark all deprecated functions where possible

  • Fix excessive debug/warning message prints

  • Debug and warning messages are controlled by:

    • Environment variable SPGLIB_DEBUG: Define any value to enable printing of debug messages

    • Environment variable SPGLIB_WARNING: Set to OFF to disable warning printing

    • CMake option SPGLIB_DEBUG, SPGLIB_WARNINGS: Disable the compilation of these messages all-together

  • Expanded Python distribution to more MacOS variants, including MacOS-14 (M1)

C Interface#

  • Mark deprecated api with [[deprecated]] and pre-C23 equivalents

  • Explicitly mark public API for export

Python API#

  • Fixed the Python module build and installation in the pure CMake environment (without scikit-build-core)

  • Use importlib to search and load the bundled spglib C library

  • Support editable installs

  • [#420] Raise TypeError when a given cell is invalid

  • [#420] Add type annotation for cell

CI#

  • [#425] - Update to codecov v4

  • [#402] - Bump artifact actions to v4

  • [#402] - Build and inspect python sdist

  • [#431] - Test CMake versions

  • [#459] - Fix various CI issues

  • [#459] - Building for MacOS 14 (M1)

v2.3.1 (10 Feb. 2024)#

Fortran API#

  • [#421] - Allow importing Fortran API when library/consumer compilers differ

  • [#421] - Fix building Fortran API from exported spglib_f08.F90

Fixes#

  • [#423] - Update DynamicVersion to v0.4.1. Fixes CMake build when git repository does not have a tag

  • [#426] - Fix Windows installation path

CI#

  • [#422] - Update to ci-build-wheel v2.16

Documentation#

  • [#408] doc: Add homebrew and spack badges

v2.3.0 (27 Jan. 2024)#

Features#

  • Version is now calculated dynamically from commit information

    • version is the X.Y.Z version format of Spglib

    • version_full is the full version formatted like guess-next-dev from [setuptools-scm]

    • commit is the commit used when building the Spglib library

Fixes (layer group)#

  • [#378] - fix(database): add missing unique axis choices

  • [#379] - fix #377 (symmetry): fix matrix pattern for layer groups

Fixes (magnetic space group)#

  • [#382] - Fix comparison of translation parts in MSG type identification

CMake interface#

  • Exporting Spglib_VERSION_FULL and Spglib_COMMIT CMake variables

C interface#

  • Added spg_get_verison, spg_get_verison_full, spg_get_commit

Python interface#

  • [#376] Dropped Python 3.7 support

  • [#386] - Drop ASE Atoms-style input

  • Deprecating get_version in favor of __version__ and get_spg_version

  • Added spg_get_version, spg_get_version_full, spg_get_commit to get the version/commit of the spglib C library that is being used by the binding

  • __version__ now reports the version of the python interface

Fortran interface#

  • [#396] - feat: Reorganize Fortran interface

    • Added spg_get_version, spg_get_version_full, spg_get_commit to get the version/commit of the spglib C library that is being used by the binding

    • Added version, version_full, commit variables containing the version/commit of the Fortran bindings

Documentation#

  • [#361] - ci: Add doc-test

  • [#387] - Merge and migrate Python API documents into docstring

  • [#391] - Fix quick for autodoc2 render plugin

  • [#401] - fix: RTD build

Refactoring#

  • [#271] - Fully dynamic version from git-tag

  • [#392] - Replace linter and formatter with ruff and mypy

CI#

  • [#356] - Use downstream tmt tests

  • [#362] - ci: Reorganize CI

  • [#393] - ci: Enable testing for Fedora 38

v2.2.0 (6 Dec. 2023)#

This minor release includes update of crystallographic databases to adopt the latest editions of International Tables for Crystallography:

Table of the new Hall symbols for space groups in spglib

hall_number

spg_database (previous)

spg_database (new)

40

A -2yac

A -2yab

43

C -2ybc

C -2yac

46

B -2bc

B -2ab

49

A -2ac

A -2ab

52

C -2xbc

C -2xac

55

B -2xbc

B -2xab

91

-A 2yac

-A 2yab

94

-C 2ybc

-C 2yac

97

-B 2bc

-B 2ab

100

-A 2ac

-A 2ab

103

-C 2xbc

-C 2xac

106

-B 2xbc

-B 2xab

191

A 2 -2c

A 2 -2b

192

B 2 -2c

B 2 -2a

193

B -2c 2

B -2a 2

194

C -2b 2

C -2a 2

195

C -2b -2b

C -2a -2a

196

A -2c -2c

A -2b -2b

203

A 2 -2ac

A 2 -2ab

204

B 2 -2bc

B 2 -2ab

205

B -2bc 2

B -2ab 2

206

C -2bc 2

C -2ac 2

207

C -2bc -2bc

C -2ac -2ac

208

A -2ac -2ac

A -2ab -2ab

304

-C 2bc 2

-C 2ac 2

305

-C 2bc 2bc

-C 2ac 2ac

306

-A 2ac 2ac

-A 2ab 2ab

307

-A 2 2ac

-A 2 2ab

308

-B 2 2bc

-B 2 2ab

309

-B 2bc 2

-B 2ab 2

316

-C 2b 2

-C 2a 2

317

-C 2b 2b

-C 2a 2a

318

-A 2c 2c

-A 2b 2b

319

-A 2 2c

-A 2 2b

320

-B 2 2c

-B 2 2a

321

-B 2c 2

-B 2a 2

322

C 2 2 -1bc

C 2 2 -1ac

323

-C 2b 2bc

-C 2a 2ac

324

C 2 2 -1bc

C 2 2 -1ac

325

-C 2b 2c

-C 2a 2c

326

A 2 2 -1ac

A 2 2 -1ab

327

-A 2a 2c

-A 2a 2b

328

A 2 2 -1ac

A 2 2 -1ab

329

-A 2ac 2c

-A 2ab 2b

330

B 2 2 -1bc

B 2 2 -1ab

331

-B 2bc 2b

-B 2ab 2b

332

B 2 2 -1bc

B 2 2 -1ab

333

-B 2b 2bc

-B 2b 2ab

440

P 31 2c (0 0 1)

P 31 2 (0 0 4)

442

P 32 2c (0 0 -1)

P 32 2 (0 0 2)

472

P 61 2 (0 0 -1)

P 61 2 (0 0 5)

474

P 62 2c (0 0 1)

P 62 2 (0 0 4)

475

P 64 2c (0 0 -1)

P 64 2 (0 0 2)

515

F -4c 2 3

F -4a 2 3

524

-F 4c 2 3

-F 4a 2 3

527

F 4d 2 3 -1cd

F 4d 2 3 -1ad

528

-F 4cvw 2vw 3

-F 4ud 2vw 3

Table of the new H-M symbols for space groups in spglib

hall_number

spg_database (previous)

spg_database (new)

494

P m 3

P m -3

495

P n 3

P n -3

496

P n 3

P n -3

497

F m 3

F m -3

498

F d 3

F d -3

499

F d 3

F d -3

500

I m 3

I m -3

501

P a 3

P a -3

502

I a 3

I a -3

Table of the new Hall symbols for layer groups in spglib

layer group hall number

spg_database (previous)

spg_database (new)

62

c -2b -2b

c -2a -2a

63

c -2b 2

c -2a 2

81

-c 2b 2

-c 2a 2

In addition, this minor release includes a range of improvements across documentation, crystallographic database fixes, magnetic space group fixes, refactoring of the C codebase, enhancements to the Fortran and Julia interfaces, and continuous integration (CI) improvements.

Documentation#

  • [#369] - Minor update of variable.md

  • [#355] - Fix example wrong results in definition.md

  • [#343] - Fix BNS number in API example

  • [#257] - Improve release documentation

  • [#332] - Clarify definition of primitive_lattice for MSG

Fixes (crystallographic database)#

  • [#367] - Fix arithmetic crystal class for -6m2P and -62mP

  • [#360] - Fix typo for arithmetic crystal class 6/mmmP

  • [#317] - fix #155 refactor(database): standardize Hall symbols

Fixes (magnetic space group)#

  • [#371] - Fix order of primitive basis for get_magnetic_symmetry

  • [#349] - Check pointer to magnetic dataset before free

C codebase Refactoring#

  • [#347] - Minor simplification of trim_cell

  • [#339] - Increase max attempts for reduced cells

Fortran interface#

  • [#357] - fix: Fortran pkg-config file

  • [#342] - Tests for noncollinear case and spg_get_symmetry_with_site_tensors of fortran interface

  • [#337] - Add Fortran interface and Fortran interface tests

  • [#333] - Add magnetic dataset support in Fortran

Julia interface#

  • [#341] - fix: Julia packaging issues

  • [#340] - Add “Julia interface” to interface.md

CI and releasing#

v2.1.0 (10 Sep. 2023)#

This minor release includes a lot of improvements in build system and CI.

Documentation and examples#

  • [#242] - Update examples in C and Fortran

  • [#245] - Readthedocs

  • [#246] - Clean up and documentation fix

  • [#253] - Update documentation link

  • [#263] - Redirect GitHub pages to Read the Docs

  • [#265] - Clarify non-collinear magmoms in Python interface

  • [#283] - Document behavior for type-II magnetic crystal structure

  • [#322] - Add citation info

Fixes (layer group)#

  • [#199] - Fix a bug in layer groups.

  • [#201] - Add layer group python interface

  • [#209] - fix(layergroup): fix unique axis of monocli system

  • [#288] - Initial refactor for layer group implementation

Fixes (magnetic space group)#

  • [#267] - Validate type of MSG

C codebase Refactoring#

  • [#223] - Rename periodic_niggli_reduce to niggli_reduce_periodic

  • [#258] - Change SPGCONST to const

  • [#278] - Revive compiler warnings

  • [#281] - Fix message and remove redundant lines

  • [#284] - Ensure thread-safety

  • [#293] - Refactor debug-warning rules

Fortran interface#

  • [#216] - Fortran spg get symmetry with site tensors

  • [#224] - Change installation location of spglib_f08.mod

  • [#226] - Add fortran tests and clean cmake

  • [#227] - Quick fix: Fix fortran cmake target

  • [#230] - Add fortran interface test

  • [#232] - Add more fortran wrapper tests

Build system improvement#

  • [#210] - Improve cmake build

  • [#215] - Fix pre-commit

  • [#233] - Cmake refactoring

  • [#260] - Fix #191 again

  • [#266] - Add rpm spec file

  • [#270] - Fix codecov package dependency

  • [#272] - Fedora packaging maintenance

  • [#274] - [Temp] Disable intel toolchain

  • [#279] - Various cmake cleanups

  • [#300] - tests: Refactor testing framework

  • [#302] - Silence C warning “arrays with different qualifiers”

  • [#304] - Set C standard to C11

  • [#309] - Add pytests to ctest

Python packaging improvement#

  • [#203] - Add setup.cfg for python interface

  • [#214] - Temporary fix for scikit-build on macs

  • [#218] - Move to pyproject.toml build

  • [#229] - Minor fix of pyproject.toml

  • [#268] - Refactor python optional dependencies

  • [#269] - Python: fix packaging

CI and releasing#

  • [#241] - Improvre pre-commit and github action

  • [#250] - Use tag format for PyPi action

  • [#254] - Include an autoreleaser

  • [#275] - Change PyPI publishing to Trusted publishing

  • [#280] - fix: Hotfix Fedora CI

  • [#285] - ci: Use container with pre-installed toolchains

  • [#286] - Add windows and macos CI

  • [#287] - Refactor Github CI

  • [#294] - ci: Silence codecov until all coverage tests are uploaded

  • [#306] - ci: Add concurrency to GH actions

  • [#307] - ci: Switch to native pip instead of conda

  • [#315] - Various fixes

  • [#319] - Fix python 3.12 CI

  • [#320] - Fix target branch for packit

  • [#321] - Fix: build wheel workflow

Misc#

  • [#207] - Add benchmark for get_symmetry_dataset

V2.0.2 (6 Nov. 2022)#

  • Fix segmentation fault in spgms_get_symmetry_with_site_tensors with high symprec [#195]

  • Fix possible segmentation fault in get_magnetic_dataset with high symprec [#196]

V2.0.1 (31 Aug. 2022)#

  • Fix magnetic tolerance for judging type-II MSG (#187)

Release v2.0 and future plan#

This release contains functions to search magnetic space group types which are provided as experimental features. The behaviours of these magnetic related functions (*_magnetic_*) with respect to the tolerance parameter (symprec or mag_symprec) may be changed in the future.

We are planning to separate irreducible k-points search from spglib. At spglib version 4.0, those functions will be removed if we succeed to provide an alternative package (hopefully with better functionalities) until then.

C functions and structures#

SpglibSpacegroupType structure#

  • Add hall_number member at version 2.0

  • Used as return value of spg_get_spacegroup_type and spg_get_spacegroup_type_from_symmetry

spg_get_spacegroup_type_from_symmetry#

  • New at version 2.0

  • Replacement of spg_get_hall_number_from_symmetry

spg_get_symmetry_with_site_tensors#

  • Experimental: new at version 2.0

spg_get_magnetic_dataset#

  • Experimental: new at version 2.0

spg_get_magnetic_symmetry_from_database#

  • Experimental: new at version 2.0

spg_free_magnetic_dataset#

  • Experimental: new at version 2.0

spg_get_magnetic_spacegroup_type_from_symmetry#

  • Experimental: new at version 2.0

spg_get_hall_number_from_symmetry#

  • Deprecated at version 2.0

  • Will be removed at version 3.0

spgat_get_symmetry_with_collinear_spin#

  • Deprecated at version 2.0

  • Will be removed at version 3.0

  • Will be replaced by spgms_get_symmetry_with_collinear_spin

spg_get_ir_reciprocal_mesh#

  • Plan to make it deprecated at version 3.0

spg_get_stabilized_reciprocal_mesh#

  • Plan to make it deprecated at version 3.0

Python interface#

get_symmetry#

  • get_symmetry with is_magnetic=True is deprecated at version 2.0. Use get_magnetic_symmetry for magnetic symmetry search.

  • As of version 2.0, the behavior of get_symmetry with zero magmoms (corresponding to type-II MSG) is changed. When all magmoms are zero, the newer get_symmetry returns the same spatial symmetry with time_reversal=True and time-reversal=False. This doubles the size of symmetry operations compared to the previous version.

get_spacegroup_type#

  • hall_number member is added at version 2.0.

get_spacegroup_type_from_symmetry#

  • New at version 2.0

  • Replacement of get_hall_number_from_symmetry

get_magnetic_symmetry#

  • Experimental: new at version 2.0

get_magnetic_symmetry_dataset#

  • Experimental: new at version 2.0

get_magnetic_spacegroup_type#

  • Experimental: new at version 2.0

get_magnetic_symmetry_from_database#

  • Experimental: new at version 2.0

get_hall_number_from_symmetry#

  • Deprecated at version 2.0

  • Will be removed at version 3.0

  • Will be replaced by get_spacegroup_type_from_symmetry

get_ir_reciprocal_mesh#

  • Plan to make it deprecated at version 3.0