phonors 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.
@@ -0,0 +1,31 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ cargo:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v5
13
+ - name: Install Rust toolchain
14
+ uses: dtolnay/rust-toolchain@stable
15
+ with:
16
+ components: rustfmt, clippy
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.13"
21
+ - name: cargo fmt --check
22
+ run: cargo fmt --all -- --check
23
+ - name: cargo clippy
24
+ env:
25
+ PYO3_PYTHON: ${{ env.pythonLocation }}/bin/python
26
+ run: cargo clippy --no-default-features --all-targets -- -D warnings
27
+ - name: cargo test
28
+ env:
29
+ PYO3_PYTHON: ${{ env.pythonLocation }}/bin/python
30
+ LD_LIBRARY_PATH: ${{ env.pythonLocation }}/lib
31
+ run: cargo test --no-default-features
@@ -0,0 +1,96 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ build-wheels:
10
+ name: Wheel ${{ matrix.platform.os }}-${{ matrix.platform.target }}
11
+ runs-on: ${{ matrix.platform.runner }}
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ platform:
16
+ - { os: linux, target: x86_64, runner: ubuntu-latest }
17
+ - { os: linux, target: aarch64, runner: ubuntu-latest }
18
+ - { os: macos, target: x86_64, runner: macos-14 }
19
+ - { os: macos, target: aarch64, runner: macos-14 }
20
+ - { os: windows, target: x86_64, runner: windows-latest }
21
+ steps:
22
+ - uses: actions/checkout@v5
23
+ - uses: actions/setup-python@v5
24
+ with:
25
+ python-version: "3.13"
26
+ - name: Build wheel
27
+ uses: PyO3/maturin-action@v1
28
+ with:
29
+ target: ${{ matrix.platform.target }}
30
+ args: --release --out dist
31
+ manylinux: auto
32
+ sccache: "true"
33
+ - name: Upload wheel artifact
34
+ uses: actions/upload-artifact@v4
35
+ with:
36
+ name: wheel-${{ matrix.platform.os }}-${{ matrix.platform.target }}
37
+ path: dist/
38
+
39
+ build-sdist:
40
+ name: Source distribution
41
+ runs-on: ubuntu-latest
42
+ steps:
43
+ - uses: actions/checkout@v5
44
+ - name: Build sdist
45
+ uses: PyO3/maturin-action@v1
46
+ with:
47
+ command: sdist
48
+ args: --out dist
49
+ - name: Upload sdist artifact
50
+ uses: actions/upload-artifact@v4
51
+ with:
52
+ name: sdist
53
+ path: dist/
54
+
55
+ publish-testpypi:
56
+ name: Publish to TestPyPI
57
+ if: github.event_name == 'workflow_dispatch'
58
+ needs: [build-wheels, build-sdist]
59
+ runs-on: ubuntu-latest
60
+ environment:
61
+ name: testpypi
62
+ url: https://test.pypi.org/p/phonors
63
+ permissions:
64
+ id-token: write
65
+ steps:
66
+ - name: Download all artifacts
67
+ uses: actions/download-artifact@v4
68
+ with:
69
+ path: dist
70
+ merge-multiple: true
71
+ - name: Publish to TestPyPI
72
+ uses: pypa/gh-action-pypi-publish@release/v1
73
+ with:
74
+ repository-url: https://test.pypi.org/legacy/
75
+ packages-dir: dist
76
+
77
+ publish-pypi:
78
+ name: Publish to PyPI
79
+ if: startsWith(github.ref, 'refs/tags/v')
80
+ needs: [build-wheels, build-sdist]
81
+ runs-on: ubuntu-latest
82
+ environment:
83
+ name: pypi
84
+ url: https://pypi.org/p/phonors
85
+ permissions:
86
+ id-token: write
87
+ steps:
88
+ - name: Download all artifacts
89
+ uses: actions/download-artifact@v4
90
+ with:
91
+ path: dist
92
+ merge-multiple: true
93
+ - name: Publish to PyPI
94
+ uses: pypa/gh-action-pypi-publish@release/v1
95
+ with:
96
+ packages-dir: dist
@@ -0,0 +1,21 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ debug
4
+ target
5
+
6
+ # These are backup files generated by rustfmt
7
+ **/*.rs.bk
8
+
9
+ # MSVC Windows builds of rustc generate these, which store debugging information
10
+ *.pdb
11
+
12
+ # Generated by cargo mutants
13
+ # Contains mutation testing data
14
+ **/mutants.out*/
15
+
16
+ # RustRover
17
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
18
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
19
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
20
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
21
+ #.idea/
@@ -0,0 +1,17 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v5.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: check-yaml
8
+ - id: check-toml
9
+
10
+ - repo: local
11
+ hooks:
12
+ - id: cargo-fmt
13
+ name: cargo fmt
14
+ entry: cargo fmt --all -- --check
15
+ language: system
16
+ types: [rust]
17
+ pass_filenames: false
@@ -0,0 +1,19 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.1.0] - 2026-05-10
11
+
12
+ Initial public release. Provides the Rust kernel set used by
13
+ [phonopy](https://github.com/phonopy/phonopy) and
14
+ [phono3py](https://github.com/phonopy/phono3py). Distributed as
15
+ `abi3-py310` wheels for Linux x86_64 / aarch64, macOS x86_64 /
16
+ arm64, and Windows x86_64.
17
+
18
+ [Unreleased]: https://github.com/phonopy/phonors/compare/v0.1.0...HEAD
19
+ [0.1.0]: https://github.com/phonopy/phonors/releases/tag/v0.1.0
@@ -0,0 +1,281 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 3
4
+
5
+ [[package]]
6
+ name = "autocfg"
7
+ version = "1.5.0"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
10
+
11
+ [[package]]
12
+ name = "crossbeam-deque"
13
+ version = "0.8.6"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
16
+ dependencies = [
17
+ "crossbeam-epoch",
18
+ "crossbeam-utils",
19
+ ]
20
+
21
+ [[package]]
22
+ name = "crossbeam-epoch"
23
+ version = "0.9.18"
24
+ source = "registry+https://github.com/rust-lang/crates.io-index"
25
+ checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
26
+ dependencies = [
27
+ "crossbeam-utils",
28
+ ]
29
+
30
+ [[package]]
31
+ name = "crossbeam-utils"
32
+ version = "0.8.21"
33
+ source = "registry+https://github.com/rust-lang/crates.io-index"
34
+ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
35
+
36
+ [[package]]
37
+ name = "either"
38
+ version = "1.15.0"
39
+ source = "registry+https://github.com/rust-lang/crates.io-index"
40
+ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
41
+
42
+ [[package]]
43
+ name = "heck"
44
+ version = "0.5.0"
45
+ source = "registry+https://github.com/rust-lang/crates.io-index"
46
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
47
+
48
+ [[package]]
49
+ name = "libc"
50
+ version = "0.2.185"
51
+ source = "registry+https://github.com/rust-lang/crates.io-index"
52
+ checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f"
53
+
54
+ [[package]]
55
+ name = "matrixmultiply"
56
+ version = "0.3.10"
57
+ source = "registry+https://github.com/rust-lang/crates.io-index"
58
+ checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08"
59
+ dependencies = [
60
+ "autocfg",
61
+ "rawpointer",
62
+ ]
63
+
64
+ [[package]]
65
+ name = "ndarray"
66
+ version = "0.16.1"
67
+ source = "registry+https://github.com/rust-lang/crates.io-index"
68
+ checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841"
69
+ dependencies = [
70
+ "matrixmultiply",
71
+ "num-complex",
72
+ "num-integer",
73
+ "num-traits",
74
+ "portable-atomic",
75
+ "portable-atomic-util",
76
+ "rawpointer",
77
+ ]
78
+
79
+ [[package]]
80
+ name = "num-complex"
81
+ version = "0.4.6"
82
+ source = "registry+https://github.com/rust-lang/crates.io-index"
83
+ checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
84
+ dependencies = [
85
+ "num-traits",
86
+ ]
87
+
88
+ [[package]]
89
+ name = "num-integer"
90
+ version = "0.1.46"
91
+ source = "registry+https://github.com/rust-lang/crates.io-index"
92
+ checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
93
+ dependencies = [
94
+ "num-traits",
95
+ ]
96
+
97
+ [[package]]
98
+ name = "num-traits"
99
+ version = "0.2.19"
100
+ source = "registry+https://github.com/rust-lang/crates.io-index"
101
+ checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
102
+ dependencies = [
103
+ "autocfg",
104
+ ]
105
+
106
+ [[package]]
107
+ name = "numpy"
108
+ version = "0.28.0"
109
+ source = "registry+https://github.com/rust-lang/crates.io-index"
110
+ checksum = "778da78c64ddc928ebf5ad9df5edf0789410ff3bdbf3619aed51cd789a6af1e2"
111
+ dependencies = [
112
+ "libc",
113
+ "ndarray",
114
+ "num-complex",
115
+ "num-integer",
116
+ "num-traits",
117
+ "pyo3",
118
+ "pyo3-build-config",
119
+ "rustc-hash",
120
+ ]
121
+
122
+ [[package]]
123
+ name = "once_cell"
124
+ version = "1.21.4"
125
+ source = "registry+https://github.com/rust-lang/crates.io-index"
126
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
127
+
128
+ [[package]]
129
+ name = "phonors"
130
+ version = "0.1.0"
131
+ dependencies = [
132
+ "numpy",
133
+ "pyo3",
134
+ "rayon",
135
+ ]
136
+
137
+ [[package]]
138
+ name = "portable-atomic"
139
+ version = "1.13.1"
140
+ source = "registry+https://github.com/rust-lang/crates.io-index"
141
+ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
142
+
143
+ [[package]]
144
+ name = "portable-atomic-util"
145
+ version = "0.2.6"
146
+ source = "registry+https://github.com/rust-lang/crates.io-index"
147
+ checksum = "091397be61a01d4be58e7841595bd4bfedb15f1cd54977d79b8271e94ed799a3"
148
+ dependencies = [
149
+ "portable-atomic",
150
+ ]
151
+
152
+ [[package]]
153
+ name = "proc-macro2"
154
+ version = "1.0.106"
155
+ source = "registry+https://github.com/rust-lang/crates.io-index"
156
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
157
+ dependencies = [
158
+ "unicode-ident",
159
+ ]
160
+
161
+ [[package]]
162
+ name = "pyo3"
163
+ version = "0.28.3"
164
+ source = "registry+https://github.com/rust-lang/crates.io-index"
165
+ checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
166
+ dependencies = [
167
+ "libc",
168
+ "once_cell",
169
+ "portable-atomic",
170
+ "pyo3-build-config",
171
+ "pyo3-ffi",
172
+ "pyo3-macros",
173
+ ]
174
+
175
+ [[package]]
176
+ name = "pyo3-build-config"
177
+ version = "0.28.3"
178
+ source = "registry+https://github.com/rust-lang/crates.io-index"
179
+ checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
180
+ dependencies = [
181
+ "target-lexicon",
182
+ ]
183
+
184
+ [[package]]
185
+ name = "pyo3-ffi"
186
+ version = "0.28.3"
187
+ source = "registry+https://github.com/rust-lang/crates.io-index"
188
+ checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
189
+ dependencies = [
190
+ "libc",
191
+ "pyo3-build-config",
192
+ ]
193
+
194
+ [[package]]
195
+ name = "pyo3-macros"
196
+ version = "0.28.3"
197
+ source = "registry+https://github.com/rust-lang/crates.io-index"
198
+ checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
199
+ dependencies = [
200
+ "proc-macro2",
201
+ "pyo3-macros-backend",
202
+ "quote",
203
+ "syn",
204
+ ]
205
+
206
+ [[package]]
207
+ name = "pyo3-macros-backend"
208
+ version = "0.28.3"
209
+ source = "registry+https://github.com/rust-lang/crates.io-index"
210
+ checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
211
+ dependencies = [
212
+ "heck",
213
+ "proc-macro2",
214
+ "pyo3-build-config",
215
+ "quote",
216
+ "syn",
217
+ ]
218
+
219
+ [[package]]
220
+ name = "quote"
221
+ version = "1.0.45"
222
+ source = "registry+https://github.com/rust-lang/crates.io-index"
223
+ checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
224
+ dependencies = [
225
+ "proc-macro2",
226
+ ]
227
+
228
+ [[package]]
229
+ name = "rawpointer"
230
+ version = "0.2.1"
231
+ source = "registry+https://github.com/rust-lang/crates.io-index"
232
+ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
233
+
234
+ [[package]]
235
+ name = "rayon"
236
+ version = "1.12.0"
237
+ source = "registry+https://github.com/rust-lang/crates.io-index"
238
+ checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"
239
+ dependencies = [
240
+ "either",
241
+ "rayon-core",
242
+ ]
243
+
244
+ [[package]]
245
+ name = "rayon-core"
246
+ version = "1.13.0"
247
+ source = "registry+https://github.com/rust-lang/crates.io-index"
248
+ checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
249
+ dependencies = [
250
+ "crossbeam-deque",
251
+ "crossbeam-utils",
252
+ ]
253
+
254
+ [[package]]
255
+ name = "rustc-hash"
256
+ version = "2.1.2"
257
+ source = "registry+https://github.com/rust-lang/crates.io-index"
258
+ checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
259
+
260
+ [[package]]
261
+ name = "syn"
262
+ version = "2.0.117"
263
+ source = "registry+https://github.com/rust-lang/crates.io-index"
264
+ checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
265
+ dependencies = [
266
+ "proc-macro2",
267
+ "quote",
268
+ "unicode-ident",
269
+ ]
270
+
271
+ [[package]]
272
+ name = "target-lexicon"
273
+ version = "0.13.5"
274
+ source = "registry+https://github.com/rust-lang/crates.io-index"
275
+ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
276
+
277
+ [[package]]
278
+ name = "unicode-ident"
279
+ version = "1.0.24"
280
+ source = "registry+https://github.com/rust-lang/crates.io-index"
281
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
@@ -0,0 +1,42 @@
1
+ [package]
2
+ name = "phonors"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+ rust-version = "1.75"
6
+ description = "Rust kernels for phonopy and phono3py"
7
+ license = "BSD-3-Clause"
8
+ repository = "https://github.com/phonopy/phonors"
9
+ homepage = "https://github.com/phonopy/phonors"
10
+ readme = "README.md"
11
+ keywords = ["phonon", "phonopy", "phono3py", "lattice-dynamics"]
12
+ categories = ["science"]
13
+
14
+ [lib]
15
+ name = "phonors"
16
+ crate-type = ["cdylib", "rlib"]
17
+
18
+ [features]
19
+ default = ["extension-module"]
20
+ extension-module = ["pyo3/extension-module"]
21
+
22
+ [dependencies]
23
+ pyo3 = { version = "0.28", features = ["abi3-py310"] }
24
+ numpy = "0.28"
25
+ rayon = "1"
26
+
27
+ [lints.clippy]
28
+ # Numeric kernels favour explicit `for i in 0..n` loops with multi-dimensional
29
+ # indexing over iterator chains; readability outweighs the lint.
30
+ needless_range_loop = "allow"
31
+ # PyO3 / numpy bridge functions frequently exceed clippy's 7-argument heuristic.
32
+ too_many_arguments = "allow"
33
+ # Kernel return / scratch types are intentionally tuples of arrays.
34
+ type_complexity = "allow"
35
+
36
+ [profile.release]
37
+ lto = "thin"
38
+ codegen-units = 1
39
+
40
+ [profile.release-with-debug]
41
+ inherits = "release"
42
+ debug = true
phonors-0.1.0/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, 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.
phonors-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,81 @@
1
+ Metadata-Version: 2.4
2
+ Name: phonors
3
+ Version: 0.1.0
4
+ Classifier: Development Status :: 4 - Beta
5
+ Classifier: Intended Audience :: Science/Research
6
+ Classifier: Operating System :: OS Independent
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3 :: Only
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Rust
14
+ Classifier: Topic :: Scientific/Engineering :: Physics
15
+ License-File: LICENSE
16
+ Summary: Rust kernels for phonopy and phono3py
17
+ Home-Page: https://github.com/phonopy/phonors
18
+ Author-email: Atsushi Togo <atztogo@gmail.com>
19
+ License-Expression: BSD-3-Clause
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ Project-URL: Changelog, https://github.com/phonopy/phonors/blob/main/CHANGELOG.md
23
+ Project-URL: Homepage, https://github.com/phonopy/phonors
24
+ Project-URL: Issues, https://github.com/phonopy/phonors/issues
25
+ Project-URL: Repository, https://github.com/phonopy/phonors
26
+
27
+ # phonors
28
+
29
+ Rust kernels for phonopy and phono3py.
30
+
31
+ `phonors` is a Rust extension module providing the heavy numerical
32
+ kernels used by [phono3py](https://github.com/phonopy/phono3py)
33
+ (via the `phono3py[rust]` extra) and intended to also back
34
+ [phonopy](https://github.com/phonopy/phonopy) as its C kernels are
35
+ ported. It is built with [maturin](https://www.maturin.rs/) and
36
+ [PyO3](https://pyo3.rs/), distributed as `abi3-py310` wheels
37
+ (Python 3.10+).
38
+
39
+ ## Installation
40
+
41
+ ### From PyPI
42
+
43
+ ```bash
44
+ pip install phonors
45
+ ```
46
+
47
+ ### From conda-forge
48
+
49
+ ```bash
50
+ conda install -c conda-forge phonors
51
+ ```
52
+
53
+ ## Development
54
+
55
+ For local development, build and install the extension in editable
56
+ mode against the active Python environment:
57
+
58
+ ```bash
59
+ maturin develop --release
60
+ ```
61
+
62
+ `maturin develop` installs the `phonors` extension into the active
63
+ environment; from then on, `import phonors` from anywhere hits the
64
+ editable build. Re-run after Rust changes.
65
+
66
+ ### Optional: native CPU tuning
67
+
68
+ By default, `maturin develop --release` builds with the Rust baseline
69
+ target (x86-64 v1 on x86_64, Armv8.0 on aarch64), so the resulting
70
+ module runs on any CPU of that architecture. For a local build that
71
+ will only run on the current machine, enabling the host CPU's full
72
+ instruction set can recover a few percent of wall-clock:
73
+
74
+ ```bash
75
+ RUSTFLAGS='-C target-cpu=native' maturin develop --release
76
+ ```
77
+
78
+ ## License
79
+
80
+ BSD-3-Clause. See [LICENSE](LICENSE).
81
+
@@ -0,0 +1,54 @@
1
+ # phonors
2
+
3
+ Rust kernels for phonopy and phono3py.
4
+
5
+ `phonors` is a Rust extension module providing the heavy numerical
6
+ kernels used by [phono3py](https://github.com/phonopy/phono3py)
7
+ (via the `phono3py[rust]` extra) and intended to also back
8
+ [phonopy](https://github.com/phonopy/phonopy) as its C kernels are
9
+ ported. It is built with [maturin](https://www.maturin.rs/) and
10
+ [PyO3](https://pyo3.rs/), distributed as `abi3-py310` wheels
11
+ (Python 3.10+).
12
+
13
+ ## Installation
14
+
15
+ ### From PyPI
16
+
17
+ ```bash
18
+ pip install phonors
19
+ ```
20
+
21
+ ### From conda-forge
22
+
23
+ ```bash
24
+ conda install -c conda-forge phonors
25
+ ```
26
+
27
+ ## Development
28
+
29
+ For local development, build and install the extension in editable
30
+ mode against the active Python environment:
31
+
32
+ ```bash
33
+ maturin develop --release
34
+ ```
35
+
36
+ `maturin develop` installs the `phonors` extension into the active
37
+ environment; from then on, `import phonors` from anywhere hits the
38
+ editable build. Re-run after Rust changes.
39
+
40
+ ### Optional: native CPU tuning
41
+
42
+ By default, `maturin develop --release` builds with the Rust baseline
43
+ target (x86-64 v1 on x86_64, Armv8.0 on aarch64), so the resulting
44
+ module runs on any CPU of that architecture. For a local build that
45
+ will only run on the current machine, enabling the host CPU's full
46
+ instruction set can recover a few percent of wall-clock:
47
+
48
+ ```bash
49
+ RUSTFLAGS='-C target-cpu=native' maturin develop --release
50
+ ```
51
+
52
+ ## License
53
+
54
+ BSD-3-Clause. See [LICENSE](LICENSE).