rust-simulation-tools 0.1.11__tar.gz → 0.2.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.
Files changed (47) hide show
  1. {rust_simulation_tools-0.1.11 → rust_simulation_tools-0.2.0}/.github/workflows/build.yml +42 -33
  2. {rust_simulation_tools-0.1.11 → rust_simulation_tools-0.2.0}/Cargo.lock +24 -141
  3. {rust_simulation_tools-0.1.11 → rust_simulation_tools-0.2.0}/Cargo.toml +5 -4
  4. rust_simulation_tools-0.2.0/PKG-INFO +118 -0
  5. rust_simulation_tools-0.2.0/README.md +106 -0
  6. {rust_simulation_tools-0.1.11 → rust_simulation_tools-0.2.0}/benchmarks/bench_sasa.py +14 -26
  7. rust_simulation_tools-0.2.0/examples/example_align.py +36 -0
  8. rust_simulation_tools-0.2.0/examples/example_amber.py +30 -0
  9. rust_simulation_tools-0.2.0/examples/example_dcd.py +39 -0
  10. rust_simulation_tools-0.2.0/examples/example_fingerprint.py +60 -0
  11. rust_simulation_tools-0.2.0/examples/example_sasa.py +44 -0
  12. rust_simulation_tools-0.2.0/examples/example_unwrap.py +35 -0
  13. {rust_simulation_tools-0.1.11 → rust_simulation_tools-0.2.0}/pyproject.toml +1 -1
  14. rust_simulation_tools-0.2.0/src/amber/inpcrd.rs +202 -0
  15. rust_simulation_tools-0.2.0/src/amber/mod.rs +8 -0
  16. rust_simulation_tools-0.2.0/src/amber/prmtop.rs +446 -0
  17. rust_simulation_tools-0.2.0/src/fingerprint.rs +424 -0
  18. rust_simulation_tools-0.2.0/src/kabsch.rs +257 -0
  19. rust_simulation_tools-0.2.0/src/lib.rs +42 -0
  20. {rust_simulation_tools-0.1.11 → rust_simulation_tools-0.2.0}/src/sasa.rs +87 -185
  21. rust_simulation_tools-0.2.0/src/trajectory/dcd.rs +643 -0
  22. rust_simulation_tools-0.2.0/src/trajectory/mod.rs +6 -0
  23. rust_simulation_tools-0.2.0/src/util.rs +144 -0
  24. rust_simulation_tools-0.2.0/src/wrapping.rs +296 -0
  25. rust_simulation_tools-0.2.0/tests/test_amber.py +300 -0
  26. rust_simulation_tools-0.2.0/tests/test_dcd.py +374 -0
  27. rust_simulation_tools-0.2.0/tests/test_fingerprint.py +397 -0
  28. rust_simulation_tools-0.2.0/tests/test_sasa.py +347 -0
  29. rust_simulation_tools-0.2.0/tests/test_unwrap.py +171 -0
  30. rust_simulation_tools-0.1.11/PKG-INFO +0 -102
  31. rust_simulation_tools-0.1.11/README.md +0 -90
  32. rust_simulation_tools-0.1.11/examples/example_align.py +0 -80
  33. rust_simulation_tools-0.1.11/examples/example_sasa.py +0 -184
  34. rust_simulation_tools-0.1.11/examples/example_unwrap.py +0 -65
  35. rust_simulation_tools-0.1.11/src/kabsch.rs +0 -219
  36. rust_simulation_tools-0.1.11/src/lib.rs +0 -19
  37. rust_simulation_tools-0.1.11/src/wrapping.rs +0 -166
  38. rust_simulation_tools-0.1.11/tests/test_sasa.py +0 -390
  39. rust_simulation_tools-0.1.11/tests/test_unwrap.py +0 -358
  40. {rust_simulation_tools-0.1.11 → rust_simulation_tools-0.2.0}/.gitignore +0 -0
  41. {rust_simulation_tools-0.1.11 → rust_simulation_tools-0.2.0}/benchmarks/bench_kabsch.py +0 -0
  42. {rust_simulation_tools-0.1.11 → rust_simulation_tools-0.2.0}/benchmarks/bench_unwrap.py +0 -0
  43. {rust_simulation_tools-0.1.11 → rust_simulation_tools-0.2.0}/data/aligned.dcd +0 -0
  44. {rust_simulation_tools-0.1.11 → rust_simulation_tools-0.2.0}/data/topology.pdb +0 -0
  45. {rust_simulation_tools-0.1.11 → rust_simulation_tools-0.2.0}/data/trajectory.dcd +0 -0
  46. {rust_simulation_tools-0.1.11 → rust_simulation_tools-0.2.0}/tests/.coverage +0 -0
  47. {rust_simulation_tools-0.1.11 → rust_simulation_tools-0.2.0}/tests/test_kabsch.py +0 -0
