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
anddict
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
, andSpglibMagneticDataset
Added function:
get_magnetic_spacegroup_type_from_symmetry
Changed functions:
get_spacegroup_type
,get_spacegroup_type_from_symmetry
,get_magnetic_spacegroup_type
, andget_magnetic_spacegroup_type_from_symmetry
now return the equivalentSpaceGroupType
orMagneticSpaceGroupType
objectChanged functions:
get_symmetry_dataset
now returns the equivalentSpglibDataset
objectChanged functions:
get_magnetic_symmetry_dataset
now returns the equivalentSpglibMagneticDataset
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 messagesEnvironment variable
SPGLIB_WARNING
: Set toOFF
to disable warning printingCMake 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 equivalentsExplicitly mark public API for export
Python API#
CI#
v2.3.1 (10 Feb. 2024)#
Fortran API#
Fixes#
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 theX.Y.Z
version format of Spglibversion_full
is the full version formatted likeguess-next-dev
from [setuptools-scm]commit
is the commit used when building the Spglib library
Fixes (layer group)#
Fixes (magnetic space group)#
[#382] - Fix comparison of translation parts in MSG type identification
CMake interface#
Exporting
Spglib_VERSION_FULL
andSpglib_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__
andget_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 bindingAdded
version
,version_full
,commit
variables containing the version/commit of the Fortran bindings
Documentation#
Refactoring#
CI#
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#
Fixes (crystallographic database)#
Fixes (magnetic space group)#
C codebase Refactoring#
Fortran interface#
Julia interface#
CI and releasing#
[#358] - fix: windows-ci
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)#
Fixes (magnetic space group)#
[#267] - Validate type of MSG
C codebase Refactoring#
Fortran interface#
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#
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)#
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.0Used as return value of
spg_get_spacegroup_type
andspg_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. Useget_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 newerget_symmetry
returns the same spatial symmetry withtime_reversal=True
andtime-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