yu-mcal 0.2.1__py3-none-any.whl → 0.3.0__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.
@@ -1,4 +1,4 @@
1
- """hopping_mobility_model.py (2025/10/06)"""
1
+ """hopping_mobility_model.py (2026/01/29)"""
2
2
  import math
3
3
  import random
4
4
  from typing import List, Tuple
@@ -22,11 +22,11 @@ def demo():
22
22
  for d in D:
23
23
  print(f"{d[0]:9.6f} {d[1]:9.6f} {d[2]:9.6f}")
24
24
  print("Diffusion coefficient tensor (ODE):")
25
- D_ode = diffusion_coefficient_tensor_ODE(lattice, hop)
25
+ D_ode = _diffusion_coefficient_tensor_ODE(lattice, hop)
26
26
  for d in D_ode:
27
27
  print(f"{d[0]:9.6f} {d[1]:9.6f} {d[2]:9.6f}")
28
28
  print("Diffusion coefficient tensor (MC):")
29
- D_mc = diffusion_coefficient_tensor_MC(lattice, hop)
29
+ D_mc = _diffusion_coefficient_tensor_MC(lattice, hop)
30
30
  for d in D_mc:
31
31
  print(f"{d[0]:9.6f} {d[1]:9.6f} {d[2]:9.6f}")
32
32
 
@@ -43,11 +43,11 @@ def demo():
43
43
  for d in D:
44
44
  print(f"{d[0]:9.6f} {d[1]:9.6f} {d[2]:9.6f}")
45
45
  print("Diffusion coefficient tensor (ODE):")
46
- D_ode = diffusion_coefficient_tensor_ODE(lattice, hop)
46
+ D_ode = _diffusion_coefficient_tensor_ODE(lattice, hop)
47
47
  for d in D_ode:
48
48
  print(f"{d[0]:9.6f} {d[1]:9.6f} {d[2]:9.6f}")
49
49
  print("Diffusion coefficient tensor (MC):")
50
- D_mc = diffusion_coefficient_tensor_MC(lattice, hop)
50
+ D_mc = _diffusion_coefficient_tensor_MC(lattice, hop)
51
51
  for d in D_mc:
52
52
  print(f"{d[0]:9.6f} {d[1]:9.6f} {d[2]:9.6f}")
53
53
 
@@ -70,11 +70,11 @@ def demo():
70
70
  for d in D:
71
71
  print(f"{d[0]:9.6f} {d[1]:9.6f} {d[2]:9.6f}")
72
72
  print("Diffusion coefficient tensor (ODE):")
73
- D_ode = diffusion_coefficient_tensor_ODE(lattice, hop)
73
+ D_ode = _diffusion_coefficient_tensor_ODE(lattice, hop)
74
74
  for d in D_ode:
75
75
  print(f"{d[0]:9.6f} {d[1]:9.6f} {d[2]:9.6f}")
76
76
  print("Diffusion coefficient tensor (MC):")
77
- D_mc = diffusion_coefficient_tensor_MC(lattice, hop)
77
+ D_mc = _diffusion_coefficient_tensor_MC(lattice, hop)
78
78
  for d in D_mc:
79
79
  print(f"{d[0]:9.6f} {d[1]:9.6f} {d[2]:9.6f}")
80
80
 