@@ -11,45 +11,45 @@ on:
11
11
 
12
12
  jobs:
13
13
  test:
14
- name: Test on ${{ matrix.os }}
14
+ name: Test on ${{ matrix.os }} / Python ${{ matrix.python-version }}
15
15
  runs-on: ${{ matrix.os }}
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
19
  os: [ubuntu-latest, macos-latest, windows-latest]
20
- python-version: ['3.9', '3.10', '3.11', '3.12']
20
+ python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
21
21
 
22
22
  steps:
23
23
  - uses: actions/checkout@v4
24
-
24
+
25
25
  - name: Set up Python ${{ matrix.python-version }}
26
- uses: actions/setup-python@v4
26
+ uses: actions/setup-python@v5
27
27
  with:
28
28
  python-version: ${{ matrix.python-version }}
29
-
29
+
30
30
  - name: Install Rust
31
31
  uses: dtolnay/rust-toolchain@stable
32
-
32
+
33
33
  - name: Cache Rust dependencies
34
- uses: actions/cache@v3
34
+ uses: actions/cache@v4
35
35
  with:
36
36
  path: |
37
37
  ~/.cargo/registry
38
38
  ~/.cargo/git
39
39
  target
40
40
  key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
41
-
41
+
42
42
  - name: Install Python dependencies
43
43
  run: |
44
44
  python -m pip install --upgrade pip
45
45
  pip install maturin pytest pytest-cov numpy coverage
46
-
46
+
47
47
  - name: Build package
48
48
  run: maturin build --release --out dist
49
49
 
50
50
  - name: Install package
51
51
  run: pip install --no-index --find-links dist rust_simulation_tools
52
-
52
+
53
53
  - name: Run tests with coverage
54
54
  run: |
55
55
  pytest tests/ -v --cov=rust_simulation_tools --cov-report=xml --cov-report=term
@@ -57,34 +57,34 @@ jobs:
57
57
  lint:
58
58
  name: Lint and format checks
59
59
  runs-on: ubuntu-latest
60
-
60
+
61
61
  steps:
62
62
  - uses: actions/checkout@v4
63
-
63
+
64
64
  - name: Install Rust
65
65
  uses: dtolnay/rust-toolchain@stable
66
66
  with:
67
67
  components: rustfmt, clippy
68
-
68
+
69
69
  - name: Check Rust formatting
70
70
  run: cargo fmt -- --check
71
-
71
+
72
72
  - name: Run Clippy
73
73
  run: cargo clippy -- -D warnings
74
-
74
+
75
75
  - name: Set up Python
76
- uses: actions/setup-python@v4
76
+ uses: actions/setup-python@v5
77
77
  with:
78
78
  python-version: '3.11'
79
-
79
+
80
80
  - name: Install Python linting tools
81
81
  run: |
82
82
  pip install black flake8 mypy
83
-
83
+
84
84
  - name: Check Python formatting with black
85
85
  run: black --check tests/ examples/
