phelel 0.6.1__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.
- phelel-0.6.1/LICENSE +28 -0
- phelel-0.6.1/PKG-INFO +181 -0
- phelel-0.6.1/README.md +138 -0
- phelel-0.6.1/pyproject.toml +46 -0
- phelel-0.6.1/setup.cfg +4 -0
- phelel-0.6.1/src/phelel/__init__.py +4 -0
- phelel-0.6.1/src/phelel/api_phelel.py +514 -0
- phelel-0.6.1/src/phelel/base/Dij_qij.py +639 -0
- phelel-0.6.1/src/phelel/base/__init__.py +1 -0
- phelel-0.6.1/src/phelel/base/local_potential.py +1075 -0
- phelel-0.6.1/src/phelel/cui/__init__.py +1 -0
- phelel-0.6.1/src/phelel/cui/create_supercells.py +124 -0
- phelel-0.6.1/src/phelel/cui/load.py +211 -0
- phelel-0.6.1/src/phelel/cui/phelel_argparse.py +180 -0
- phelel-0.6.1/src/phelel/cui/phelel_script.py +288 -0
- phelel-0.6.1/src/phelel/cui/settings.py +158 -0
- phelel-0.6.1/src/phelel/file_IO.py +377 -0
- phelel-0.6.1/src/phelel/interface/__init__.py +1 -0
- phelel-0.6.1/src/phelel/interface/phelel_yaml.py +333 -0
- phelel-0.6.1/src/phelel/interface/vasp/__init__.py +1 -0
- phelel-0.6.1/src/phelel/interface/vasp/derivatives.py +246 -0
- phelel-0.6.1/src/phelel/interface/vasp/file_IO.py +373 -0
- phelel-0.6.1/src/phelel/interface/vasp/procar.py +254 -0
- phelel-0.6.1/src/phelel/interface/vasp/show_data.py +366 -0
- phelel-0.6.1/src/phelel/scripts/phelel.py +6 -0
- phelel-0.6.1/src/phelel/scripts/phelel_load.py +6 -0
- phelel-0.6.1/src/phelel/utils/__init__.py +1 -0
- phelel-0.6.1/src/phelel/utils/data.py +28 -0
- phelel-0.6.1/src/phelel/utils/eliashberg_tool.py +172 -0
- phelel-0.6.1/src/phelel/utils/lattice_points.py +16 -0
- phelel-0.6.1/src/phelel/utils/spherical_harmonics.py +446 -0
- phelel-0.6.1/src/phelel/utils/spinor.py +170 -0
- phelel-0.6.1/src/phelel/velph/__init__.py +5 -0
- phelel-0.6.1/src/phelel/velph/cli/__init__.py +23 -0
- phelel-0.6.1/src/phelel/velph/cli/el_bands/__init__.py +61 -0
- phelel-0.6.1/src/phelel/velph/cli/el_bands/generate.py +101 -0
- phelel-0.6.1/src/phelel/velph/cli/el_bands/plot.py +113 -0
- phelel-0.6.1/src/phelel/velph/cli/generate/__init__.py +61 -0
- phelel-0.6.1/src/phelel/velph/cli/hints/__init__.py +100 -0
- phelel-0.6.1/src/phelel/velph/cli/init/__init__.py +358 -0
- phelel-0.6.1/src/phelel/velph/cli/init/init.py +1375 -0
- phelel-0.6.1/src/phelel/velph/cli/nac/__init__.py +31 -0
- phelel-0.6.1/src/phelel/velph/cli/nac/generate.py +55 -0
- phelel-0.6.1/src/phelel/velph/cli/ph_bands/__init__.py +57 -0
- phelel-0.6.1/src/phelel/velph/cli/ph_bands/generate.py +78 -0
- phelel-0.6.1/src/phelel/velph/cli/ph_bands/plot.py +75 -0
- phelel-0.6.1/src/phelel/velph/cli/phelel/__init__.py +197 -0
- phelel-0.6.1/src/phelel/velph/cli/phelel/differentiate.py +113 -0
- phelel-0.6.1/src/phelel/velph/cli/phelel/generate.py +150 -0
- phelel-0.6.1/src/phelel/velph/cli/phelel/init.py +84 -0
- phelel-0.6.1/src/phelel/velph/cli/phelel/phonopy.py +74 -0
- phelel-0.6.1/src/phelel/velph/cli/phono3py/__init__.py +76 -0
- phelel-0.6.1/src/phelel/velph/cli/phono3py/generate.py +36 -0
- phelel-0.6.1/src/phelel/velph/cli/phono3py/init.py +130 -0
- phelel-0.6.1/src/phelel/velph/cli/relax/__init__.py +46 -0
- phelel-0.6.1/src/phelel/velph/cli/relax/generate.py +69 -0
- phelel-0.6.1/src/phelel/velph/cli/selfenergy/__init__.py +53 -0
- phelel-0.6.1/src/phelel/velph/cli/selfenergy/generate.py +215 -0
- phelel-0.6.1/src/phelel/velph/cli/transport/__init__.py +56 -0
- phelel-0.6.1/src/phelel/velph/cli/transport/generate.py +10 -0
- phelel-0.6.1/src/phelel/velph/cli/transport/plot/__init__.py +156 -0
- phelel-0.6.1/src/phelel/velph/cli/transport/plot/plot_eigenvalues.py +200 -0
- phelel-0.6.1/src/phelel/velph/cli/transport/plot/plot_selfenergy.py +93 -0
- phelel-0.6.1/src/phelel/velph/cli/transport/plot/plot_transport.py +211 -0
- phelel-0.6.1/src/phelel/velph/cli/utils.py +531 -0
- phelel-0.6.1/src/phelel/velph/templates/__init__.py +224 -0
- phelel-0.6.1/src/phelel/velph/utils/__init__.py +1 -0
- phelel-0.6.1/src/phelel/velph/utils/scheduler.py +111 -0
- phelel-0.6.1/src/phelel/velph/utils/vasp.py +412 -0
- phelel-0.6.1/src/phelel/version.py +3 -0
- phelel-0.6.1/src/phelel.egg-info/PKG-INFO +181 -0
- phelel-0.6.1/src/phelel.egg-info/SOURCES.txt +76 -0
- phelel-0.6.1/src/phelel.egg-info/dependency_links.txt +1 -0
- phelel-0.6.1/src/phelel.egg-info/entry_points.txt +4 -0
- phelel-0.6.1/src/phelel.egg-info/requires.txt +5 -0
- phelel-0.6.1/src/phelel.egg-info/top_level.txt +1 -0
- phelel-0.6.1/test/test_api_phelel.py +69 -0
- phelel-0.6.1/test/test_file_IO.py +72 -0
phelel-0.6.1/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024, phonopy
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
phelel-0.6.1/PKG-INFO
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: phelel
|
|
3
|
+
Version: 0.6.1
|
|
4
|
+
Summary: Electron-phonon code.
|
|
5
|
+
Author-email: Atsushi Togo <atztogo@gmail.com>
|
|
6
|
+
License: BSD 3-Clause License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2024, phonopy
|
|
9
|
+
|
|
10
|
+
Redistribution and use in source and binary forms, with or without
|
|
11
|
+
modification, are permitted provided that the following conditions are met:
|
|
12
|
+
|
|
13
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
14
|
+
list of conditions and the following disclaimer.
|
|
15
|
+
|
|
16
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
17
|
+
this list of conditions and the following disclaimer in the documentation
|
|
18
|
+
and/or other materials provided with the distribution.
|
|
19
|
+
|
|
20
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
21
|
+
contributors may be used to endorse or promote products derived from
|
|
22
|
+
this software without specific prior written permission.
|
|
23
|
+
|
|
24
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
25
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
26
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
27
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
28
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
29
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
30
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
31
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
32
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
|
+
|
|
35
|
+
Requires-Python: >=3.9
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
License-File: LICENSE
|
|
38
|
+
Requires-Dist: phono3py
|
|
39
|
+
Requires-Dist: finufft
|
|
40
|
+
Requires-Dist: click
|
|
41
|
+
Requires-Dist: tomli
|
|
42
|
+
Requires-Dist: tomli-w
|
|
43
|
+
|
|
44
|
+
# Phelel
|
|
45
|
+
|
|
46
|
+
A code that provides a few computations related to electron-phonon interaction
|
|
47
|
+
calculation in finite-displacement method reported by
|
|
48
|
+
|
|
49
|
+
Laurent Chaput, Atsushi Togo, and Isao Tanaka, Phys. Rev. B **100**, 174304
|
|
50
|
+
(2019).
|
|
51
|
+
|
|
52
|
+
Note that this code couples with VASP code, and the electron-phonon interaction
|
|
53
|
+
properties can not be computed only using this code.
|
|
54
|
+
|
|
55
|
+
Phelel user documentation is found at
|
|
56
|
+
http://phonopy.github.io/phelel/
|
|
57
|
+
|
|
58
|
+
## Installation
|
|
59
|
+
|
|
60
|
+
### Requirement
|
|
61
|
+
|
|
62
|
+
* phonopy
|
|
63
|
+
* phono3py
|
|
64
|
+
* spglib
|
|
65
|
+
* finufft
|
|
66
|
+
* click
|
|
67
|
+
* tomli
|
|
68
|
+
* tomli-w
|
|
69
|
+
* seekpath (optional)
|
|
70
|
+
|
|
71
|
+
### Installation from source code
|
|
72
|
+
|
|
73
|
+
A simplest installation using conda-forge packages:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
% conda create -n phelel -c conda-forge
|
|
77
|
+
% conda activate phelel
|
|
78
|
+
% conda install -c conda-forge phono3py finufft click tomli tomli-w seekpath
|
|
79
|
+
% git clone https://github.com/phonopy/phelel.git
|
|
80
|
+
% cd phelel
|
|
81
|
+
% pip install -e .
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
PyPI and conda forge package will be made in the future.
|
|
85
|
+
|
|
86
|
+
## Command-line tool: velph
|
|
87
|
+
|
|
88
|
+
### Configuration of shell completion
|
|
89
|
+
|
|
90
|
+
Velph command is a convenient tool to systematically perform electron-phonon
|
|
91
|
+
interaction calculations with VASP code and analyze the results. Velph works in
|
|
92
|
+
combination of command options. The command `velph` is installed along with
|
|
93
|
+
the installation of phelel.
|
|
94
|
+
|
|
95
|
+
Velph relies on click, and shell completion is provided for popular shell implementations, see
|
|
96
|
+
https://click.palletsprojects.com/en/stable/shell-completion/.
|
|
97
|
+
|
|
98
|
+
For example using bash (zsh) in conda environment, write the following line
|
|
99
|
+
|
|
100
|
+
(for bash)
|
|
101
|
+
```
|
|
102
|
+
eval "$(_VELPH_COMPLETE=bash_source velph)"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
(for zsh)
|
|
106
|
+
```
|
|
107
|
+
eval "$(_VELPH_COMPLETE=zsh_source velph)"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
in `~/.bashrc` (`~/.zshrc`), or in a conda environment in
|
|
111
|
+
`$CONDA_PREFIX/etc/conda/activate.d/env_vars.sh`.
|
|
112
|
+
|
|
113
|
+
After setting and reloading the configuration file (e.g., `~/.bashrc`),
|
|
114
|
+
sub-commands are listed by pushing tab key:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
% velph [PUSH-TAB-KEY]
|
|
118
|
+
el_bands -- Choose electronic band structure options.
|
|
119
|
+
generate -- Write POSCAR-unitcell and POSCAR-primitive.
|
|
120
|
+
hints -- Show velph command hints.
|
|
121
|
+
init -- Initialize an electron phonon calculation...
|
|
122
|
+
nac -- Choose nac options.
|
|
123
|
+
ph_bands -- Choose phonon band structure options.
|
|
124
|
+
phelel -- Choose supercell options.
|
|
125
|
+
phono3py -- Choose phono3py options.
|
|
126
|
+
relax -- Choose relax options.
|
|
127
|
+
selfenergy -- Choose selfenergy options.
|
|
128
|
+
transport -- Choose transport options.
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### `velph-hints`
|
|
132
|
+
|
|
133
|
+
This command provides a quick reference of calculation steps.
|
|
134
|
+
|
|
135
|
+
## Development
|
|
136
|
+
|
|
137
|
+
### Formatting
|
|
138
|
+
|
|
139
|
+
Formatting rules are found in `pyproject.toml`.
|
|
140
|
+
|
|
141
|
+
### pre-commit
|
|
142
|
+
|
|
143
|
+
Pre-commit (https://pre-commit.com/) is mainly used for applying the formatting
|
|
144
|
+
rules automatically. Therefore, it is strongly encouraged to use it at or before
|
|
145
|
+
git-commit. Pre-commit is set-up and used in the following way:
|
|
146
|
+
|
|
147
|
+
- Installed by `pip install pre-commit`, `conda install pre_commit` or see
|
|
148
|
+
https://pre-commit.com/#install.
|
|
149
|
+
- pre-commit hook is installed by `pre-commit install`.
|
|
150
|
+
- pre-commit hook is run by `pre-commit run --all-files`.
|
|
151
|
+
|
|
152
|
+
Unless running pre-commit, pre-commit.ci may push the fix at PR by github
|
|
153
|
+
action. In this case, the fix should be merged by the contributor's repository.
|
|
154
|
+
|
|
155
|
+
### VSCode setting
|
|
156
|
+
- Not strictly, but VSCode's `settings.json` may be written like below
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
"ruff.lint.args": [
|
|
160
|
+
"--config=${workspaceFolder}/pyproject.toml",
|
|
161
|
+
],
|
|
162
|
+
"[python]": {
|
|
163
|
+
"editor.defaultFormatter": "charliermarsh.ruff",
|
|
164
|
+
"editor.codeActionsOnSave": {
|
|
165
|
+
"source.organizeImports": "explicit"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## How to run tests
|
|
171
|
+
|
|
172
|
+
Tests are written using pytest. To run tests, pytest has to be installed. The
|
|
173
|
+
tests can be run by
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
% pytest
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## License
|
|
180
|
+
|
|
181
|
+
BSD-3-Clause.
|
phelel-0.6.1/README.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Phelel
|
|
2
|
+
|
|
3
|
+
A code that provides a few computations related to electron-phonon interaction
|
|
4
|
+
calculation in finite-displacement method reported by
|
|
5
|
+
|
|
6
|
+
Laurent Chaput, Atsushi Togo, and Isao Tanaka, Phys. Rev. B **100**, 174304
|
|
7
|
+
(2019).
|
|
8
|
+
|
|
9
|
+
Note that this code couples with VASP code, and the electron-phonon interaction
|
|
10
|
+
properties can not be computed only using this code.
|
|
11
|
+
|
|
12
|
+
Phelel user documentation is found at
|
|
13
|
+
http://phonopy.github.io/phelel/
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
### Requirement
|
|
18
|
+
|
|
19
|
+
* phonopy
|
|
20
|
+
* phono3py
|
|
21
|
+
* spglib
|
|
22
|
+
* finufft
|
|
23
|
+
* click
|
|
24
|
+
* tomli
|
|
25
|
+
* tomli-w
|
|
26
|
+
* seekpath (optional)
|
|
27
|
+
|
|
28
|
+
### Installation from source code
|
|
29
|
+
|
|
30
|
+
A simplest installation using conda-forge packages:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
% conda create -n phelel -c conda-forge
|
|
34
|
+
% conda activate phelel
|
|
35
|
+
% conda install -c conda-forge phono3py finufft click tomli tomli-w seekpath
|
|
36
|
+
% git clone https://github.com/phonopy/phelel.git
|
|
37
|
+
% cd phelel
|
|
38
|
+
% pip install -e .
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
PyPI and conda forge package will be made in the future.
|
|
42
|
+
|
|
43
|
+
## Command-line tool: velph
|
|
44
|
+
|
|
45
|
+
### Configuration of shell completion
|
|
46
|
+
|
|
47
|
+
Velph command is a convenient tool to systematically perform electron-phonon
|
|
48
|
+
interaction calculations with VASP code and analyze the results. Velph works in
|
|
49
|
+
combination of command options. The command `velph` is installed along with
|
|
50
|
+
the installation of phelel.
|
|
51
|
+
|
|
52
|
+
Velph relies on click, and shell completion is provided for popular shell implementations, see
|
|
53
|
+
https://click.palletsprojects.com/en/stable/shell-completion/.
|
|
54
|
+
|
|
55
|
+
For example using bash (zsh) in conda environment, write the following line
|
|
56
|
+
|
|
57
|
+
(for bash)
|
|
58
|
+
```
|
|
59
|
+
eval "$(_VELPH_COMPLETE=bash_source velph)"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
(for zsh)
|
|
63
|
+
```
|
|
64
|
+
eval "$(_VELPH_COMPLETE=zsh_source velph)"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
in `~/.bashrc` (`~/.zshrc`), or in a conda environment in
|
|
68
|
+
`$CONDA_PREFIX/etc/conda/activate.d/env_vars.sh`.
|
|
69
|
+
|
|
70
|
+
After setting and reloading the configuration file (e.g., `~/.bashrc`),
|
|
71
|
+
sub-commands are listed by pushing tab key:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
% velph [PUSH-TAB-KEY]
|
|
75
|
+
el_bands -- Choose electronic band structure options.
|
|
76
|
+
generate -- Write POSCAR-unitcell and POSCAR-primitive.
|
|
77
|
+
hints -- Show velph command hints.
|
|
78
|
+
init -- Initialize an electron phonon calculation...
|
|
79
|
+
nac -- Choose nac options.
|
|
80
|
+
ph_bands -- Choose phonon band structure options.
|
|
81
|
+
phelel -- Choose supercell options.
|
|
82
|
+
phono3py -- Choose phono3py options.
|
|
83
|
+
relax -- Choose relax options.
|
|
84
|
+
selfenergy -- Choose selfenergy options.
|
|
85
|
+
transport -- Choose transport options.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### `velph-hints`
|
|
89
|
+
|
|
90
|
+
This command provides a quick reference of calculation steps.
|
|
91
|
+
|
|
92
|
+
## Development
|
|
93
|
+
|
|
94
|
+
### Formatting
|
|
95
|
+
|
|
96
|
+
Formatting rules are found in `pyproject.toml`.
|
|
97
|
+
|
|
98
|
+
### pre-commit
|
|
99
|
+
|
|
100
|
+
Pre-commit (https://pre-commit.com/) is mainly used for applying the formatting
|
|
101
|
+
rules automatically. Therefore, it is strongly encouraged to use it at or before
|
|
102
|
+
git-commit. Pre-commit is set-up and used in the following way:
|
|
103
|
+
|
|
104
|
+
- Installed by `pip install pre-commit`, `conda install pre_commit` or see
|
|
105
|
+
https://pre-commit.com/#install.
|
|
106
|
+
- pre-commit hook is installed by `pre-commit install`.
|
|
107
|
+
- pre-commit hook is run by `pre-commit run --all-files`.
|
|
108
|
+
|
|
109
|
+
Unless running pre-commit, pre-commit.ci may push the fix at PR by github
|
|
110
|
+
action. In this case, the fix should be merged by the contributor's repository.
|
|
111
|
+
|
|
112
|
+
### VSCode setting
|
|
113
|
+
- Not strictly, but VSCode's `settings.json` may be written like below
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
"ruff.lint.args": [
|
|
117
|
+
"--config=${workspaceFolder}/pyproject.toml",
|
|
118
|
+
],
|
|
119
|
+
"[python]": {
|
|
120
|
+
"editor.defaultFormatter": "charliermarsh.ruff",
|
|
121
|
+
"editor.codeActionsOnSave": {
|
|
122
|
+
"source.organizeImports": "explicit"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## How to run tests
|
|
128
|
+
|
|
129
|
+
Tests are written using pytest. To run tests, pytest has to be installed. The
|
|
130
|
+
tests can be run by
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
% pytest
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## License
|
|
137
|
+
|
|
138
|
+
BSD-3-Clause.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools >= 61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "phelel"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
readme = {file = "README.md", content-type = "text/markdown"}
|
|
9
|
+
description = "Electron-phonon code."
|
|
10
|
+
authors = [
|
|
11
|
+
{name = "Atsushi Togo", email = "atztogo@gmail.com"}
|
|
12
|
+
]
|
|
13
|
+
requires-python = ">=3.9"
|
|
14
|
+
dependencies = [
|
|
15
|
+
"phono3py",
|
|
16
|
+
"finufft",
|
|
17
|
+
"click",
|
|
18
|
+
"tomli",
|
|
19
|
+
"tomli-w"
|
|
20
|
+
]
|
|
21
|
+
license = {file = "LICENSE"}
|
|
22
|
+
|
|
23
|
+
[project.scripts]
|
|
24
|
+
phelel = "phelel.scripts.phelel:run"
|
|
25
|
+
phelel-load = "phelel.scripts.phelel_load:run"
|
|
26
|
+
velph = "phelel.velph.cli:cmd_root"
|
|
27
|
+
|
|
28
|
+
[tool.setuptools.dynamic]
|
|
29
|
+
version = { attr = "phelel.version.__version__" }
|
|
30
|
+
|
|
31
|
+
[tool.ruff]
|
|
32
|
+
line-length = 88
|
|
33
|
+
lint.select = [
|
|
34
|
+
"F", # Flake8
|
|
35
|
+
"B", # Black
|
|
36
|
+
"I", # isort
|
|
37
|
+
"E", # pycodestyle-errors
|
|
38
|
+
"D", # pydocstyle
|
|
39
|
+
]
|
|
40
|
+
lint.extend-ignore = [
|
|
41
|
+
"D417",
|
|
42
|
+
"D100",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
[tool.ruff.lint.pydocstyle]
|
|
46
|
+
convention = "numpy"
|
phelel-0.6.1/setup.cfg
ADDED