yu-mcal 0.1.4__py3-none-any.whl → 0.1.5__py3-none-any.whl
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.
- mcal/mcal.py +3 -3
- mcal/utils/cif_reader.py +12 -9
- {yu_mcal-0.1.4.dist-info → yu_mcal-0.1.5.dist-info}/METADATA +1 -1
- {yu_mcal-0.1.4.dist-info → yu_mcal-0.1.5.dist-info}/RECORD +7 -7
- {yu_mcal-0.1.4.dist-info → yu_mcal-0.1.5.dist-info}/WHEEL +0 -0
- {yu_mcal-0.1.4.dist-info → yu_mcal-0.1.5.dist-info}/entry_points.txt +0 -0
- {yu_mcal-0.1.4.dist-info → yu_mcal-0.1.5.dist-info}/licenses/LICENSE +0 -0
mcal/mcal.py
CHANGED
|
@@ -140,7 +140,7 @@ def main():
|
|
|
140
140
|
cif_path_without_ext = f'{directory}/{filename}'
|
|
141
141
|
|
|
142
142
|
print('----------------------------------------')
|
|
143
|
-
print(' mcal 0.1.
|
|
143
|
+
print(' mcal 0.1.5 (2026/01/28) by Matsui Lab. ')
|
|
144
144
|
print('----------------------------------------')
|
|
145
145
|
|
|
146
146
|
if args.read_pickle:
|
|
@@ -471,8 +471,8 @@ def cal_eigenvalue_decomposition(mobility_tensor: NDArray[np.float64]) -> Tuple[
|
|
|
471
471
|
Tuple[NDArray[np.float64], NDArray[np.float64]]
|
|
472
472
|
Eigenvalue(mobility value) and eigenvector(mobility vector)
|
|
473
473
|
"""
|
|
474
|
-
value, vector = np.linalg.
|
|
475
|
-
return value, vector
|
|
474
|
+
value, vector = np.linalg.eigh(mobility_tensor)
|
|
475
|
+
return value[::-1], vector[:, ::-1]
|
|
476
476
|
|
|
477
477
|
|
|
478
478
|
def cal_min_distance(
|
mcal/utils/cif_reader.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""CifReader beta (
|
|
1
|
+
"""CifReader beta (2026/01/28)"""
|
|
2
2
|
import os
|
|
3
3
|
import re
|
|
4
4
|
from itertools import product
|
|
@@ -67,13 +67,16 @@ class CifReader:
|
|
|
67
67
|
self._make_adjacency_mat()
|
|
68
68
|
self._split_mols()
|
|
69
69
|
self._put_unit_cell()
|
|
70
|
+
# Remove duplicates again as they may occur when moving atoms into the unit cell
|
|
70
71
|
self.sym_symbols, self.sym_coords = self.remove_duplicates(self.sym_symbols, self.sym_coords)
|
|
71
72
|
self._make_adjacency_mat()
|
|
72
73
|
self._split_mols()
|
|
73
74
|
self._calc_z_value()
|
|
74
75
|
|
|
75
76
|
if self._ref_z_value != 0 and self.z_value != self._ref_z_value:
|
|
76
|
-
raise ZValueIsNotMatchError(
|
|
77
|
+
raise ZValueIsNotMatchError(
|
|
78
|
+
f'Z value is not match. Z value in cif file is {self._ref_z_value}, but calculated Z value is {self.z_value}.'
|
|
79
|
+
)
|
|
77
80
|
|
|
78
81
|
def _calc_lattice(self):
|
|
79
82
|
"""Calculate lattice."""
|
|
@@ -293,10 +296,11 @@ class CifReader:
|
|
|
293
296
|
if '?' not in tmp_atom_data[atom_data_index['_atom_site_label']]:
|
|
294
297
|
if atom_data_index['_atom_site_type_symbol'] is None:
|
|
295
298
|
symbol_label = tmp_atom_data[atom_data_index['_atom_site_label']]
|
|
296
|
-
symbol = symbol_label
|
|
297
|
-
|
|
298
|
-
symbol = symbol.
|
|
299
|
-
|
|
299
|
+
symbol = re.match(r'[A-Z][a-z]?', symbol_label)
|
|
300
|
+
if symbol:
|
|
301
|
+
symbol = symbol.group(0)
|
|
302
|
+
else:
|
|
303
|
+
raise ValueError(f'Symbol label {symbol_label} is not valid.')
|
|
300
304
|
else:
|
|
301
305
|
symbol_label = tmp_atom_data[atom_data_index['_atom_site_label']]
|
|
302
306
|
symbol = tmp_atom_data[atom_data_index['_atom_site_type_symbol']]
|
|
@@ -310,11 +314,10 @@ class CifReader:
|
|
|
310
314
|
# get symmetry operation information
|
|
311
315
|
elif is_read_sym:
|
|
312
316
|
if "'" in line:
|
|
313
|
-
line = list(map(lambda x: x.strip().replace(' ', ''), line.split(
|
|
314
|
-
self.symmetry_pos.append(line[symmetry_data_index].lower())
|
|
317
|
+
line = list(map(lambda x: x.strip().replace(' ', '').replace("'", ""), line.split()))
|
|
315
318
|
else:
|
|
316
319
|
line = list(map(lambda x: x.strip().replace(' ', ''), line.split()))
|
|
317
|
-
|
|
320
|
+
self.symmetry_pos.append(line[symmetry_data_index].lower())
|
|
318
321
|
|
|
319
322
|
self.symbols = np.array(self.symbols)
|
|
320
323
|
self.coordinates = np.array(self.coordinates)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
mcal/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
2
|
-
mcal/mcal.py,sha256=
|
|
2
|
+
mcal/mcal.py,sha256=wli3D5Q1rAQ5sECpdsnNqbGcxdI3TH72yW8keg-s6fU,29280
|
|
3
3
|
mcal/calculations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
mcal/calculations/hopping_mobility_model.py,sha256=eD9doesa1yVDQxzBYW0N41OyjikZb77S69I_mIMbL2g,13180
|
|
5
5
|
mcal/calculations/rcal.py,sha256=CH3iV18KTM8xU7M7zKR3e1m67GbJLH8zi0j50TsUXLE,13500
|
|
6
6
|
mcal/constants/element_properties.csv,sha256=_Yanl713VZQaAqPYoLNn-hXDdg01ZfkYsCLQ1SQSX8w,4073
|
|
7
7
|
mcal/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
mcal/utils/cif_reader.py,sha256=
|
|
8
|
+
mcal/utils/cif_reader.py,sha256=znD3nLSBFbJsP64V7eq9I7Nrs4PUis39k4S0uzoOyUk,23103
|
|
9
9
|
mcal/utils/gaus_log_reader.py,sha256=nNIgBae9hRUgpmNF7eIC5LOENSo6NQmuckMM4A3HAa8,3159
|
|
10
10
|
mcal/utils/gjf_maker.py,sha256=Kkh_gNcifFfhTikZar6SzoNJ7AyEBiCBXJTQkHxHX-0,8193
|
|
11
|
-
yu_mcal-0.1.
|
|
12
|
-
yu_mcal-0.1.
|
|
13
|
-
yu_mcal-0.1.
|
|
14
|
-
yu_mcal-0.1.
|
|
15
|
-
yu_mcal-0.1.
|
|
11
|
+
yu_mcal-0.1.5.dist-info/METADATA,sha256=DZ3XyMkDDW9a3v2wWXnmJ6KkkLqPIequkUNGEfisP04,7890
|
|
12
|
+
yu_mcal-0.1.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
13
|
+
yu_mcal-0.1.5.dist-info/entry_points.txt,sha256=_0xZR3t9qvFSd9L6Iot03NixVLxXioEY19L6w3Fs1Ew,40
|
|
14
|
+
yu_mcal-0.1.5.dist-info/licenses/LICENSE,sha256=JP8vm7gYE73jLgnMFTOLNo_RnH88RrB4Goyh7H_muto,1072
|
|
15
|
+
yu_mcal-0.1.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|