@@ -220,10 +220,10 @@ def diffusion_coefficient_tensor(
220
220
  return D
221
221
 
222
222
 
223
- def diffusion_coefficient_tensor_ODE(
223
+ def _diffusion_coefficient_tensor_ODE(
224
224
  lattice: NDArray[np.float64],
225
225
  hop: List[Tuple[int, int, int, int, int, float]],
226
- max_steps: int = 200,
226
+ max_steps: int = 10000,
227
227
  size: int = 40,
228
228
  max_rate: float = 0.05
229
229
  ) -> NDArray[np.float64]:
@@ -280,10 +280,10 @@ def diffusion_coefficient_tensor_ODE(
280
280
  return D
281
281
 
282
282
 
283
- def diffusion_coefficient_tensor_MC(
283
+ def _diffusion_coefficient_tensor_MC(
284
284
  lattice: NDArray[np.float64],
285
285
  hop: List[Tuple[int, int, int, int, int, float]],
286
- steps: int = 100,
286
+ steps: int = 10000,
287
287
  particles: int = 10000
288
288
  ) -> NDArray[np.float64]:
289
289
  """Calculate diffusion coefficient tensor from Monte Carlo simulation using Gillespie algorithm.
mcal/mcal.py CHANGED
@@ -18,8 +18,8 @@ from mcal.utils.gaus_log_reader import check_normal_termination
18
18
  from mcal.utils.gjf_maker import GjfMaker
19
19
  from mcal.calculations.hopping_mobility_model import (
20
20
  diffusion_coefficient_tensor,
21
- diffusion_coefficient_tensor_MC,
22
- diffusion_coefficient_tensor_ODE,
21
+ _diffusion_coefficient_tensor_MC,
22
+ _diffusion_coefficient_tensor_ODE,
23
23
  marcus_rate,
24
24
  mobility_tensor
25
25
  )
@@ -71,10 +71,6 @@ def main():
71
71
  Plot mobility tensor in 2D plane:
72
72
  - Plot mobility tensor in 2D plane (Examples: ab, ac, ba, bc, ca, cb (default is ab))\n
73
73
  $ python hop_mcal.py xxx.cif p --plot-plane ab
74
-
75
- Compare calculation methods:
76
- - Compare results using kinetic Monte Carlo and ODE methods\n
77
- $ python hop_mcal.py xxx.cif p --mc --ode
78
74
  """
79
75
  # Error range for skipping calculation of transfer integrals using moment of inertia and distance between centers of weight.
80
76
  CENTER_OF_WEIGHT_ERROR = 1.0e-7
@@ -117,10 +113,10 @@ def main():
117
113
  help='do not process for speeding up using moment of inertia and distance between centers of weight',
118
114
  action='store_true',
119
115
  )
120
- parser.add_argument('--mc', help='use Monte Carlo method to calculate diffusion coefficient', action='store_true')
116
+ parser.add_argument('--mc', help=argparse.SUPPRESS, action='store_true')
121
117
  parser.add_argument(
122
118
  '--ode',
123
- help='use Ordinary Differential Equation method to calculate diffusion coefficient',
119
+ help=argparse.SUPPRESS,
124
120
  action='store_true',
125
121
  )
126
122
  parser.add_argument(
@@ -151,7 +147,7 @@ def main():
151
147
  cif_path_without_ext = f'{directory}/{filename}'
152
148
 
153
149
  print('----------------------------------------')
154
- print(' mcal 0.2.1 (2026/01/29) by Matsui Lab. ')
150
+ print(' mcal 0.3.0 (2026/01/29) by Matsui Lab. ')
155
151
  print('----------------------------------------')
156
152
 
157
153
  if args.read_pickle:
@@ -331,7 +327,7 @@ def main():
331
327
 
332
328
  ##### Simulate mobility tensor calculation using Monte Carlo method #####
333
329
  if args.mc:
334
- D_MC = diffusion_coefficient_tensor_MC(cif_reader.lattice * 1e-8, hop)
330
+ D_MC = _diffusion_coefficient_tensor_MC(cif_reader.lattice * 1e-8, hop)
335
331
  print_tensor(D_MC, msg="Diffusion coefficient tensor (cm^2/s) (MC)")
336
332
  mu_MC = mobility_tensor(D_MC)
337
333
  print_tensor(mu_MC, msg="Mobility tensor (cm^2/Vs) (MC)")
@@ -340,7 +336,7 @@ def main():
340
336
 
341
337
  ##### Simulate mobility tensor calculation using Ordinary Differential Equation method #####
342
338
  if args.ode:
343
- D_ODE = diffusion_coefficient_tensor_ODE(cif_reader.lattice * 1e-8, hop)
339
+ D_ODE = _diffusion_coefficient_tensor_ODE(cif_reader.lattice * 1e-8, hop)
344
340
  print_tensor(D_ODE, msg="Diffusion coefficient tensor (cm^2/s) (ODE)")
345
341
  mu_ODE = mobility_tensor(D_ODE)
346
342
  print_tensor(mu_ODE, msg="Mobility tensor (cm^2/Vs) (ODE)")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yu-mcal
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: Program for the calculation of mobility tensor for organic semiconductor crystals
5
5
  Author: Koki Ozawa
6
6
  Author-email: Hiroyuki Matsui <h-matsui@yz.yamagata-u.ac.jp>
@@ -167,16 +167,6 @@ Plot mobility tensor as a 2D polar plot on specified crystallographic plane.
167
167
  - `mcal xxx.cif p --plot-plane ab` (plot on ab-plane)
168
168
  - `mcal xxx.cif p --plot-plane bc` (plot on bc-plane)
169
169
 
170
- ### Diffusion Coefficient Calculation Methods
171
-
172
- #### `--mc`
173
- Calculate diffusion coefficient tensor using kinetic Monte Carlo method.
174
- - **Example**: `mcal xxx.cif p --mc`
175
-
176
- #### `--ode`
177
- Calculate diffusion coefficient tensor using Ordinary Differential Equation method.
178
- - **Example**: `mcal xxx.cif p --ode`
179
-
180
170
  ## Practical Usage Examples
181
171
 
182
172
  ### Basic Calculations
@@ -215,12 +205,6 @@ mcal xxx.cif p --resume
215
205
  mcal xxx.cif p -p
216
206
  ```
217
207
 
218
- ### Comparing Diffusion Coefficients
219
- ```bash
220
- # Compare with normal calculation + kinetic Monte Carlo + ODE methods
221
- mcal xxx.cif p --mc --ode
222
- ```
223
-
224
208
  ## Output
225
209
 
226
210
  ### Standard Output
@@ -1,15 +1,15 @@
1
1
  mcal/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
2
- mcal/mcal.py,sha256=1XkovOZTkSlBlyOuWjZ85BTU2VvU30gU5Zf0hgfZk_o,32816
2
+ mcal/mcal.py,sha256=GsYv75wVd-bqae5hF6JJiMExiz8lfYhnOF5v9rivaug,32563
3
3
  mcal/calculations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- mcal/calculations/hopping_mobility_model.py,sha256=eD9doesa1yVDQxzBYW0N41OyjikZb77S69I_mIMbL2g,13180
4
+ mcal/calculations/hopping_mobility_model.py,sha256=OdeMwWKcl3Xt_86cl_jPi3D-ecIXNicAqPcLZYu3gAs,13192
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
8
  mcal/utils/cif_reader.py,sha256=QAV6xXMd3nfKLpJqBncA6fbGJ5kgYKDeKIx-sK_4P_M,24532
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.2.1.dist-info/METADATA,sha256=OtLCHoL8h1mqApWdTlB9-34BWqey1Spgcp8N-0m6YPA,8270
12
- yu_mcal-0.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
13
- yu_mcal-0.2.1.dist-info/entry_points.txt,sha256=_0xZR3t9qvFSd9L6Iot03NixVLxXioEY19L6w3Fs1Ew,40
14
- yu_mcal-0.2.1.dist-info/licenses/LICENSE,sha256=JP8vm7gYE73jLgnMFTOLNo_RnH88RrB4Goyh7H_muto,1072
15
- yu_mcal-0.2.1.dist-info/RECORD,,
11
+ yu_mcal-0.3.0.dist-info/METADATA,sha256=2t6L0CjNuLOT52piE-j2ZWYCGK5x6vP7Q7SoRveWV-k,7818
12
+ yu_mcal-0.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
13
+ yu_mcal-0.3.0.dist-info/entry_points.txt,sha256=_0xZR3t9qvFSd9L6Iot03NixVLxXioEY19L6w3Fs1Ew,40
14
+ yu_mcal-0.3.0.dist-info/licenses/LICENSE,sha256=JP8vm7gYE73jLgnMFTOLNo_RnH88RrB4Goyh7H_muto,1072
15
+ yu_mcal-0.3.0.dist-info/RECORD,,