irrep 2.6.0__tar.gz → 2.6.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {irrep-2.6.0/irrep.egg-info → irrep-2.6.2}/PKG-INFO +4 -12
- irrep-2.6.2/irrep/__init__.py +1 -0
- {irrep-2.6.0 → irrep-2.6.2}/irrep/bandstructure.py +2 -1
- {irrep-2.6.0 → irrep-2.6.2}/irrep/kpoint_gpaw.py +0 -3
- {irrep-2.6.0 → irrep-2.6.2}/irrep/spacegroup.py +47 -20
- {irrep-2.6.0 → irrep-2.6.2}/irrep/symmetry_operation.py +1 -1
- {irrep-2.6.0 → irrep-2.6.2/irrep.egg-info}/PKG-INFO +4 -12
- {irrep-2.6.0 → irrep-2.6.2}/irrep.egg-info/SOURCES.txt +1 -1
- irrep-2.6.2/pyproject.toml +43 -0
- {irrep-2.6.0 → irrep-2.6.2}/setup.cfg +0 -3
- irrep-2.6.0/irrep/__init__.py +0 -1
- irrep-2.6.0/setup.py +0 -37
- {irrep-2.6.0 → irrep-2.6.2}/LICENSE +0 -0
- {irrep-2.6.0 → irrep-2.6.2}/MANIFEST.in +0 -0
- {irrep-2.6.0 → irrep-2.6.2}/README.md +0 -0
- {irrep-2.6.0 → irrep-2.6.2}/irrep/cli.py +0 -0
- {irrep-2.6.0 → irrep-2.6.2}/irrep/data/msg_numbers.data +0 -0
- {irrep-2.6.0 → irrep-2.6.2}/irrep/ebrs.py +0 -0
- {irrep-2.6.0 → irrep-2.6.2}/irrep/gvectors.py +0 -0
- {irrep-2.6.0 → irrep-2.6.2}/irrep/kpoint.py +0 -0
- {irrep-2.6.0 → irrep-2.6.2}/irrep/or_solutions_obtainer.py +0 -0
- {irrep-2.6.0 → irrep-2.6.2}/irrep/readfiles.py +0 -0
- {irrep-2.6.0 → irrep-2.6.2}/irrep/spacegroup_irreps.py +0 -0
- {irrep-2.6.0 → irrep-2.6.2}/irrep/utility.py +0 -0
- {irrep-2.6.0 → irrep-2.6.2}/irrep.egg-info/dependency_links.txt +0 -0
- {irrep-2.6.0 → irrep-2.6.2}/irrep.egg-info/entry_points.txt +0 -0
- {irrep-2.6.0 → irrep-2.6.2}/irrep.egg-info/requires.txt +0 -0
- {irrep-2.6.0 → irrep-2.6.2}/irrep.egg-info/top_level.txt +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: irrep
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.2
|
|
4
4
|
Summary: A tool to get symmetry proberties of ab-initio wavefunctions, irreduible representations and more.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Author-email: "Stepan S. Tsirkin" <stepan.tsirkin@ehu.eus>
|
|
6
|
+
License: GNU General Public License v3 (GPLv3)
|
|
7
|
+
Project-URL: Homepage, https://github.com/irreducible-representations/irrep.git
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
@@ -19,15 +19,7 @@ Requires-Dist: fortio
|
|
|
19
19
|
Requires-Dist: packaging
|
|
20
20
|
Requires-Dist: h5py
|
|
21
21
|
Requires-Dist: pyxtal==1.1.1
|
|
22
|
-
Dynamic: author
|
|
23
|
-
Dynamic: author-email
|
|
24
|
-
Dynamic: classifier
|
|
25
|
-
Dynamic: description
|
|
26
|
-
Dynamic: description-content-type
|
|
27
|
-
Dynamic: home-page
|
|
28
22
|
Dynamic: license-file
|
|
29
|
-
Dynamic: requires-dist
|
|
30
|
-
Dynamic: summary
|
|
31
23
|
|
|
32
24
|
# IrRep
|
|
33
25
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.6.2"
|
|
@@ -22,7 +22,6 @@ import functools
|
|
|
22
22
|
import numpy as np
|
|
23
23
|
from functools import cached_property
|
|
24
24
|
|
|
25
|
-
from irrep.kpoint_gpaw import KpointGPAW, OverlapPAW
|
|
26
25
|
|
|
27
26
|
from .readfiles import ParserAbinit, ParserVasp, ParserEspresso, ParserW90, ParserGPAW
|
|
28
27
|
from .kpoint import Kpoint
|
|
@@ -347,6 +346,7 @@ class BandStructure:
|
|
|
347
346
|
if read_paw:
|
|
348
347
|
self.kpoints_paw = []
|
|
349
348
|
self.spacegroup.set_gpaw(calculator=parser.calculator)
|
|
349
|
+
from irrep.kpoint_gpaw import OverlapPAW
|
|
350
350
|
self.overlap_paw = OverlapPAW(wfs=parser.calculator.wfs)
|
|
351
351
|
|
|
352
352
|
NBin, kpred, Lattice, _spinor, typat, positions, EF_in = parser.parse_header()
|
|
@@ -466,6 +466,7 @@ class BandStructure:
|
|
|
466
466
|
Ecut=self.Ecut)
|
|
467
467
|
if read_paw:
|
|
468
468
|
# read projections and reconstruct pseudo wavefunctions on a grid
|
|
469
|
+
from irrep.kpoint_gpaw import KpointGPAW
|
|
469
470
|
kp_gpaw = KpointGPAW.from_gpaw(calc=calculator_gpaw, ibz_index=ik, ispin=spin_channel,
|
|
470
471
|
RecLattice=self.RecLattice,
|
|
471
472
|
IBstart=IBstart, IBend=IBend)
|
|
@@ -133,6 +133,7 @@ class SpaceGroup:
|
|
|
133
133
|
copy_symops=False,
|
|
134
134
|
typat=None,
|
|
135
135
|
positions=None,
|
|
136
|
+
magmom=None,
|
|
136
137
|
magnetic=None,
|
|
137
138
|
refUC=None,
|
|
138
139
|
shiftUC=None,
|
|
@@ -153,6 +154,7 @@ class SpaceGroup:
|
|
|
153
154
|
self.typat = typat
|
|
154
155
|
self.positions = positions
|
|
155
156
|
self.magnetic = magnetic
|
|
157
|
+
self.magmom = magmom
|
|
156
158
|
self.refUC = refUC
|
|
157
159
|
self.shiftUC = shiftUC
|
|
158
160
|
self.alat = alat
|
|
@@ -198,11 +200,14 @@ class SpaceGroup:
|
|
|
198
200
|
self.symmetries = symmetry_operations
|
|
199
201
|
|
|
200
202
|
|
|
203
|
+
|
|
201
204
|
def as_dict(self):
|
|
202
205
|
"""
|
|
203
206
|
return dictionary with info essential about the spacegroup
|
|
204
207
|
"""
|
|
205
|
-
|
|
208
|
+
keys_dict_optional = ['refUC', 'shiftUC', 'positions', 'typat', 'alat',
|
|
209
|
+
'magnetic', 'magmom', 'number_str']
|
|
210
|
+
dic = dict(
|
|
206
211
|
Lattice=self.real_lattice,
|
|
207
212
|
spinor=self.spinor,
|
|
208
213
|
rotations=[s.rotation for s in self.symmetries],
|
|
@@ -212,6 +217,12 @@ class SpaceGroup:
|
|
|
212
217
|
number=self.number if self.number is not None else -1,
|
|
213
218
|
name=self.name if self.name is not None else "unknown"
|
|
214
219
|
)
|
|
220
|
+
for key in keys_dict_optional:
|
|
221
|
+
if hasattr(self, key):
|
|
222
|
+
val = getattr(self, key)
|
|
223
|
+
if val is not None:
|
|
224
|
+
dic[key] = val
|
|
225
|
+
return dic
|
|
215
226
|
|
|
216
227
|
@property
|
|
217
228
|
def size(self):
|
|
@@ -468,6 +479,7 @@ class SpaceGroup:
|
|
|
468
479
|
positions=positions,
|
|
469
480
|
typat=typat,
|
|
470
481
|
alat=alat,
|
|
482
|
+
magmom=magmom,
|
|
471
483
|
verbosity=verbosity,
|
|
472
484
|
)
|
|
473
485
|
if CLS.__name__ == "SpaceGroupIrreps":
|
|
@@ -817,6 +829,7 @@ class SpaceGroup:
|
|
|
817
829
|
symprec=1e-5,
|
|
818
830
|
mag_symprec=0.05,
|
|
819
831
|
typat=None,
|
|
832
|
+
magmom=None,
|
|
820
833
|
magmoms=None):
|
|
821
834
|
"""Get the spacegroup of a GPAW calculator (non-spinor only).
|
|
822
835
|
Parameters
|
|
@@ -831,32 +844,36 @@ class SpaceGroup:
|
|
|
831
844
|
Whether to include time-reversal symmetry.
|
|
832
845
|
typat : list of int, optional
|
|
833
846
|
The typat to use for spacegroup detection. If None, the atomic numbers are used,
|
|
834
|
-
and if
|
|
847
|
+
and if magmom is also None, the magnetic moments are used to distinguish different types of atoms.
|
|
835
848
|
The magnetic moments are rounded to the nearest integer and mapped to consecutive integers starting from 1.
|
|
836
849
|
For example, if the magnetic moments are [2.1, -2.1, 0.0, 2.9], they are rounded to [2, -2, 0, 3],
|
|
837
850
|
and then mapped to [2, 1, 0, 3] (since -2 is the smallest unique value, it is mapped to 1).
|
|
838
851
|
The final typat will be atomic_number*1000 + mapped_magnetic_moment.
|
|
839
|
-
|
|
852
|
+
magmom : list of float, optional
|
|
840
853
|
The magnetic moments to use for spacegroup detection. If None, the magnetic moments from the calculator are used.
|
|
854
|
+
magmoms : list of float, optional
|
|
855
|
+
The older argument for magmom, kept for backward compatibility. Used only if magmom is None.
|
|
841
856
|
Returns
|
|
842
857
|
-------
|
|
843
858
|
spacegroup : irrep.spacegroup.SpaceGroup
|
|
844
859
|
The detected spacegroup.
|
|
845
860
|
"""
|
|
861
|
+
if magmom is None:
|
|
862
|
+
magmom = magmoms
|
|
846
863
|
lattice = calculator.atoms.cell
|
|
847
864
|
if typat is None:
|
|
848
865
|
typat = calculator.atoms.get_atomic_numbers()
|
|
849
|
-
if
|
|
850
|
-
|
|
851
|
-
assert
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
if len(
|
|
855
|
-
magmom_map = {m: i + 1 for i, m in enumerate(sorted(
|
|
856
|
-
typat = [int(typat[i] * 1000 + magmom_map[mag]) for i, mag in enumerate(
|
|
866
|
+
if magmom is None:
|
|
867
|
+
magmom = calculator.get_magnetic_moments()
|
|
868
|
+
assert magmom.shape == (len(calculator.atoms),)
|
|
869
|
+
magmom = group_numbers(magmom, precision=mag_symprec)
|
|
870
|
+
magmom_set = set(magmom)
|
|
871
|
+
if len(magmom_set) > 1:
|
|
872
|
+
magmom_map = {m: i + 1 for i, m in enumerate(sorted(magmom_set))}
|
|
873
|
+
typat = [int(typat[i] * 1000 + magmom_map[mag]) for i, mag in enumerate(magmom)]
|
|
857
874
|
else:
|
|
858
875
|
assert len(typat) == len(calculator.atoms), "typat should have the same length as the number of atoms"
|
|
859
|
-
print("typat used for spacegroup detection (accounting
|
|
876
|
+
print("typat used for spacegroup detection (accounting magmom):", typat)
|
|
860
877
|
positions = calculator.atoms.get_scaled_positions()
|
|
861
878
|
return SpaceGroup.from_cell(real_lattice=lattice,
|
|
862
879
|
positions=positions,
|
|
@@ -867,7 +884,9 @@ class SpaceGroup:
|
|
|
867
884
|
)
|
|
868
885
|
|
|
869
886
|
@classmethod
|
|
870
|
-
def from_gpaw_magnetic(cls, calculator, theta=0, phi=0, include_TR=True,
|
|
887
|
+
def from_gpaw_magnetic(cls, calculator, theta=0, phi=0, include_TR=True,
|
|
888
|
+
magmom=None, magmoms=None,
|
|
889
|
+
mag_symprec=0.05, symprec=1e-5,
|
|
871
890
|
):
|
|
872
891
|
"""
|
|
873
892
|
Get the spacegroup of a GPAW calculator (spinor magnetic version).
|
|
@@ -880,18 +899,26 @@ class SpaceGroup:
|
|
|
880
899
|
magnetic moments will be aligned along that direction (in positive or negative direction, as defined from dft calculation)
|
|
881
900
|
include_TR : bool
|
|
882
901
|
Whether to include time-reversal symmetry.
|
|
883
|
-
|
|
902
|
+
magmom : array( Nat, 3), optional
|
|
884
903
|
if provided, overrides the magnetic moments of the calculator
|
|
904
|
+
magmoms : array(Nat,), optional
|
|
905
|
+
The older argument for magmom, kept for backward compatibility. Used only if magmom is None.
|
|
906
|
+
mag_symprec : float
|
|
907
|
+
The precision for distinguishing different magnetic moments. Only used if magmom is None.
|
|
908
|
+
symprec : float
|
|
909
|
+
The symmetry precision for spacegroup detection.
|
|
885
910
|
"""
|
|
886
911
|
lattice = calculator.atoms.cell
|
|
887
912
|
typat = calculator.atoms.get_atomic_numbers()
|
|
888
913
|
positions = calculator.atoms.get_scaled_positions()
|
|
889
|
-
if
|
|
890
|
-
|
|
891
|
-
|
|
914
|
+
if magmom is None:
|
|
915
|
+
magmom = magmoms
|
|
916
|
+
if magmom is None:
|
|
917
|
+
magmom_axis = calculator.get_magnetic_moments()
|
|
918
|
+
magmom_axis = group_numbers(magmom_axis, precision=mag_symprec)
|
|
892
919
|
axis = np.array([np.sin(theta) * np.cos(phi), np.sin(theta) * np.sin(phi), np.cos(theta)])
|
|
893
|
-
|
|
894
|
-
print(f"using
|
|
920
|
+
magmom = magmom_axis[:, None] * axis[None, :]
|
|
921
|
+
print(f"using magmom \n {magmom}")
|
|
895
922
|
return SpaceGroup.from_cell(real_lattice=lattice,
|
|
896
923
|
positions=positions,
|
|
897
924
|
typat=typat,
|
|
@@ -899,7 +926,7 @@ class SpaceGroup:
|
|
|
899
926
|
include_TR=include_TR,
|
|
900
927
|
symprec=symprec,
|
|
901
928
|
mag_symprec=mag_symprec,
|
|
902
|
-
magmom=
|
|
929
|
+
magmom=magmom)
|
|
903
930
|
|
|
904
931
|
@classmethod
|
|
905
932
|
def get_trivial(cls, lattice, spinor=False, time_reversal=False):
|
|
@@ -21,7 +21,6 @@ import numpy as np
|
|
|
21
21
|
from scipy.linalg import expm
|
|
22
22
|
from .utility import UniqueListMod1, str_, BOHR, cached_einsum
|
|
23
23
|
from .gvectors import transform_gk
|
|
24
|
-
from .kpoint_gpaw import new_paw_projection
|
|
25
24
|
|
|
26
25
|
pauli_sigma = np.array(
|
|
27
26
|
[[[0, 1], [1, 0]], [[0, -1j], [1j, 0]], [[1, 0], [0, -1]]])
|
|
@@ -897,6 +896,7 @@ class SymmetryOperation():
|
|
|
897
896
|
proj_rot : Projections
|
|
898
897
|
the rotated projection coefficients
|
|
899
898
|
"""
|
|
899
|
+
from .kpoint_gpaw import new_paw_projection
|
|
900
900
|
mapped_projections = new_paw_projection(projections)
|
|
901
901
|
|
|
902
902
|
for a, R_ii in enumerate(self.R_aii):
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: irrep
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.2
|
|
4
4
|
Summary: A tool to get symmetry proberties of ab-initio wavefunctions, irreduible representations and more.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Author-email: "Stepan S. Tsirkin" <stepan.tsirkin@ehu.eus>
|
|
6
|
+
License: GNU General Public License v3 (GPLv3)
|
|
7
|
+
Project-URL: Homepage, https://github.com/irreducible-representations/irrep.git
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
@@ -19,15 +19,7 @@ Requires-Dist: fortio
|
|
|
19
19
|
Requires-Dist: packaging
|
|
20
20
|
Requires-Dist: h5py
|
|
21
21
|
Requires-Dist: pyxtal==1.1.1
|
|
22
|
-
Dynamic: author
|
|
23
|
-
Dynamic: author-email
|
|
24
|
-
Dynamic: classifier
|
|
25
|
-
Dynamic: description
|
|
26
|
-
Dynamic: description-content-type
|
|
27
|
-
Dynamic: home-page
|
|
28
22
|
Dynamic: license-file
|
|
29
|
-
Dynamic: requires-dist
|
|
30
|
-
Dynamic: summary
|
|
31
23
|
|
|
32
24
|
# IrRep
|
|
33
25
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=67", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "irrep"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
authors = [{ name = "Stepan S. Tsirkin", email = "stepan.tsirkin@ehu.eus" }]
|
|
9
|
+
description = "A tool to get symmetry proberties of ab-initio wavefunctions, irreduible representations and more."
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = { text = "GNU General Public License v3 (GPLv3)" }
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
|
15
|
+
"Operating System :: OS Independent",
|
|
16
|
+
]
|
|
17
|
+
dependencies = [
|
|
18
|
+
"numpy",
|
|
19
|
+
"scipy>=1.0",
|
|
20
|
+
"spglib>=2.5.0",
|
|
21
|
+
"Click",
|
|
22
|
+
"monty",
|
|
23
|
+
"fortio",
|
|
24
|
+
"packaging",
|
|
25
|
+
"h5py",
|
|
26
|
+
"pyxtal==1.1.1",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[project.scripts]
|
|
30
|
+
irrep = "irrep.cli:cli"
|
|
31
|
+
|
|
32
|
+
[project.urls]
|
|
33
|
+
Homepage = "https://github.com/irreducible-representations/irrep.git"
|
|
34
|
+
|
|
35
|
+
[tool.setuptools]
|
|
36
|
+
packages = ["irrep"]
|
|
37
|
+
include-package-data = true
|
|
38
|
+
|
|
39
|
+
[tool.setuptools.dynamic]
|
|
40
|
+
version = { attr = "irrep.__version__" }
|
|
41
|
+
|
|
42
|
+
[tool.setuptools.package-data]
|
|
43
|
+
irrep = ["data/msg_numbers.data"]
|
irrep-2.6.0/irrep/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.6.0"
|
irrep-2.6.0/setup.py
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import setuptools
|
|
2
|
-
|
|
3
|
-
with open("README.md", "r") as fh:
|
|
4
|
-
long_description = fh.read()
|
|
5
|
-
|
|
6
|
-
setuptools.setup(
|
|
7
|
-
name="irrep",
|
|
8
|
-
author="Stepan S. Tsirkin",
|
|
9
|
-
author_email="stepan.tsirkin@ehu.eus",
|
|
10
|
-
description="A tool to get symmetry proberties of ab-initio wavefunctions, irreduible representations and more.",
|
|
11
|
-
long_description=long_description,
|
|
12
|
-
long_description_content_type="text/markdown",
|
|
13
|
-
install_requires=[
|
|
14
|
-
"numpy",
|
|
15
|
-
"scipy>=1.0",
|
|
16
|
-
"spglib>=2.5.0",
|
|
17
|
-
"Click",
|
|
18
|
-
"monty",
|
|
19
|
-
# "ruamel.yaml", # Probably not needed anymore
|
|
20
|
-
"fortio",
|
|
21
|
-
"packaging",
|
|
22
|
-
"h5py",
|
|
23
|
-
"pyxtal==1.1.1"
|
|
24
|
-
],
|
|
25
|
-
include_package_data=True,
|
|
26
|
-
url="https://github.com/irreducible-representations/irrep.git",
|
|
27
|
-
packages=["irrep"],
|
|
28
|
-
classifiers=[
|
|
29
|
-
"Programming Language :: Python :: 3",
|
|
30
|
-
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
|
31
|
-
"Operating System :: OS Independent",
|
|
32
|
-
],
|
|
33
|
-
entry_points="""
|
|
34
|
-
[console_scripts]
|
|
35
|
-
irrep=irrep.cli:cli
|
|
36
|
-
""",
|
|
37
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|