Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
science/{,py-}spglib: update 2.3.0 → 2.3.1
Reported by: portscout
- Loading branch information
Showing
8 changed files
with
118 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
TIMESTAMP = 1706473147 | ||
SHA256 (spglib-spglib-v2.3.0_GH0.tar.gz) = 2fc3b42867d12a41b952ffd5896426797a39564e129c04c9c626d880371614ad | ||
SIZE (spglib-spglib-v2.3.0_GH0.tar.gz) = 2910603 | ||
TIMESTAMP = 1707671341 | ||
SHA256 (spglib-spglib-v2.3.1_GH0.tar.gz) = 6eb977053b35cd80eb2b5c3fa506a538ff2dad7092a43a612f4f0d4dc2069253 | ||
SIZE (spglib-spglib-v2.3.1_GH0.tar.gz) = 2910916 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- spglib/spglib.py.orig 2024-02-11 17:45:53 UTC | ||
+++ spglib/spglib.py | ||
@@ -46,17 +46,17 @@ except ImportError: | ||
import re | ||
from ctypes import cdll | ||
|
||
- bundled_lib = next( | ||
- filter( | ||
- lambda fl: re.match(".*symspg\\..*", fl), | ||
- sorted(os.listdir(os.path.dirname(__file__))), | ||
- ), | ||
- None, | ||
- ) | ||
- if not bundled_lib: | ||
- raise FileNotFoundError( | ||
- "Spglib C library is not installed and no bundled version was detected" | ||
- ) | ||
+ #bundled_lib = next( | ||
+ # filter( | ||
+ # lambda fl: re.match(".*symspg\\..*", fl), | ||
+ # sorted(os.listdir(os.path.dirname(__file__))), | ||
+ # ), | ||
+ # None, | ||
+ #) | ||
+ #if not bundled_lib: | ||
+ # raise FileNotFoundError( | ||
+ # "Spglib C library is not installed and no bundled version was detected" | ||
+ # ) | ||
cdll.LoadLibrary(os.path.join(os.path.dirname(__file__), bundled_lib)) | ||
from spglib import _spglib as spg # type: ignore[attr-defined] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import numpy as np | ||
import spglib | ||
|
||
lattice = np.array([[0.0, 0.5, 0.5], | ||
[0.5, 0.0, 0.5], | ||
[0.5, 0.5, 0.0]]) * 5.4 | ||
positions = [[0.875, 0.875, 0.875], | ||
[0.125, 0.125, 0.125]] | ||
numbers= [1,] * 2 | ||
cell = (lattice, positions, numbers) | ||
print(spglib.get_spacegroup(cell, symprec=1e-5)) | ||
mesh = [8, 8, 8] | ||
|
||
# | ||
# Gamma centre mesh | ||
# | ||
mapping, grid = spglib.get_ir_reciprocal_mesh(mesh, cell, is_shift=[0, 0, 0]) | ||
|
||
# All k-points and mapping to ir-grid points | ||
for i, (ir_gp_id, gp) in enumerate(zip(mapping, grid)): | ||
print("%3d ->%3d %s" % (i, ir_gp_id, gp.astype(float) / mesh)) | ||
|
||
# Irreducible k-points | ||
print("Number of ir-kpoints: %d" % len(np.unique(mapping))) | ||
print(grid[np.unique(mapping)] / np.array(mesh, dtype=float)) | ||
|
||
# | ||
# With shift | ||
# | ||
mapping, grid = spglib.get_ir_reciprocal_mesh(mesh, cell, is_shift=[1, 1, 1]) | ||
|
||
# All k-points and mapping to ir-grid points | ||
for i, (ir_gp_id, gp) in enumerate(zip(mapping, grid)): | ||
print("%3d ->%3d %s" % (i, ir_gp_id, (gp + [0.5, 0.5, 0.5]) / mesh)) | ||
|
||
# Irreducible k-points | ||
print("Number of ir-kpoints: %d" % len(np.unique(mapping))) | ||
print((grid[np.unique(mapping)] + [0.5, 0.5, 0.5]) / mesh) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
TIMESTAMP = 1706472993 | ||
SHA256 (spglib-spglib-v2.3.0_GH0.tar.gz) = 2fc3b42867d12a41b952ffd5896426797a39564e129c04c9c626d880371614ad | ||
SIZE (spglib-spglib-v2.3.0_GH0.tar.gz) = 2910603 | ||
TIMESTAMP = 1707671227 | ||
SHA256 (spglib-spglib-v2.3.1_GH0.tar.gz) = 6eb977053b35cd80eb2b5c3fa506a538ff2dad7092a43a612f4f0d4dc2069253 | ||
SIZE (spglib-spglib-v2.3.1_GH0.tar.gz) = 2910916 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters