yu-mcal 0.1.0__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.
- yu_mcal-0.1.0/.gitignore +11 -0
- yu_mcal-0.1.0/.python-version +1 -0
- yu_mcal-0.1.0/LICENSE +21 -0
- yu_mcal-0.1.0/PKG-INFO +257 -0
- yu_mcal-0.1.0/README.md +211 -0
- yu_mcal-0.1.0/README_ja.md +211 -0
- yu_mcal-0.1.0/docs/.nojekyll +0 -0
- yu_mcal-0.1.0/docs/_sources/index.rst.txt +335 -0
- yu_mcal-0.1.0/docs/_sources/mcal.calculations.rst.txt +37 -0
- yu_mcal-0.1.0/docs/_sources/mcal.rst.txt +30 -0
- yu_mcal-0.1.0/docs/_sources/mcal.utils.rst.txt +37 -0
- yu_mcal-0.1.0/docs/_sources/modules.rst.txt +7 -0
- yu_mcal-0.1.0/docs/_static/autodoc_pydantic.css +11 -0
- yu_mcal-0.1.0/docs/_static/basic.css +925 -0
- yu_mcal-0.1.0/docs/_static/debug.css +69 -0
- yu_mcal-0.1.0/docs/_static/doctools.js +156 -0
- yu_mcal-0.1.0/docs/_static/documentation_options.js +13 -0
- yu_mcal-0.1.0/docs/_static/file.png +0 -0
- yu_mcal-0.1.0/docs/_static/language_data.js +199 -0
- yu_mcal-0.1.0/docs/_static/minus.png +0 -0
- yu_mcal-0.1.0/docs/_static/plus.png +0 -0
- yu_mcal-0.1.0/docs/_static/pygments.css +250 -0
- yu_mcal-0.1.0/docs/_static/scripts/furo-extensions.js +0 -0
- yu_mcal-0.1.0/docs/_static/scripts/furo.js +3 -0
- yu_mcal-0.1.0/docs/_static/scripts/furo.js.LICENSE.txt +7 -0
- yu_mcal-0.1.0/docs/_static/scripts/furo.js.map +1 -0
- yu_mcal-0.1.0/docs/_static/searchtools.js +620 -0
- yu_mcal-0.1.0/docs/_static/skeleton.css +296 -0
- yu_mcal-0.1.0/docs/_static/sphinx_highlight.js +154 -0
- yu_mcal-0.1.0/docs/_static/styles/furo-extensions.css +2 -0
- yu_mcal-0.1.0/docs/_static/styles/furo-extensions.css.map +1 -0
- yu_mcal-0.1.0/docs/_static/styles/furo.css +2 -0
- yu_mcal-0.1.0/docs/_static/styles/furo.css.map +1 -0
- yu_mcal-0.1.0/docs/genindex.html +717 -0
- yu_mcal-0.1.0/docs/index.html +700 -0
- yu_mcal-0.1.0/docs/mcal.calculations.html +1001 -0
- yu_mcal-0.1.0/docs/mcal.html +816 -0
- yu_mcal-0.1.0/docs/mcal.utils.html +839 -0
- yu_mcal-0.1.0/docs/modules.html +348 -0
- yu_mcal-0.1.0/docs/objects.inv +0 -0
- yu_mcal-0.1.0/docs/py-modindex.html +345 -0
- yu_mcal-0.1.0/docs/search.html +287 -0
- yu_mcal-0.1.0/docs/searchindex.js +1 -0
- yu_mcal-0.1.0/docs-src/Makefile +20 -0
- yu_mcal-0.1.0/docs-src/make.bat +35 -0
- yu_mcal-0.1.0/docs-src/source/conf.py +41 -0
- yu_mcal-0.1.0/docs-src/source/index.rst +335 -0
- yu_mcal-0.1.0/docs-src/source/mcal.calculations.rst +37 -0
- yu_mcal-0.1.0/docs-src/source/mcal.rst +30 -0
- yu_mcal-0.1.0/docs-src/source/mcal.utils.rst +37 -0
- yu_mcal-0.1.0/docs-src/source/modules.rst +7 -0
- yu_mcal-0.1.0/pyproject.toml +57 -0
- yu_mcal-0.1.0/requirements.txt +6 -0
- yu_mcal-0.1.0/src/mcal/__init__.py +1 -0
- yu_mcal-0.1.0/src/mcal/calculations/__init__.py +0 -0
- yu_mcal-0.1.0/src/mcal/calculations/hopping_mobility_model.py +391 -0
- yu_mcal-0.1.0/src/mcal/calculations/rcal.py +408 -0
- yu_mcal-0.1.0/src/mcal/calculations/tcal.py +1123 -0
- yu_mcal-0.1.0/src/mcal/constants/element_properties.csv +121 -0
- yu_mcal-0.1.0/src/mcal/mcal.py +838 -0
- yu_mcal-0.1.0/src/mcal/utils/__init__.py +0 -0
- yu_mcal-0.1.0/src/mcal/utils/cif_reader.py +645 -0
- yu_mcal-0.1.0/src/mcal/utils/gaus_log_reader.py +91 -0
- yu_mcal-0.1.0/src/mcal/utils/gjf_maker.py +267 -0
- yu_mcal-0.1.0/uv.lock +1287 -0
yu_mcal-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.9
|
yu_mcal-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Hiroyuki Matsui
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
yu_mcal-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: yu-mcal
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Program for the calculation of mobility tensor for organic semiconductor crystals
|
|
5
|
+
Author: Koki Ozawa
|
|
6
|
+
Author-email: Hiroyuki Matsui <h-matsui@yz.yamagata-u.ac.jp>
|
|
7
|
+
License: MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2025 Hiroyuki Matsui
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Keywords: mobility,mobility tensor,organic semiconductor,reorganization energy,transfer integral
|
|
30
|
+
Classifier: Development Status :: 4 - Beta
|
|
31
|
+
Classifier: Intended Audience :: Education
|
|
32
|
+
Classifier: Intended Audience :: Science/Research
|
|
33
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
34
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
35
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
39
|
+
Classifier: Topic :: Scientific/Engineering
|
|
40
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
41
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
42
|
+
Requires-Python: >=3.9
|
|
43
|
+
Requires-Dist: numpy>=2.0.2
|
|
44
|
+
Requires-Dist: pandas>=2.3.3
|
|
45
|
+
Description-Content-Type: text/markdown
|
|
46
|
+
|
|
47
|
+
# mcal: Program for the calculation of mobility tensor for organic semiconductor crystals
|
|
48
|
+
[](https://www.python.org)
|
|
49
|
+
[](https://opensource.org/licenses/MIT)
|
|
50
|
+
|
|
51
|
+
# Overview
|
|
52
|
+
`mcal.py` is a tool for calculating mobility tensors of organic semiconductors. It calculates transfer integrals and reorganization energy from crystal structures, and determines mobility tensors considering anisotropy and path continuity.
|
|
53
|
+
|
|
54
|
+
# Requirements
|
|
55
|
+
* Python 3.9 or newer
|
|
56
|
+
* NumPy
|
|
57
|
+
* Pandas
|
|
58
|
+
* Gaussian 09 or 16
|
|
59
|
+
|
|
60
|
+
# Important notice
|
|
61
|
+
* The path of the Gaussian must be set.
|
|
62
|
+
|
|
63
|
+
# Installation
|
|
64
|
+
```bash
|
|
65
|
+
pip install yu-mcal
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## Verify Installation
|
|
70
|
+
|
|
71
|
+
After installation, you can verify by running:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
mcal --help
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
# mcal Usage Manual
|
|
78
|
+
|
|
79
|
+
## Basic Usage
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
mcal <cif_filename or pkl_filenname> <osc_type> [options]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Required Arguments
|
|
86
|
+
|
|
87
|
+
- `cif_filename`: Path to the CIF file
|
|
88
|
+
- `pkl_filename`: Path to the pickle file
|
|
89
|
+
- `osc_type`: Organic semiconductor type
|
|
90
|
+
- `p`: p-type semiconductor (uses HOMO level)
|
|
91
|
+
- `n`: n-type semiconductor (uses LUMO level)
|
|
92
|
+
|
|
93
|
+
### Basic Examples
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# Calculate as p-type semiconductor
|
|
97
|
+
mcal xxx.cif p
|
|
98
|
+
|
|
99
|
+
# Calculate as n-type semiconductor
|
|
100
|
+
mcal xxx.cif n
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Options
|
|
104
|
+
|
|
105
|
+
### Calculation Settings
|
|
106
|
+
|
|
107
|
+
#### `-M, --method <method>`
|
|
108
|
+
Specify the calculation method used in Gaussian calculations.
|
|
109
|
+
- **Default**: `B3LYP/6-31G(d,p)`
|
|
110
|
+
- **Example**: `mcal xxx.cif p -M "B3LYP/6-31G(d)"`
|
|
111
|
+
|
|
112
|
+
#### `-c, --cpu <number>`
|
|
113
|
+
Specify the number of CPUs to use.
|
|
114
|
+
- **Default**: `4`
|
|
115
|
+
- **Example**: `mcal xxx.cif p -c 8`
|
|
116
|
+
|
|
117
|
+
#### `-m, --mem <memory>`
|
|
118
|
+
Specify the amount of memory in GB.
|
|
119
|
+
- **Default**: `10`
|
|
120
|
+
- **Example**: `mcal xxx.cif p -m 16`
|
|
121
|
+
|
|
122
|
+
#### `-g, --g09`
|
|
123
|
+
Use Gaussian 09 (default is Gaussian 16).
|
|
124
|
+
- **Example**: `mcal xxx.cif p -g`
|
|
125
|
+
|
|
126
|
+
### Calculation Control
|
|
127
|
+
|
|
128
|
+
#### `-r, --read`
|
|
129
|
+
Read results from existing log files without executing Gaussian.
|
|
130
|
+
- **Example**: `mcal xxx.cif p -r`
|
|
131
|
+
|
|
132
|
+
#### `-rp, --read_pickle`
|
|
133
|
+
Read results from existing pickle file without executing calculations.
|
|
134
|
+
- **Example**: `mcal xxx_result.pkl p -rp`
|
|
135
|
+
|
|
136
|
+
#### `--resume`
|
|
137
|
+
Resume calculation using existing results if log files terminated normally.
|
|
138
|
+
- **Example**: `mcal xxx.cif p --resume`
|
|
139
|
+
|
|
140
|
+
#### `--fullcal`
|
|
141
|
+
Disable speedup processing using moment of inertia and distance between centers of weight, and calculate transfer integrals for all pairs.
|
|
142
|
+
- **Example**: `mcal xxx.cif p --fullcal`
|
|
143
|
+
|
|
144
|
+
#### `--cellsize <number>`
|
|
145
|
+
Specify the number of unit cells to expand in each direction around the central unit cell for transfer integral calculations.
|
|
146
|
+
- **Default**: `2` (creates 5×5×5 supercell)
|
|
147
|
+
- **Examples**:
|
|
148
|
+
- `mcal xxx.cif p --cellsize 1` (creates 3×3×3 supercell)
|
|
149
|
+
- `mcal xxx.cif p --cellsize 3` (creates 7×7×7 supercell)
|
|
150
|
+
|
|
151
|
+
### Output Settings
|
|
152
|
+
|
|
153
|
+
#### `-p, --pickle`
|
|
154
|
+
Save calculation results to a pickle file.
|
|
155
|
+
- **Example**: `mcal xxx.cif p -p`
|
|
156
|
+
|
|
157
|
+
### Diffusion Coefficient Calculation Methods
|
|
158
|
+
|
|
159
|
+
#### `--mc`
|
|
160
|
+
Calculate diffusion coefficient tensor using kinetic Monte Carlo method.
|
|
161
|
+
- **Example**: `mcal xxx.cif p --mc`
|
|
162
|
+
|
|
163
|
+
#### `--ode`
|
|
164
|
+
Calculate diffusion coefficient tensor using Ordinary Differential Equation method.
|
|
165
|
+
- **Example**: `mcal xxx.cif p --ode`
|
|
166
|
+
|
|
167
|
+
## Practical Usage Examples
|
|
168
|
+
|
|
169
|
+
### Basic Calculations
|
|
170
|
+
```bash
|
|
171
|
+
# Calculate mobility of p-type xxx
|
|
172
|
+
mcal xxx.cif p
|
|
173
|
+
|
|
174
|
+
# Use 8 CPUs and 16GB memory
|
|
175
|
+
mcal xxx.cif p -c 8 -m 16
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### High-Precision Calculations
|
|
179
|
+
```bash
|
|
180
|
+
# Calculate transfer integrals for all pairs (high precision, time-consuming)
|
|
181
|
+
mcal xxx.cif p --fullcal
|
|
182
|
+
|
|
183
|
+
# Use larger supercell to widen transfer integral calculation range
|
|
184
|
+
mcal xxx.cif p --cellsize 3
|
|
185
|
+
|
|
186
|
+
# Use different basis set
|
|
187
|
+
mcal xxx.cif p -M "B3LYP/6-311G(d,p)"
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Reusing Results
|
|
191
|
+
```bash
|
|
192
|
+
# Read from existing calculation results
|
|
193
|
+
mcal xxx.cif p -r
|
|
194
|
+
|
|
195
|
+
# Read from existing pickle file
|
|
196
|
+
mcal xxx_result.pkl p -rp
|
|
197
|
+
|
|
198
|
+
# Resume interrupted calculation
|
|
199
|
+
mcal xxx.cif p --resume
|
|
200
|
+
|
|
201
|
+
# Save results to pickle file
|
|
202
|
+
mcal xxx.cif p -p
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Comparing Diffusion Coefficients
|
|
206
|
+
```bash
|
|
207
|
+
# Compare with normal calculation + kinetic Monte Carlo + ODE methods
|
|
208
|
+
mcal xxx.cif p --mc --ode
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Output
|
|
212
|
+
|
|
213
|
+
### Standard Output
|
|
214
|
+
- Reorganization energy
|
|
215
|
+
- Transfer integrals for each pair
|
|
216
|
+
- Diffusion coefficient tensor
|
|
217
|
+
- Mobility tensor
|
|
218
|
+
- Eigenvalues and eigenvectors of mobility
|
|
219
|
+
|
|
220
|
+
## Notes
|
|
221
|
+
|
|
222
|
+
1. **Calculation Time**: Calculation time varies significantly depending on the number of molecules and cell size
|
|
223
|
+
2. **Memory Usage**: Ensure sufficient memory for large systems
|
|
224
|
+
3. **Gaussian Installation**: Gaussian 09 or Gaussian 16 is required
|
|
225
|
+
4. **Dependencies**: Make sure all required Python libraries are installed
|
|
226
|
+
|
|
227
|
+
## Troubleshooting
|
|
228
|
+
|
|
229
|
+
### If calculation stops midway
|
|
230
|
+
```bash
|
|
231
|
+
# Resume with --resume option
|
|
232
|
+
mcal xxx.cif p --resume
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Memory shortage error
|
|
236
|
+
```bash
|
|
237
|
+
# Increase memory amount
|
|
238
|
+
mcal xxx.cif p -m 32
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### To reduce calculation time
|
|
242
|
+
```bash
|
|
243
|
+
# Enable speedup processing (default)
|
|
244
|
+
mcal xxx.cif p
|
|
245
|
+
|
|
246
|
+
# Use smaller supercell for faster calculation
|
|
247
|
+
mcal xxx.cif p --cellsize 1
|
|
248
|
+
|
|
249
|
+
# Increase number of CPUs
|
|
250
|
+
mcal xxx.cif p -c 16
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
# Authors
|
|
254
|
+
[Matsui Laboratory, Research Center for Organic Electronics (ROEL), Yamagata University](https://matsui-lab.yz.yamagata-u.ac.jp/index-e.html)
|
|
255
|
+
Hiroyuki Matsui, Koki Ozawa
|
|
256
|
+
Email: h-matsui[at]yz.yamagata-u.ac.jp
|
|
257
|
+
Please replace [at] with @
|
yu_mcal-0.1.0/README.md
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# mcal: Program for the calculation of mobility tensor for organic semiconductor crystals
|
|
2
|
+
[](https://www.python.org)
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
|
|
5
|
+
# Overview
|
|
6
|
+
`mcal.py` is a tool for calculating mobility tensors of organic semiconductors. It calculates transfer integrals and reorganization energy from crystal structures, and determines mobility tensors considering anisotropy and path continuity.
|
|
7
|
+
|
|
8
|
+
# Requirements
|
|
9
|
+
* Python 3.9 or newer
|
|
10
|
+
* NumPy
|
|
11
|
+
* Pandas
|
|
12
|
+
* Gaussian 09 or 16
|
|
13
|
+
|
|
14
|
+
# Important notice
|
|
15
|
+
* The path of the Gaussian must be set.
|
|
16
|
+
|
|
17
|
+
# Installation
|
|
18
|
+
```bash
|
|
19
|
+
pip install yu-mcal
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Verify Installation
|
|
24
|
+
|
|
25
|
+
After installation, you can verify by running:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
mcal --help
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
# mcal Usage Manual
|
|
32
|
+
|
|
33
|
+
## Basic Usage
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
mcal <cif_filename or pkl_filenname> <osc_type> [options]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Required Arguments
|
|
40
|
+
|
|
41
|
+
- `cif_filename`: Path to the CIF file
|
|
42
|
+
- `pkl_filename`: Path to the pickle file
|
|
43
|
+
- `osc_type`: Organic semiconductor type
|
|
44
|
+
- `p`: p-type semiconductor (uses HOMO level)
|
|
45
|
+
- `n`: n-type semiconductor (uses LUMO level)
|
|
46
|
+
|
|
47
|
+
### Basic Examples
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Calculate as p-type semiconductor
|
|
51
|
+
mcal xxx.cif p
|
|
52
|
+
|
|
53
|
+
# Calculate as n-type semiconductor
|
|
54
|
+
mcal xxx.cif n
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Options
|
|
58
|
+
|
|
59
|
+
### Calculation Settings
|
|
60
|
+
|
|
61
|
+
#### `-M, --method <method>`
|
|
62
|
+
Specify the calculation method used in Gaussian calculations.
|
|
63
|
+
- **Default**: `B3LYP/6-31G(d,p)`
|
|
64
|
+
- **Example**: `mcal xxx.cif p -M "B3LYP/6-31G(d)"`
|
|
65
|
+
|
|
66
|
+
#### `-c, --cpu <number>`
|
|
67
|
+
Specify the number of CPUs to use.
|
|
68
|
+
- **Default**: `4`
|
|
69
|
+
- **Example**: `mcal xxx.cif p -c 8`
|
|
70
|
+
|
|
71
|
+
#### `-m, --mem <memory>`
|
|
72
|
+
Specify the amount of memory in GB.
|
|
73
|
+
- **Default**: `10`
|
|
74
|
+
- **Example**: `mcal xxx.cif p -m 16`
|
|
75
|
+
|
|
76
|
+
#### `-g, --g09`
|
|
77
|
+
Use Gaussian 09 (default is Gaussian 16).
|
|
78
|
+
- **Example**: `mcal xxx.cif p -g`
|
|
79
|
+
|
|
80
|
+
### Calculation Control
|
|
81
|
+
|
|
82
|
+
#### `-r, --read`
|
|
83
|
+
Read results from existing log files without executing Gaussian.
|
|
84
|
+
- **Example**: `mcal xxx.cif p -r`
|
|
85
|
+
|
|
86
|
+
#### `-rp, --read_pickle`
|
|
87
|
+
Read results from existing pickle file without executing calculations.
|
|
88
|
+
- **Example**: `mcal xxx_result.pkl p -rp`
|
|
89
|
+
|
|
90
|
+
#### `--resume`
|
|
91
|
+
Resume calculation using existing results if log files terminated normally.
|
|
92
|
+
- **Example**: `mcal xxx.cif p --resume`
|
|
93
|
+
|
|
94
|
+
#### `--fullcal`
|
|
95
|
+
Disable speedup processing using moment of inertia and distance between centers of weight, and calculate transfer integrals for all pairs.
|
|
96
|
+
- **Example**: `mcal xxx.cif p --fullcal`
|
|
97
|
+
|
|
98
|
+
#### `--cellsize <number>`
|
|
99
|
+
Specify the number of unit cells to expand in each direction around the central unit cell for transfer integral calculations.
|
|
100
|
+
- **Default**: `2` (creates 5×5×5 supercell)
|
|
101
|
+
- **Examples**:
|
|
102
|
+
- `mcal xxx.cif p --cellsize 1` (creates 3×3×3 supercell)
|
|
103
|
+
- `mcal xxx.cif p --cellsize 3` (creates 7×7×7 supercell)
|
|
104
|
+
|
|
105
|
+
### Output Settings
|
|
106
|
+
|
|
107
|
+
#### `-p, --pickle`
|
|
108
|
+
Save calculation results to a pickle file.
|
|
109
|
+
- **Example**: `mcal xxx.cif p -p`
|
|
110
|
+
|
|
111
|
+
### Diffusion Coefficient Calculation Methods
|
|
112
|
+
|
|
113
|
+
#### `--mc`
|
|
114
|
+
Calculate diffusion coefficient tensor using kinetic Monte Carlo method.
|
|
115
|
+
- **Example**: `mcal xxx.cif p --mc`
|
|
116
|
+
|
|
117
|
+
#### `--ode`
|
|
118
|
+
Calculate diffusion coefficient tensor using Ordinary Differential Equation method.
|
|
119
|
+
- **Example**: `mcal xxx.cif p --ode`
|
|
120
|
+
|
|
121
|
+
## Practical Usage Examples
|
|
122
|
+
|
|
123
|
+
### Basic Calculations
|
|
124
|
+
```bash
|
|
125
|
+
# Calculate mobility of p-type xxx
|
|
126
|
+
mcal xxx.cif p
|
|
127
|
+
|
|
128
|
+
# Use 8 CPUs and 16GB memory
|
|
129
|
+
mcal xxx.cif p -c 8 -m 16
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### High-Precision Calculations
|
|
133
|
+
```bash
|
|
134
|
+
# Calculate transfer integrals for all pairs (high precision, time-consuming)
|
|
135
|
+
mcal xxx.cif p --fullcal
|
|
136
|
+
|
|
137
|
+
# Use larger supercell to widen transfer integral calculation range
|
|
138
|
+
mcal xxx.cif p --cellsize 3
|
|
139
|
+
|
|
140
|
+
# Use different basis set
|
|
141
|
+
mcal xxx.cif p -M "B3LYP/6-311G(d,p)"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Reusing Results
|
|
145
|
+
```bash
|
|
146
|
+
# Read from existing calculation results
|
|
147
|
+
mcal xxx.cif p -r
|
|
148
|
+
|
|
149
|
+
# Read from existing pickle file
|
|
150
|
+
mcal xxx_result.pkl p -rp
|
|
151
|
+
|
|
152
|
+
# Resume interrupted calculation
|
|
153
|
+
mcal xxx.cif p --resume
|
|
154
|
+
|
|
155
|
+
# Save results to pickle file
|
|
156
|
+
mcal xxx.cif p -p
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Comparing Diffusion Coefficients
|
|
160
|
+
```bash
|
|
161
|
+
# Compare with normal calculation + kinetic Monte Carlo + ODE methods
|
|
162
|
+
mcal xxx.cif p --mc --ode
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Output
|
|
166
|
+
|
|
167
|
+
### Standard Output
|
|
168
|
+
- Reorganization energy
|
|
169
|
+
- Transfer integrals for each pair
|
|
170
|
+
- Diffusion coefficient tensor
|
|
171
|
+
- Mobility tensor
|
|
172
|
+
- Eigenvalues and eigenvectors of mobility
|
|
173
|
+
|
|
174
|
+
## Notes
|
|
175
|
+
|
|
176
|
+
1. **Calculation Time**: Calculation time varies significantly depending on the number of molecules and cell size
|
|
177
|
+
2. **Memory Usage**: Ensure sufficient memory for large systems
|
|
178
|
+
3. **Gaussian Installation**: Gaussian 09 or Gaussian 16 is required
|
|
179
|
+
4. **Dependencies**: Make sure all required Python libraries are installed
|
|
180
|
+
|
|
181
|
+
## Troubleshooting
|
|
182
|
+
|
|
183
|
+
### If calculation stops midway
|
|
184
|
+
```bash
|
|
185
|
+
# Resume with --resume option
|
|
186
|
+
mcal xxx.cif p --resume
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Memory shortage error
|
|
190
|
+
```bash
|
|
191
|
+
# Increase memory amount
|
|
192
|
+
mcal xxx.cif p -m 32
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### To reduce calculation time
|
|
196
|
+
```bash
|
|
197
|
+
# Enable speedup processing (default)
|
|
198
|
+
mcal xxx.cif p
|
|
199
|
+
|
|
200
|
+
# Use smaller supercell for faster calculation
|
|
201
|
+
mcal xxx.cif p --cellsize 1
|
|
202
|
+
|
|
203
|
+
# Increase number of CPUs
|
|
204
|
+
mcal xxx.cif p -c 16
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
# Authors
|
|
208
|
+
[Matsui Laboratory, Research Center for Organic Electronics (ROEL), Yamagata University](https://matsui-lab.yz.yamagata-u.ac.jp/index-e.html)
|
|
209
|
+
Hiroyuki Matsui, Koki Ozawa
|
|
210
|
+
Email: h-matsui[at]yz.yamagata-u.ac.jp
|
|
211
|
+
Please replace [at] with @
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# mcal: 有機半導体結晶の移動度テンソル計算プログラム
|
|
2
|
+
[](https://www.python.org)
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
|
|
5
|
+
# 概要
|
|
6
|
+
`mcal.py`は有機半導体の移動度テンソルを計算するツールです。結晶構造から移動積分と再配列エネルギーを計算し、異方性と経路の連続性を考慮して移動度テンソルを算出します。
|
|
7
|
+
|
|
8
|
+
# 必要環境
|
|
9
|
+
* Python 3.9以降
|
|
10
|
+
* NumPy
|
|
11
|
+
* Pandas
|
|
12
|
+
* Gaussian 09または16
|
|
13
|
+
|
|
14
|
+
# 注意事項
|
|
15
|
+
* Gaussianのパスが設定されている必要があります。
|
|
16
|
+
|
|
17
|
+
# インストール
|
|
18
|
+
```bash
|
|
19
|
+
pip install yu-mcal
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## インストールの確認
|
|
24
|
+
|
|
25
|
+
インストール後、以下のコマンドで確認できます:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
mcal --help
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
# mcal 使用マニュアル
|
|
32
|
+
|
|
33
|
+
## 基本的な使用方法
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
mcal <cif_filename or pkl_filename> <osc_type> [オプション]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 必須引数
|
|
40
|
+
|
|
41
|
+
- `cif_filename`: CIFファイルのパス
|
|
42
|
+
- `pkl_filename`: pickleファイルのパス
|
|
43
|
+
- `osc_type`: 何型の有機半導体として計算するか
|
|
44
|
+
- `p`: p型半導体 (移動積分にHOMOを使用)
|
|
45
|
+
- `n`: n型半導体 (移動積分にLUMOを使用)
|
|
46
|
+
|
|
47
|
+
### 基本例
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# p型半導体として計算
|
|
51
|
+
mcal xxx.cif p
|
|
52
|
+
|
|
53
|
+
# n型半導体として計算
|
|
54
|
+
mcal xxx.cif n
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## オプション
|
|
58
|
+
|
|
59
|
+
### 計算設定
|
|
60
|
+
|
|
61
|
+
#### `-M, --method <method>`
|
|
62
|
+
Gaussianで使用する計算手法を指定します。
|
|
63
|
+
- **デフォルト**: `B3LYP/6-31G(d,p)`
|
|
64
|
+
- **例**: `mcal xxx.cif p -M "B3LYP/6-31G(d)"`
|
|
65
|
+
|
|
66
|
+
#### `-c, --cpu <number>`
|
|
67
|
+
使用するCPU数を指定します。
|
|
68
|
+
- **デフォルト**: `4`
|
|
69
|
+
- **例**: `mcal xxx.cif p -c 8`
|
|
70
|
+
|
|
71
|
+
#### `-m, --mem <memory>`
|
|
72
|
+
メモリ量をGB単位で指定します。
|
|
73
|
+
- **デフォルト**: `10`
|
|
74
|
+
- **例**: `mcal xxx.cif p -m 16`
|
|
75
|
+
|
|
76
|
+
#### `-g, --g09`
|
|
77
|
+
Gaussian 09を使用します(デフォルトはGaussian 16)。
|
|
78
|
+
- **例**: `mcal xxx.cif p -g`
|
|
79
|
+
|
|
80
|
+
### 計算制御
|
|
81
|
+
|
|
82
|
+
#### `-r, --read`
|
|
83
|
+
Gaussianを実行せずに既存のlogファイルから結果を読み取ります。
|
|
84
|
+
- **例**: `mcal xxx.cif p -r`
|
|
85
|
+
|
|
86
|
+
#### `-rp, --read_pickle`
|
|
87
|
+
計算を実行せずに既存のpickleファイルから結果を読み取ります。
|
|
88
|
+
- **例**: `mcal xxx_result.pkl p -rp`
|
|
89
|
+
|
|
90
|
+
#### `--resume`
|
|
91
|
+
ログファイルが正常に終了している場合、既存の結果を使用して計算を再開します。
|
|
92
|
+
- **例**: `mcal xxx.cif p --resume`
|
|
93
|
+
|
|
94
|
+
#### `--fullcal`
|
|
95
|
+
慣性モーメントと重心間距離を使用した高速化処理を無効にし、すべてのペアに対して移動積分を計算します。
|
|
96
|
+
- **例**: `mcal xxx.cif p --fullcal`
|
|
97
|
+
|
|
98
|
+
#### `--cellsize <number>`
|
|
99
|
+
移動積分計算のために中央単位格子の周りに各方向に拡張する単位格子数を指定します。
|
|
100
|
+
- **デフォルト**: `2`(5×5×5のスーパーセルを作成)
|
|
101
|
+
- **例**:
|
|
102
|
+
- `mcal xxx.cif p --cellsize 1`(3×3×3のスーパーセルを作成)
|
|
103
|
+
- `mcal xxx.cif p --cellsize 3`(7×7×7のスーパーセルを作成)
|
|
104
|
+
|
|
105
|
+
### 出力設定
|
|
106
|
+
|
|
107
|
+
#### `-p, --pickle`
|
|
108
|
+
計算結果をpickleファイルに保存します。
|
|
109
|
+
- **例**: `mcal xxx.cif p -p`
|
|
110
|
+
|
|
111
|
+
### 拡散係数計算手法
|
|
112
|
+
|
|
113
|
+
#### `--mc`
|
|
114
|
+
モンテカルロ法を使用して拡散係数テンソルを計算します。(テスト用)
|
|
115
|
+
- **例**: `mcal xxx.cif p --mc`
|
|
116
|
+
|
|
117
|
+
#### `--ode`
|
|
118
|
+
常微分方程式法を使用して拡散係数テンソルを計算します。(テスト用)
|
|
119
|
+
- **例**: `mcal xxx.cif p --ode`
|
|
120
|
+
|
|
121
|
+
## 使用例
|
|
122
|
+
|
|
123
|
+
### 基本的な計算
|
|
124
|
+
```bash
|
|
125
|
+
# p型xxxの移動度を計算
|
|
126
|
+
mcal xxx.cif p
|
|
127
|
+
|
|
128
|
+
# 8CPUと16GBメモリを使用
|
|
129
|
+
mcal xxx.cif p -c 8 -m 16
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### 高精度計算
|
|
133
|
+
```bash
|
|
134
|
+
# すべてのペアに対して移動積分を計算(高精度、時間がかかる)
|
|
135
|
+
mcal xxx.cif p --fullcal
|
|
136
|
+
|
|
137
|
+
# より大きなスーパーセルを使用して移動積分計算範囲を拡大
|
|
138
|
+
mcal xxx.cif p --cellsize 3
|
|
139
|
+
|
|
140
|
+
# 異なる基底関数セットを使用
|
|
141
|
+
mcal xxx.cif p -M "B3LYP/6-311G(d,p)"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### 結果の再利用
|
|
145
|
+
```bash
|
|
146
|
+
# 既存の計算結果から読み取り
|
|
147
|
+
mcal xxx.cif p -r
|
|
148
|
+
|
|
149
|
+
# 既存のpickleファイルから読み取り
|
|
150
|
+
mcal xxx_result.pkl p -rp
|
|
151
|
+
|
|
152
|
+
# 中断された計算を再開
|
|
153
|
+
mcal xxx.cif p --resume
|
|
154
|
+
|
|
155
|
+
# 結果をpickleファイルに保存
|
|
156
|
+
mcal xxx.cif p -p
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### 拡散係数の比較
|
|
160
|
+
```bash
|
|
161
|
+
# 通常計算 + モンテカルロ法 + ODEで比較
|
|
162
|
+
mcal xxx.cif p --mc --ode
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## 出力
|
|
166
|
+
|
|
167
|
+
### 標準出力
|
|
168
|
+
- 再配列エネルギー
|
|
169
|
+
- 各ペアの移動積分
|
|
170
|
+
- 拡散係数テンソル
|
|
171
|
+
- 移動度テンソル
|
|
172
|
+
- 移動度の固有値と固有ベクトル
|
|
173
|
+
|
|
174
|
+
## 注意事項
|
|
175
|
+
|
|
176
|
+
1. **計算時間**: 分子数とセルサイズによって計算時間は大きく変わります
|
|
177
|
+
2. **メモリ使用量**: 大きなシステムでは十分なメモリを確保してください
|
|
178
|
+
3. **Gaussianのインストール**: Gaussian 09またはGaussian 16が必要です
|
|
179
|
+
4. **依存関係**: 必要なPythonライブラリがすべてインストールされていることを確認してください
|
|
180
|
+
|
|
181
|
+
## トラブルシューティング
|
|
182
|
+
|
|
183
|
+
### 計算が途中で停止した場合
|
|
184
|
+
```bash
|
|
185
|
+
# --resumeオプションで再開
|
|
186
|
+
mcal xxx.cif p --resume
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### メモリ不足エラーの場合
|
|
190
|
+
```bash
|
|
191
|
+
# メモリ量を増やす
|
|
192
|
+
mcal xxx.cif p -m 32
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### 計算時間を短縮するには
|
|
196
|
+
```bash
|
|
197
|
+
# 高速化処理を有効にする(デフォルト)
|
|
198
|
+
mcal xxx.cif p
|
|
199
|
+
|
|
200
|
+
# より小さなスーパーセルを使用して高速計算
|
|
201
|
+
mcal xxx.cif p --cellsize 1
|
|
202
|
+
|
|
203
|
+
# CPU数を増やす
|
|
204
|
+
mcal xxx.cif p -c 16
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
# 著者
|
|
208
|
+
[山形大学 有機エレクトロニクス研究センター (ROEL) 松井研究室](https://matsui-lab.yz.yamagata-u.ac.jp/index.html)
|
|
209
|
+
松井 弘之、尾沢 昂輝
|
|
210
|
+
Email: h-matsui[at]yz.yamagata-u.ac.jp
|
|
211
|
+
[at]を@に置き換えてください
|
|
File without changes
|