strux-rs 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.
- strux_rs-0.1.0/.gitignore +1 -0
- strux_rs-0.1.0/Cargo.lock +471 -0
- strux_rs-0.1.0/Cargo.toml +15 -0
- strux_rs-0.1.0/PKG-INFO +121 -0
- strux_rs-0.1.0/README.md +111 -0
- strux_rs-0.1.0/benchmark.py +176 -0
- strux_rs-0.1.0/pyproject.toml +14 -0
- strux_rs-0.1.0/src/analysis.rs +156 -0
- strux_rs-0.1.0/src/lib.rs +200 -0
- strux_rs-0.1.0/src/msa.rs +274 -0
- strux_rs-0.1.0/src/pdb.rs +47 -0
- strux_rs-0.1.0/src/spatial.rs +107 -0
- strux_rs-0.1.0/tests/grueling_tests.rs +149 -0
- strux_rs-0.1.0/tests/test_msa.py +224 -0
- strux_rs-0.1.0/trajectory.pdb +40341 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/target
|
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "approx"
|
|
7
|
+
version = "0.5.1"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"num-traits",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[[package]]
|
|
15
|
+
name = "autocfg"
|
|
16
|
+
version = "1.5.1"
|
|
17
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
18
|
+
checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
|
|
19
|
+
|
|
20
|
+
[[package]]
|
|
21
|
+
name = "bitflags"
|
|
22
|
+
version = "2.13.0"
|
|
23
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
24
|
+
checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8"
|
|
25
|
+
|
|
26
|
+
[[package]]
|
|
27
|
+
name = "bytemuck"
|
|
28
|
+
version = "1.25.0"
|
|
29
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
30
|
+
checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec"
|
|
31
|
+
|
|
32
|
+
[[package]]
|
|
33
|
+
name = "cfg-if"
|
|
34
|
+
version = "1.0.4"
|
|
35
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
36
|
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
37
|
+
|
|
38
|
+
[[package]]
|
|
39
|
+
name = "crossbeam-deque"
|
|
40
|
+
version = "0.8.6"
|
|
41
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
42
|
+
checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
|
|
43
|
+
dependencies = [
|
|
44
|
+
"crossbeam-epoch",
|
|
45
|
+
"crossbeam-utils",
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
[[package]]
|
|
49
|
+
name = "crossbeam-epoch"
|
|
50
|
+
version = "0.9.18"
|
|
51
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
52
|
+
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
|
|
53
|
+
dependencies = [
|
|
54
|
+
"crossbeam-utils",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
[[package]]
|
|
58
|
+
name = "crossbeam-utils"
|
|
59
|
+
version = "0.8.21"
|
|
60
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
61
|
+
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
|
62
|
+
|
|
63
|
+
[[package]]
|
|
64
|
+
name = "either"
|
|
65
|
+
version = "1.16.0"
|
|
66
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
67
|
+
checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e"
|
|
68
|
+
|
|
69
|
+
[[package]]
|
|
70
|
+
name = "heck"
|
|
71
|
+
version = "0.4.1"
|
|
72
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
73
|
+
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
|
|
74
|
+
|
|
75
|
+
[[package]]
|
|
76
|
+
name = "indoc"
|
|
77
|
+
version = "2.0.7"
|
|
78
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
79
|
+
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
|
80
|
+
dependencies = [
|
|
81
|
+
"rustversion",
|
|
82
|
+
]
|
|
83
|
+
|
|
84
|
+
[[package]]
|
|
85
|
+
name = "libc"
|
|
86
|
+
version = "0.2.186"
|
|
87
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
88
|
+
checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
|
|
89
|
+
|
|
90
|
+
[[package]]
|
|
91
|
+
name = "lock_api"
|
|
92
|
+
version = "0.4.14"
|
|
93
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
94
|
+
checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
|
|
95
|
+
dependencies = [
|
|
96
|
+
"scopeguard",
|
|
97
|
+
]
|
|
98
|
+
|
|
99
|
+
[[package]]
|
|
100
|
+
name = "matrixmultiply"
|
|
101
|
+
version = "0.3.10"
|
|
102
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
103
|
+
checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08"
|
|
104
|
+
dependencies = [
|
|
105
|
+
"autocfg",
|
|
106
|
+
"rawpointer",
|
|
107
|
+
]
|
|
108
|
+
|
|
109
|
+
[[package]]
|
|
110
|
+
name = "memoffset"
|
|
111
|
+
version = "0.9.1"
|
|
112
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
113
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
114
|
+
dependencies = [
|
|
115
|
+
"autocfg",
|
|
116
|
+
]
|
|
117
|
+
|
|
118
|
+
[[package]]
|
|
119
|
+
name = "nalgebra"
|
|
120
|
+
version = "0.33.3"
|
|
121
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
122
|
+
checksum = "9d43ddcacf343185dfd6de2ee786d9e8b1c2301622afab66b6c73baf9882abfd"
|
|
123
|
+
dependencies = [
|
|
124
|
+
"approx",
|
|
125
|
+
"matrixmultiply",
|
|
126
|
+
"num-complex",
|
|
127
|
+
"num-rational",
|
|
128
|
+
"num-traits",
|
|
129
|
+
"simba",
|
|
130
|
+
"typenum",
|
|
131
|
+
]
|
|
132
|
+
|
|
133
|
+
[[package]]
|
|
134
|
+
name = "ndarray"
|
|
135
|
+
version = "0.15.6"
|
|
136
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
137
|
+
checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32"
|
|
138
|
+
dependencies = [
|
|
139
|
+
"matrixmultiply",
|
|
140
|
+
"num-complex",
|
|
141
|
+
"num-integer",
|
|
142
|
+
"num-traits",
|
|
143
|
+
"rawpointer",
|
|
144
|
+
]
|
|
145
|
+
|
|
146
|
+
[[package]]
|
|
147
|
+
name = "num-bigint"
|
|
148
|
+
version = "0.4.6"
|
|
149
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
150
|
+
checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
|
|
151
|
+
dependencies = [
|
|
152
|
+
"num-integer",
|
|
153
|
+
"num-traits",
|
|
154
|
+
]
|
|
155
|
+
|
|
156
|
+
[[package]]
|
|
157
|
+
name = "num-complex"
|
|
158
|
+
version = "0.4.6"
|
|
159
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
160
|
+
checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
|
|
161
|
+
dependencies = [
|
|
162
|
+
"num-traits",
|
|
163
|
+
]
|
|
164
|
+
|
|
165
|
+
[[package]]
|
|
166
|
+
name = "num-integer"
|
|
167
|
+
version = "0.1.46"
|
|
168
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
169
|
+
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
|
|
170
|
+
dependencies = [
|
|
171
|
+
"num-traits",
|
|
172
|
+
]
|
|
173
|
+
|
|
174
|
+
[[package]]
|
|
175
|
+
name = "num-rational"
|
|
176
|
+
version = "0.4.2"
|
|
177
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
178
|
+
checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
|
|
179
|
+
dependencies = [
|
|
180
|
+
"num-bigint",
|
|
181
|
+
"num-integer",
|
|
182
|
+
"num-traits",
|
|
183
|
+
]
|
|
184
|
+
|
|
185
|
+
[[package]]
|
|
186
|
+
name = "num-traits"
|
|
187
|
+
version = "0.2.19"
|
|
188
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
189
|
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
|
190
|
+
dependencies = [
|
|
191
|
+
"autocfg",
|
|
192
|
+
]
|
|
193
|
+
|
|
194
|
+
[[package]]
|
|
195
|
+
name = "numpy"
|
|
196
|
+
version = "0.21.0"
|
|
197
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
198
|
+
checksum = "ec170733ca37175f5d75a5bea5911d6ff45d2cd52849ce98b685394e4f2f37f4"
|
|
199
|
+
dependencies = [
|
|
200
|
+
"libc",
|
|
201
|
+
"ndarray",
|
|
202
|
+
"num-complex",
|
|
203
|
+
"num-integer",
|
|
204
|
+
"num-traits",
|
|
205
|
+
"pyo3",
|
|
206
|
+
"rustc-hash",
|
|
207
|
+
]
|
|
208
|
+
|
|
209
|
+
[[package]]
|
|
210
|
+
name = "once_cell"
|
|
211
|
+
version = "1.21.4"
|
|
212
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
213
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
214
|
+
|
|
215
|
+
[[package]]
|
|
216
|
+
name = "parking_lot"
|
|
217
|
+
version = "0.12.5"
|
|
218
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
219
|
+
checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
|
|
220
|
+
dependencies = [
|
|
221
|
+
"lock_api",
|
|
222
|
+
"parking_lot_core",
|
|
223
|
+
]
|
|
224
|
+
|
|
225
|
+
[[package]]
|
|
226
|
+
name = "parking_lot_core"
|
|
227
|
+
version = "0.9.12"
|
|
228
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
229
|
+
checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
|
|
230
|
+
dependencies = [
|
|
231
|
+
"cfg-if",
|
|
232
|
+
"libc",
|
|
233
|
+
"redox_syscall",
|
|
234
|
+
"smallvec",
|
|
235
|
+
"windows-link",
|
|
236
|
+
]
|
|
237
|
+
|
|
238
|
+
[[package]]
|
|
239
|
+
name = "paste"
|
|
240
|
+
version = "1.0.15"
|
|
241
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
242
|
+
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
|
|
243
|
+
|
|
244
|
+
[[package]]
|
|
245
|
+
name = "portable-atomic"
|
|
246
|
+
version = "1.13.1"
|
|
247
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
248
|
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
|
249
|
+
|
|
250
|
+
[[package]]
|
|
251
|
+
name = "proc-macro2"
|
|
252
|
+
version = "1.0.106"
|
|
253
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
254
|
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
255
|
+
dependencies = [
|
|
256
|
+
"unicode-ident",
|
|
257
|
+
]
|
|
258
|
+
|
|
259
|
+
[[package]]
|
|
260
|
+
name = "pyo3"
|
|
261
|
+
version = "0.21.2"
|
|
262
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
263
|
+
checksum = "a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8"
|
|
264
|
+
dependencies = [
|
|
265
|
+
"cfg-if",
|
|
266
|
+
"indoc",
|
|
267
|
+
"libc",
|
|
268
|
+
"memoffset",
|
|
269
|
+
"parking_lot",
|
|
270
|
+
"portable-atomic",
|
|
271
|
+
"pyo3-build-config",
|
|
272
|
+
"pyo3-ffi",
|
|
273
|
+
"pyo3-macros",
|
|
274
|
+
"unindent",
|
|
275
|
+
]
|
|
276
|
+
|
|
277
|
+
[[package]]
|
|
278
|
+
name = "pyo3-build-config"
|
|
279
|
+
version = "0.21.2"
|
|
280
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
281
|
+
checksum = "7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50"
|
|
282
|
+
dependencies = [
|
|
283
|
+
"once_cell",
|
|
284
|
+
"target-lexicon",
|
|
285
|
+
]
|
|
286
|
+
|
|
287
|
+
[[package]]
|
|
288
|
+
name = "pyo3-ffi"
|
|
289
|
+
version = "0.21.2"
|
|
290
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
291
|
+
checksum = "01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403"
|
|
292
|
+
dependencies = [
|
|
293
|
+
"libc",
|
|
294
|
+
"pyo3-build-config",
|
|
295
|
+
]
|
|
296
|
+
|
|
297
|
+
[[package]]
|
|
298
|
+
name = "pyo3-macros"
|
|
299
|
+
version = "0.21.2"
|
|
300
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
301
|
+
checksum = "77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c"
|
|
302
|
+
dependencies = [
|
|
303
|
+
"proc-macro2",
|
|
304
|
+
"pyo3-macros-backend",
|
|
305
|
+
"quote",
|
|
306
|
+
"syn",
|
|
307
|
+
]
|
|
308
|
+
|
|
309
|
+
[[package]]
|
|
310
|
+
name = "pyo3-macros-backend"
|
|
311
|
+
version = "0.21.2"
|
|
312
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
313
|
+
checksum = "08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c"
|
|
314
|
+
dependencies = [
|
|
315
|
+
"heck",
|
|
316
|
+
"proc-macro2",
|
|
317
|
+
"pyo3-build-config",
|
|
318
|
+
"quote",
|
|
319
|
+
"syn",
|
|
320
|
+
]
|
|
321
|
+
|
|
322
|
+
[[package]]
|
|
323
|
+
name = "quote"
|
|
324
|
+
version = "1.0.45"
|
|
325
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
326
|
+
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
|
327
|
+
dependencies = [
|
|
328
|
+
"proc-macro2",
|
|
329
|
+
]
|
|
330
|
+
|
|
331
|
+
[[package]]
|
|
332
|
+
name = "rawpointer"
|
|
333
|
+
version = "0.2.1"
|
|
334
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
335
|
+
checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
|
|
336
|
+
|
|
337
|
+
[[package]]
|
|
338
|
+
name = "rayon"
|
|
339
|
+
version = "1.12.0"
|
|
340
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
341
|
+
checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"
|
|
342
|
+
dependencies = [
|
|
343
|
+
"either",
|
|
344
|
+
"rayon-core",
|
|
345
|
+
]
|
|
346
|
+
|
|
347
|
+
[[package]]
|
|
348
|
+
name = "rayon-core"
|
|
349
|
+
version = "1.13.0"
|
|
350
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
351
|
+
checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
|
|
352
|
+
dependencies = [
|
|
353
|
+
"crossbeam-deque",
|
|
354
|
+
"crossbeam-utils",
|
|
355
|
+
]
|
|
356
|
+
|
|
357
|
+
[[package]]
|
|
358
|
+
name = "redox_syscall"
|
|
359
|
+
version = "0.5.18"
|
|
360
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
361
|
+
checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
|
|
362
|
+
dependencies = [
|
|
363
|
+
"bitflags",
|
|
364
|
+
]
|
|
365
|
+
|
|
366
|
+
[[package]]
|
|
367
|
+
name = "rustc-hash"
|
|
368
|
+
version = "1.1.0"
|
|
369
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
370
|
+
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
|
371
|
+
|
|
372
|
+
[[package]]
|
|
373
|
+
name = "rustversion"
|
|
374
|
+
version = "1.0.22"
|
|
375
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
376
|
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
377
|
+
|
|
378
|
+
[[package]]
|
|
379
|
+
name = "safe_arch"
|
|
380
|
+
version = "0.7.4"
|
|
381
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
382
|
+
checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323"
|
|
383
|
+
dependencies = [
|
|
384
|
+
"bytemuck",
|
|
385
|
+
]
|
|
386
|
+
|
|
387
|
+
[[package]]
|
|
388
|
+
name = "scopeguard"
|
|
389
|
+
version = "1.2.0"
|
|
390
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
391
|
+
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|
392
|
+
|
|
393
|
+
[[package]]
|
|
394
|
+
name = "simba"
|
|
395
|
+
version = "0.9.1"
|
|
396
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
397
|
+
checksum = "c99284beb21666094ba2b75bbceda012e610f5479dfcc2d6e2426f53197ffd95"
|
|
398
|
+
dependencies = [
|
|
399
|
+
"approx",
|
|
400
|
+
"num-complex",
|
|
401
|
+
"num-traits",
|
|
402
|
+
"paste",
|
|
403
|
+
"wide",
|
|
404
|
+
]
|
|
405
|
+
|
|
406
|
+
[[package]]
|
|
407
|
+
name = "smallvec"
|
|
408
|
+
version = "1.15.2"
|
|
409
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
410
|
+
checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
|
|
411
|
+
|
|
412
|
+
[[package]]
|
|
413
|
+
name = "strux-rs"
|
|
414
|
+
version = "0.1.0"
|
|
415
|
+
dependencies = [
|
|
416
|
+
"nalgebra",
|
|
417
|
+
"numpy",
|
|
418
|
+
"pyo3",
|
|
419
|
+
"rayon",
|
|
420
|
+
]
|
|
421
|
+
|
|
422
|
+
[[package]]
|
|
423
|
+
name = "syn"
|
|
424
|
+
version = "2.0.118"
|
|
425
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
426
|
+
checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422"
|
|
427
|
+
dependencies = [
|
|
428
|
+
"proc-macro2",
|
|
429
|
+
"quote",
|
|
430
|
+
"unicode-ident",
|
|
431
|
+
]
|
|
432
|
+
|
|
433
|
+
[[package]]
|
|
434
|
+
name = "target-lexicon"
|
|
435
|
+
version = "0.12.16"
|
|
436
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
437
|
+
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|
438
|
+
|
|
439
|
+
[[package]]
|
|
440
|
+
name = "typenum"
|
|
441
|
+
version = "1.20.1"
|
|
442
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
443
|
+
checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
|
|
444
|
+
|
|
445
|
+
[[package]]
|
|
446
|
+
name = "unicode-ident"
|
|
447
|
+
version = "1.0.24"
|
|
448
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
449
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
450
|
+
|
|
451
|
+
[[package]]
|
|
452
|
+
name = "unindent"
|
|
453
|
+
version = "0.2.4"
|
|
454
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
455
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
456
|
+
|
|
457
|
+
[[package]]
|
|
458
|
+
name = "wide"
|
|
459
|
+
version = "0.7.33"
|
|
460
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
461
|
+
checksum = "0ce5da8ecb62bcd8ec8b7ea19f69a51275e91299be594ea5cc6ef7819e16cd03"
|
|
462
|
+
dependencies = [
|
|
463
|
+
"bytemuck",
|
|
464
|
+
"safe_arch",
|
|
465
|
+
]
|
|
466
|
+
|
|
467
|
+
[[package]]
|
|
468
|
+
name = "windows-link"
|
|
469
|
+
version = "0.2.1"
|
|
470
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
471
|
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "strux-rs"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
|
|
7
|
+
[lib]
|
|
8
|
+
name = "strux_rs"
|
|
9
|
+
crate-type = ["cdylib", "rlib"]
|
|
10
|
+
|
|
11
|
+
[dependencies]
|
|
12
|
+
pyo3 = { version = "0.21.0", features = ["extension-module"] }
|
|
13
|
+
numpy = "0.21.0"
|
|
14
|
+
rayon = "1.10.0"
|
|
15
|
+
nalgebra = { version = "0.33.0", default-features = false, features = ["std"] }
|
strux_rs-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: strux-rs
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Programming Language :: Rust
|
|
5
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
|
+
Summary: A performance-engineered structural biology library in Rust
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
9
|
+
|
|
10
|
+
# strux-rs
|
|
11
|
+
|
|
12
|
+
[]()
|
|
13
|
+
[]()
|
|
14
|
+
[]()
|
|
15
|
+
|
|
16
|
+
> **strux-rs** is a blazingly fast, performance-engineered structural biology library written in Rust, offering direct, zero-copy Python bindings via PyO3 and NumPy.
|
|
17
|
+
|
|
18
|
+
It acts as a drop-in accelerator for slow CPU-bound bottlenecks in molecular dynamics (MD) analysis and generative structural biology pipelines.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Performance Speedups
|
|
23
|
+
|
|
24
|
+
Benchmark performed on a **21-frame trajectory** of a designed E3 ubiquitin ligase binder containing **1,924 atoms per frame**:
|
|
25
|
+
|
|
26
|
+
| Task | Python (Pure/NumPy) | Rust (`strux-rs`) | Speedup |
|
|
27
|
+
| :--- | :--- | :--- | :--- |
|
|
28
|
+
| **PDB Trajectory Parsing** | 0.0781s | 0.0513s | **1.5x** |
|
|
29
|
+
| **Radius of Gyration ($R_g$)** | 0.000140s | 0.000009s | **16.0x** |
|
|
30
|
+
| **Raw RMSD** | 0.000037s | 0.000008s | **4.5x** |
|
|
31
|
+
| **Kabsch Aligned RMSD** | 0.004737s | 0.000019s | **255.6x** |
|
|
32
|
+
| **RMSF** | 0.000601s | 0.000131s | **4.6x** |
|
|
33
|
+
| **Interface Contacts (5.0Å)** | 0.026400s | 0.000500s | **55.5x** |
|
|
34
|
+
|
|
35
|
+
### Core Optimization Features
|
|
36
|
+
* **SVD-based Kabsch Alignment (~255x faster)**: Mathematical alignment centered at centroids, computing covariance matrices, and executing reflection-corrected Singular Value Decomposition (SVD) using optimized SIMD-capable `nalgebra` structures.
|
|
37
|
+
* **Spatial Hashing Cell Lists (~55x faster)**: Bypasses naive $O(N_A \times N_B)$ double-loop contact mapping. It indexes coordinate grids into cubical voxels and wraps boundary cells under Periodic Boundary Conditions (PBC) using minimum image conventions.
|
|
38
|
+
* **Multi-Threaded Trajectory Scaling**: Bypasses the Python Global Interpreter Lock (GIL) entirely. Heavy computations scale automatically across all CPU cores using `rayon`.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Features
|
|
43
|
+
|
|
44
|
+
* **Trajectory Parsing**: High-speed multi-model PDB text scanner returning a 3D NumPy array `[Frames, Atoms, 3]`.
|
|
45
|
+
* **Kabsch Superposition**: RMSD alignment for coordinate superposition.
|
|
46
|
+
* **Biophysical Metrics**: Radius of Gyration ($R_g$), Root Mean Square Fluctuation (RMSF), and Raw RMSD.
|
|
47
|
+
* **Interface Contact Mapper**: Rapid neighbor lookup under cutoff distances supporting periodic boxes.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Installation
|
|
52
|
+
|
|
53
|
+
To build and compile `strux-rs` from source, ensure you have the Rust toolchain installed.
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Clone the repository
|
|
57
|
+
git clone https://github.com/QntmSeer/strux-rs.git
|
|
58
|
+
cd strux-rs
|
|
59
|
+
|
|
60
|
+
# Compile and install inside your active Python environment
|
|
61
|
+
pip install .
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
*For active local development:*
|
|
65
|
+
```bash
|
|
66
|
+
pip install maturin
|
|
67
|
+
maturin develop --release
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Quickstart (Python API)
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
import numpy as np
|
|
76
|
+
import strux_rs
|
|
77
|
+
|
|
78
|
+
# 1. Parse a multi-model PDB trajectory into a [Frames, Atoms, 3] numpy array
|
|
79
|
+
traj = strux_rs.parse_pdb("trajectory.pdb")
|
|
80
|
+
print(f"Loaded trajectory with shape: {traj.shape}")
|
|
81
|
+
|
|
82
|
+
# 2. Compute Radius of Gyration for the first frame
|
|
83
|
+
rg = strux_rs.calculate_rg(traj[0])
|
|
84
|
+
print(f"Radius of Gyration: {rg:.3f} Å")
|
|
85
|
+
|
|
86
|
+
# 3. Calculate aligned RMSD using the Kabsch algorithm
|
|
87
|
+
aligned_rmsd = strux_rs.calculate_rmsd_kabsch(traj[0], traj[1])
|
|
88
|
+
print(f"Aligned RMSD: {aligned_rmsd:.3f} Å")
|
|
89
|
+
|
|
90
|
+
# 4. Rapid interface contact mapping under Periodic Boundary Conditions (PBC)
|
|
91
|
+
target = traj[0][:1023]
|
|
92
|
+
binder = traj[0][1023:]
|
|
93
|
+
cutoff = 5.0 # Ångstroms
|
|
94
|
+
box_dims = [25.0, 25.0, 25.0] # Periodic boundary box length
|
|
95
|
+
|
|
96
|
+
contacts = strux_rs.find_interface_contacts(target, binder, cutoff, box_dims)
|
|
97
|
+
print(f"Detected {len(contacts)} contact pairs at the interface.")
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Repository Layout
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
strux-rs/
|
|
106
|
+
├── Cargo.toml # Cargo configuration and dependencies (pyo3, numpy, nalgebra, rayon)
|
|
107
|
+
├── benchmark.py # Correctness and performance benchmarking suite
|
|
108
|
+
├── src/
|
|
109
|
+
│ ├── lib.rs # PyO3 bindings and array conversion layer
|
|
110
|
+
│ ├── pdb.rs # Zero-allocation buffered PDB trajectory scanner
|
|
111
|
+
│ ├── spatial.rs # PBC-aware Voxel spatial hashing / Cell Lists
|
|
112
|
+
│ └── analysis.rs # Biophysical math: Rg, RMSD, SVD-Kabsch, and RMSF
|
|
113
|
+
└── tests/
|
|
114
|
+
└── grueling_tests.rs # Edge-case, boundary wrapping, and degeneracy verification
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## License
|
|
120
|
+
This project is licensed under the MIT License.
|
|
121
|
+
|