86
86
  continue-on-error: true
87
-
87
+
88
88
  - name: Run flake8
89
89
  run: flake8 tests/ examples/ --max-line-length=100
90
90
  continue-on-error: true
@@ -95,28 +95,34 @@ jobs:
95
95
  needs: [test]
96
96
  strategy:
97
97
  matrix:
98
- os: [ubuntu-latest, macos-latest, windows-latest]
98
+ include:
99
+ - os: ubuntu-latest
100
+ target: x86_64
101
+ - os: macos-14
102
+ target: aarch64
103
+ - os: windows-latest
104
+ target: x86_64
99
105
 
100
106
  steps:
101
107
  - uses: actions/checkout@v4
102
-
103
- - uses: actions/setup-python@v4
108
+
109
+ - uses: actions/setup-python@v5
104
110
  with:
105
111
  python-version: '3.11'
106
-
112
+
107
113
  - name: Install Rust
108
114
  uses: dtolnay/rust-toolchain@stable
109
-
115
+
110
116
  - name: Build wheels
111
117
  uses: PyO3/maturin-action@v1
112
118
  with:
113
- args: --release --out dist --interpreter 3.9 3.10 3.11 3.12
119
+ args: --release --out dist --interpreter 3.9 3.10 3.11 3.12 3.13
114
120
  manylinux: auto
115
-
121
+
116
122
  - name: Upload wheels
117
123
  uses: actions/upload-artifact@v4
118
124
  with:
119
- name: wheels-${{ matrix.os }}
125
+ name: wheels-${{ matrix.os }}-${{ matrix.target }}
120
126
  path: dist/*.whl
121
127
  retention-days: 30
122
128
 
@@ -124,16 +130,16 @@ jobs:
124
130
  name: Build source distribution
125
131
  runs-on: ubuntu-latest
126
132
  needs: [test]
127
-
133
+
128
134
  steps:
129
135
  - uses: actions/checkout@v4
130
-
136
+
131
137
  - name: Build sdist
132
138
  uses: PyO3/maturin-action@v1
133
139
  with:
134
140
  command: sdist
135
141
  args: --out dist
136
-
142
+
137
143
  - name: Upload sdist
138
144
  uses: actions/upload-artifact@v4
139
145
  with:
@@ -146,18 +152,21 @@ jobs:
146
152
  runs-on: ubuntu-latest
147
153
  if: startsWith(github.ref, 'refs/tags/v')
148
154
  needs: [test, build-wheels, build-sdist]
149
-
155
+ permissions:
156
+ id-token: write
157
+
150
158
  steps:
151
159
  - uses: actions/download-artifact@v4
152
160
  with:
153
161
  path: dist
154
-
162
+
155
163
  - name: Flatten directory structure
156
164
  run: |
157
165
  mkdir -p final_dist
158
166
  find dist -name '*.whl' -exec cp {} final_dist/ \;
159
167
  find dist -name '*.tar.gz' -exec cp {} final_dist/ \;
160
-
168
+ ls -la final_dist/
169
+
161
170
  - name: Publish to PyPI
162
171
  uses: PyO3/maturin-action@v1
163
172
  env:
@@ -17,12 +17,6 @@ version = "1.5.0"
17
17
  source = "registry+https://github.com/rust-lang/crates.io-index"
18
18
  checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
19
19
 
20
- [[package]]
21
- name = "bitflags"
22
- version = "2.9.4"
23
- source = "registry+https://github.com/rust-lang/crates.io-index"
24
- checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394"
25
-
26
20
  [[package]]
27
21
  name = "bytemuck"
28
22
  version = "1.23.2"
@@ -68,9 +62,9 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
68
62
 
69
63
  [[package]]
70
64
  name = "heck"
71
- version = "0.4.1"
65
+ version = "0.5.0"
72
66
  source = "registry+https://github.com/rust-lang/crates.io-index"
73
- checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
67
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
74
68
 
75
69
  [[package]]
76
70
  name = "indoc"
@@ -84,16 +78,6 @@ version = "0.2.176"
84
78
  source = "registry+https://github.com/rust-lang/crates.io-index"
85
79
  checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174"
86
80
 
87
- [[package]]
88
- name = "lock_api"
89
- version = "0.4.13"
90
- source = "registry+https://github.com/rust-lang/crates.io-index"
91
- checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765"
92
- dependencies = [
93
- "autocfg",
94
- "scopeguard",
95
- ]
96
-
97
81
  [[package]]
98
82
  name = "matrixmultiply"
99
83
  version = "0.3.10"
@@ -192,9 +176,9 @@ dependencies = [
192
176
 
193
177
  [[package]]
194
178
  name = "numpy"
195
- version = "0.20.0"
179
+ version = "0.22.1"
196
180
  source = "registry+https://github.com/rust-lang/crates.io-index"
197
- checksum = "bef41cbb417ea83b30525259e30ccef6af39b31c240bda578889494c5392d331"
181
+ checksum = "edb929bc0da91a4d85ed6c0a84deaa53d411abfb387fc271124f91bf6b89f14e"
198
182
  dependencies = [
199
183
  "libc",
200
184
  "ndarray",
@@ -202,7 +186,7 @@ dependencies = [
202
186
  "num-integer",
203
187
  "num-traits",
204
188
  "pyo3",
205
- "rustc-hash",
189
+ "rustc-hash 1.1.0",
206
190
  ]
207
191
 
208
192
  [[package]]
@@ -211,29 +195,6 @@ version = "1.21.3"
211
195
  source = "registry+https://github.com/rust-lang/crates.io-index"
212
196
  checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
213
197
 
214
- [[package]]
215
- name = "parking_lot"
216
- version = "0.12.4"
217
- source = "registry+https://github.com/rust-lang/crates.io-index"
218
- checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13"
219
- dependencies = [
220
- "lock_api",
221
- "parking_lot_core",
222
- ]
223
-
224
- [[package]]
225
- name = "parking_lot_core"
226
- version = "0.9.11"
227
- source = "registry+https://github.com/rust-lang/crates.io-index"
228
- checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5"
229
- dependencies = [
230
- "cfg-if",
231
- "libc",
232
- "redox_syscall",
233
- "smallvec",
234
- "windows-targets",
235
- ]
236
-
237
198
  [[package]]
238
199
  name = "paste"
239
200
  version = "1.0.15"
@@ -257,15 +218,15 @@ dependencies = [
257
218
 
258
219
  [[package]]
259
220
  name = "pyo3"
260
- version = "0.20.3"
221
+ version = "0.22.6"
261
222
  source = "registry+https://github.com/rust-lang/crates.io-index"
262
- checksum = "53bdbb96d49157e65d45cc287af5f32ffadd5f4761438b527b055fb0d4bb8233"
223
+ checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884"
263
224
  dependencies = [
264
225
  "cfg-if",
265
226
  "indoc",
266
227
  "libc",
267
228
  "memoffset",
268
- "parking_lot",
229
+ "once_cell",
269
230
  "portable-atomic",
270
231
  "pyo3-build-config",
271
232
  "pyo3-ffi",
@@ -275,9 +236,9 @@ dependencies = [
275
236
 
276
237
  [[package]]
277
238
  name = "pyo3-build-config"
278
- version = "0.20.3"
239
+ version = "0.22.6"
279
240
  source = "registry+https://github.com/rust-lang/crates.io-index"
280
- checksum = "deaa5745de3f5231ce10517a1f5dd97d53e5a2fd77aa6b5842292085831d48d7"
241
+ checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38"
281
242
  dependencies = [
282
243
  "once_cell",
283
244
  "target-lexicon",
@@ -285,9 +246,9 @@ dependencies = [
285
246
 
286
247
  [[package]]
287
248
  name = "pyo3-ffi"
288
- version = "0.20.3"
249
+ version = "0.22.6"
289
250
  source = "registry+https://github.com/rust-lang/crates.io-index"
290
- checksum = "62b42531d03e08d4ef1f6e85a2ed422eb678b8cd62b762e53891c05faf0d4afa"
251
+ checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636"
291
252
  dependencies = [
292
253
  "libc",
293
254
  "pyo3-build-config",
@@ -295,9 +256,9 @@ dependencies = [
295
256
 
296
257
  [[package]]
297
258
  name = "pyo3-macros"
298
- version = "0.20.3"
259
+ version = "0.22.6"
299
260
  source = "registry+https://github.com/rust-lang/crates.io-index"
300
- checksum = "7305c720fa01b8055ec95e484a6eca7a83c841267f0dd5280f0c8b8551d2c158"
261
+ checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453"
301
262
  dependencies = [
302
263
  "proc-macro2",
303
264
  "pyo3-macros-backend",
@@ -307,9 +268,9 @@ dependencies = [
307
268
 
308
269
  [[package]]
309
270
  name = "pyo3-macros-backend"
310
- version = "0.20.3"
271
+ version = "0.22.6"
311
272
  source = "registry+https://github.com/rust-lang/crates.io-index"
312
- checksum = "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185"
273
+ checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe"
313
274
  dependencies = [
314
275
  "heck",
315
276
  "proc-macro2",
@@ -353,24 +314,16 @@ dependencies = [
353
314
  "crossbeam-utils",
354
315
  ]
355
316
 
356
- [[package]]
357
- name = "redox_syscall"
358
- version = "0.5.17"
359
- source = "registry+https://github.com/rust-lang/crates.io-index"
360
- checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77"
361
- dependencies = [
362
- "bitflags",
363
- ]
364
-
365
317
  [[package]]
366
318
  name = "rust-simulation-tools"
367
- version = "0.1.11"
319
+ version = "0.2.0"
368
320
  dependencies = [
369
321
  "nalgebra",
370
322
  "ndarray",
371
323
  "numpy",
372
324
  "pyo3",
373
325
  "rayon",
326
+ "rustc-hash 2.1.1",
374
327
  ]
375
328
 
376
329
  [[package]]
@@ -379,6 +332,12 @@ version = "1.1.0"
379
332
  source = "registry+https://github.com/rust-lang/crates.io-index"
380
333
  checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
381
334
 
335
+ [[package]]
336
+ name = "rustc-hash"
337
+ version = "2.1.1"
338
+ source = "registry+https://github.com/rust-lang/crates.io-index"
339
+ checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
340
+
382
341
  [[package]]
383
342
  name = "safe_arch"
384
343
  version = "0.7.4"
@@ -388,12 +347,6 @@ dependencies = [
388
347
  "bytemuck",
389
348
  ]
390
349
 
391
- [[package]]
392
- name = "scopeguard"
393
- version = "1.2.0"
394
- source = "registry+https://github.com/rust-lang/crates.io-index"
395
- checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
396
-
397
350
  [[package]]
398
351
  name = "simba"
399
352
  version = "0.8.1"
@@ -407,12 +360,6 @@ dependencies = [
407
360
  "wide",
408
361
  ]
409
362
 
410
- [[package]]
411
- name = "smallvec"
412
- version = "1.15.1"
413
- source = "registry+https://github.com/rust-lang/crates.io-index"
414
- checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
415
-
416
363
  [[package]]
417
364
  name = "syn"
418
365
  version = "2.0.106"
@@ -457,67 +404,3 @@ dependencies = [
457
404
  "bytemuck",
458
405
  "safe_arch",
459
406
  ]
460
-
461
- [[package]]
462
- name = "windows-targets"
463
- version = "0.52.6"
464
- source = "registry+https://github.com/rust-lang/crates.io-index"
465
- checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
466
- dependencies = [
467
- "windows_aarch64_gnullvm",
468
- "windows_aarch64_msvc",
469
- "windows_i686_gnu",
470
- "windows_i686_gnullvm",
471
- "windows_i686_msvc",
472
- "windows_x86_64_gnu",
473
- "windows_x86_64_gnullvm",
474
- "windows_x86_64_msvc",
475
- ]
476
-
477
- [[package]]
478
- name = "windows_aarch64_gnullvm"
479
- version = "0.52.6"
480
- source = "registry+https://github.com/rust-lang/crates.io-index"
481
- checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
482
-
483
- [[package]]
484
- name = "windows_aarch64_msvc"
485
- version = "0.52.6"
486
- source = "registry+https://github.com/rust-lang/crates.io-index"
487
- checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
488
-
489
- [[package]]
490
- name = "windows_i686_gnu"
491
- version = "0.52.6"
492
- source = "registry+https://github.com/rust-lang/crates.io-index"
493
- checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
494
-
495
- [[package]]
496
- name = "windows_i686_gnullvm"
497
- version = "0.52.6"
498
- source = "registry+https://github.com/rust-lang/crates.io-index"
499
- checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
500
-
501
- [[package]]
502
- name = "windows_i686_msvc"
503
- version = "0.52.6"
504
- source = "registry+https://github.com/rust-lang/crates.io-index"
505
- checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
506
-
507
- [[package]]
508
- name = "windows_x86_64_gnu"
509
- version = "0.52.6"
510
- source = "registry+https://github.com/rust-lang/crates.io-index"
511
- checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
512
-
513
- [[package]]
514
- name = "windows_x86_64_gnullvm"
515
- version = "0.52.6"
516
- source = "registry+https://github.com/rust-lang/crates.io-index"
517
- checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
518
-
519
- [[package]]
520
- name = "windows_x86_64_msvc"
521
- version = "0.52.6"
522
- source = "registry+https://github.com/rust-lang/crates.io-index"
523
- checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
@@ -1,19 +1,20 @@
1
1
  [package]
2
2
  name = "rust-simulation-tools"
3
- version = "0.1.11"
3
+ version = "0.2.0"
4
4
  edition = "2021"
5
5
  readme = "README.md"
6
6
 
7
7
  [lib]
8
- name = "kabsch_align_rs"
8
+ name = "rust_simulation_tools"
9
9
  crate-type = ["cdylib"]
10
10
 
11
11
  [dependencies]
12
- pyo3 = { version = "0.20", features = ["extension-module"] }
13
- numpy = "0.20"
12
+ pyo3 = { version = "0.22", features = ["extension-module"] }
13
+ numpy = "0.22"
14
14
  ndarray = "0.15"
15
15
  nalgebra = "0.32"
16
16
  rayon = "1.11.0"
17
+ rustc-hash = "2.0"
17
18
 
18
19
  [profile.release]
19
20
  opt-level = 3
@@ -0,0 +1,118 @@
1
+ Metadata-Version: 2.4
2
+ Name: rust_simulation_tools
3
+ Version: 0.2.0
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Requires-Dist: numpy>=1.20
7
+ Summary: Fast algorithms for MD trajectories
8
+ Author-email: Matt Sinclair <msinclair@anl.gov>
9
+ Requires-Python: >=3.8
10
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
11
+
12
+ # Rust Simulation Tools
13
+
14
+ [![CI/CD](https://github.com/msinclair-py/rust-simulation-tools/workflows/CI%2FCD/badge.svg)](https://github.com/msinclair-py/rust-simulation-tools/actions)
15
+ [![PyPI version](https://img.shields.io/pypi/v/rust-simulation-tools)](https://pypi.org/project/rust-simulation-tools/)
16
+
17
+ Fast MD trajectory processing and analysis in Rust with a Python API.
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ pip install rust-simulation-tools
23
+ ```
24
+
25
+ ## Features
26
+
27
+ - Kabsch alignment with SIMD optimizations
28
+ - Fragment-based periodic boundary unwrapping
29
+ - SASA calculation (Shrake-Rupley with KD-tree acceleration)
30
+ - Interaction energy fingerprinting (LJ + electrostatic)
31
+ - AMBER file readers (prmtop, inpcrd)
32
+ - DCD trajectory reader with streaming support
33
+
34
+ ## Quick Examples
35
+
36
+ ### Trajectory Alignment
37
+
38
+ ```python
39
+ from rust_simulation_tools import kabsch_align
40
+
41
+ aligned = kabsch_align(trajectory, reference, align_indices)
42
+ ```
43
+
44
+ ### SASA Calculation
45
+
46
+ ```python
47
+ from rust_simulation_tools import calculate_sasa, get_radii_array
48
+
49
+ radii = get_radii_array(elements) # ['C', 'N', 'O', ...]
50
+ result = calculate_sasa(coords, radii, residue_indices)
51
+ # result['total'], result['per_atom'], result['per_residue']
52
+ ```
53
+
54
+ ### AMBER Topology + DCD Trajectory
55
+
56
+ ```python
57
+ from rust_simulation_tools import read_prmtop, DcdReader
58
+
59
+ topo = read_prmtop("system.prmtop")
60
+ charges, sigmas, epsilons = topo.charges(), topo.sigmas(), topo.epsilons()
61
+
62
+ dcd = DcdReader("trajectory.dcd")
63
+ for i in range(dcd.n_frames):
64
+ coords, box = dcd.read_frame()
65
+ ```
66
+
67
+ ### Interaction Fingerprints
68
+
69
+ ```python
70
+ from rust_simulation_tools import compute_fingerprints, read_prmtop
71
+
72
+ topo = read_prmtop("system.prmtop")
73
+ resmap_indices, resmap_offsets = topo.build_resmap()
74
+
75
+ lj_fp, es_fp = compute_fingerprints(
76
+ positions, topo.charges(), topo.sigmas(), topo.epsilons(),
77
+ resmap_indices, resmap_offsets, binder_indices
78
+ )
79
+ ```
80
+
81
+ ## API Reference
82
+
83
+ ```python
84
+ # Alignment & unwrapping
85
+ kabsch_align(trajectory, reference, align_idx) -> aligned_trajectory
86
+ unwrap_system(trajectory, box_dimensions, fragment_idx) -> unwrapped_trajectory
87
+
88
+ # SASA
89
+ calculate_sasa(coords, radii, residue_indices, probe_radius=1.4) -> dict
90
+ calculate_sasa_trajectory(trajectory, radii, residue_indices) -> dict
91
+ calculate_total_sasa(coords, radii, probe_radius=1.4) -> float
92
+ get_vdw_radius(element) -> float
93
+ get_radii_array(elements) -> np.ndarray
94
+
95
+ # Fingerprinting
96
+ compute_fingerprints(positions, charges, sigmas, epsilons,
97
+ resmap_indices, resmap_offsets, binder_indices) -> (lj, es)
98
+
99
+ # File I/O
100
+ read_prmtop(path) -> AmberTopology
101
+ read_inpcrd(path) -> (positions, box_dimensions)
102
+ DcdReader(path) # .n_frames, .n_atoms, .read_frame(), .seek(n), .read_all()
103
+ ```
104
+
105
+ ## Development
106
+
107
+ ```bash
108
+ git clone https://github.com/msinclair-py/rust-simulation-tools.git
109
+ cd rust-simulation-tools
110
+ pip install maturin pytest pytest-cov numpy
111
+ maturin develop --release
112
+ pytest tests/ -v --cov
113
+ ```
114
+
115
+ ## License
116
+
117
+ MIT License
118
+