biotite 1.0.1__cp312-cp312-win_amd64.whl → 1.1.0__cp312-cp312-win_amd64.whl
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.
Potentially problematic release.
This version of biotite might be problematic. Click here for more details.
- biotite/application/dssp/app.py +13 -3
- biotite/application/localapp.py +34 -0
- biotite/application/muscle/app3.py +2 -15
- biotite/application/muscle/app5.py +2 -2
- biotite/application/util.py +1 -1
- biotite/application/viennarna/rnaplot.py +6 -2
- biotite/database/rcsb/query.py +6 -6
- biotite/database/uniprot/check.py +20 -15
- biotite/database/uniprot/download.py +1 -1
- biotite/database/uniprot/query.py +1 -1
- biotite/sequence/align/alignment.py +16 -3
- biotite/sequence/align/banded.cp312-win_amd64.pyd +0 -0
- biotite/sequence/align/banded.pyx +5 -5
- biotite/sequence/align/kmeralphabet.cp312-win_amd64.pyd +0 -0
- biotite/sequence/align/kmeralphabet.pyx +17 -0
- biotite/sequence/align/kmersimilarity.cp312-win_amd64.pyd +0 -0
- biotite/sequence/align/kmertable.cp312-win_amd64.pyd +0 -0
- biotite/sequence/align/kmertable.pyx +52 -42
- biotite/sequence/align/localgapped.cp312-win_amd64.pyd +0 -0
- biotite/sequence/align/localungapped.cp312-win_amd64.pyd +0 -0
- biotite/sequence/align/matrix.py +273 -55
- biotite/sequence/align/matrix_data/3Di.mat +24 -0
- biotite/sequence/align/matrix_data/PB.license +21 -0
- biotite/sequence/align/matrix_data/PB.mat +18 -0
- biotite/sequence/align/multiple.cp312-win_amd64.pyd +0 -0
- biotite/sequence/align/pairwise.cp312-win_amd64.pyd +0 -0
- biotite/sequence/align/permutation.cp312-win_amd64.pyd +0 -0
- biotite/sequence/align/selector.cp312-win_amd64.pyd +0 -0
- biotite/sequence/align/tracetable.cp312-win_amd64.pyd +0 -0
- biotite/sequence/alphabet.py +3 -0
- biotite/sequence/codec.cp312-win_amd64.pyd +0 -0
- biotite/sequence/graphics/color_schemes/3di_flower.json +48 -0
- biotite/sequence/graphics/color_schemes/pb_flower.json +2 -1
- biotite/sequence/graphics/colorschemes.py +44 -11
- biotite/sequence/phylo/nj.cp312-win_amd64.pyd +0 -0
- biotite/sequence/phylo/tree.cp312-win_amd64.pyd +0 -0
- biotite/sequence/phylo/upgma.cp312-win_amd64.pyd +0 -0
- biotite/sequence/profile.py +86 -4
- biotite/sequence/seqtypes.py +124 -3
- biotite/setup_ccd.py +197 -0
- biotite/structure/__init__.py +4 -3
- biotite/structure/alphabet/__init__.py +25 -0
- biotite/structure/alphabet/encoder.py +332 -0
- biotite/structure/alphabet/encoder_weights_3di.kerasify +0 -0
- biotite/structure/alphabet/i3d.py +110 -0
- biotite/structure/alphabet/layers.py +86 -0
- biotite/structure/alphabet/pb.license +21 -0
- biotite/structure/alphabet/pb.py +171 -0
- biotite/structure/alphabet/unkerasify.py +122 -0
- biotite/structure/atoms.py +129 -40
- biotite/structure/bonds.cp312-win_amd64.pyd +0 -0
- biotite/structure/bonds.pyx +72 -21
- biotite/structure/celllist.cp312-win_amd64.pyd +0 -0
- biotite/structure/charges.cp312-win_amd64.pyd +0 -0
- biotite/structure/geometry.py +60 -113
- biotite/structure/info/__init__.py +1 -0
- biotite/structure/info/atoms.py +13 -13
- biotite/structure/info/bonds.py +12 -6
- biotite/structure/info/ccd.py +125 -32
- biotite/structure/info/{ccd/components.bcif → components.bcif} +0 -0
- biotite/structure/info/groups.py +63 -17
- biotite/structure/info/masses.py +9 -6
- biotite/structure/info/misc.py +15 -21
- biotite/structure/info/standardize.py +3 -2
- biotite/structure/io/mol/sdf.py +41 -40
- biotite/structure/io/pdb/convert.py +2 -0
- biotite/structure/io/pdb/file.py +74 -3
- biotite/structure/io/pdb/hybrid36.cp312-win_amd64.pyd +0 -0
- biotite/structure/io/pdbqt/file.py +32 -32
- biotite/structure/io/pdbx/__init__.py +1 -0
- biotite/structure/io/pdbx/bcif.py +32 -8
- biotite/structure/io/pdbx/cif.py +72 -59
- biotite/structure/io/pdbx/component.py +9 -4
- biotite/structure/io/pdbx/compress.py +321 -0
- biotite/structure/io/pdbx/convert.py +194 -48
- biotite/structure/io/pdbx/encoding.cp312-win_amd64.pyd +0 -0
- biotite/structure/io/pdbx/encoding.pyx +98 -17
- biotite/structure/molecules.py +141 -141
- biotite/structure/sasa.cp312-win_amd64.pyd +0 -0
- biotite/structure/segments.py +1 -2
- biotite/structure/util.py +73 -1
- biotite/version.py +2 -2
- {biotite-1.0.1.dist-info → biotite-1.1.0.dist-info}/METADATA +3 -1
- {biotite-1.0.1.dist-info → biotite-1.1.0.dist-info}/RECORD +86 -76
- biotite/structure/info/ccd/README.rst +0 -8
- biotite/structure/info/ccd/amino_acids.txt +0 -1663
- biotite/structure/info/ccd/carbohydrates.txt +0 -1135
- biotite/structure/info/ccd/nucleotides.txt +0 -798
- {biotite-1.0.1.dist-info → biotite-1.1.0.dist-info}/WHEEL +0 -0
- {biotite-1.0.1.dist-info → biotite-1.1.0.dist-info}/licenses/LICENSE.rst +0 -0
biotite/structure/molecules.py
CHANGED
|
@@ -63,54 +63,54 @@ def get_molecule_indices(array):
|
|
|
63
63
|
>>> print(len(indices))
|
|
64
64
|
2
|
|
65
65
|
>>> print(atp[indices[0]])
|
|
66
|
-
HET 0 ATP PG P 1.200 -0.
|
|
67
|
-
HET 0 ATP O1G O 1.740 1.140 -6.
|
|
68
|
-
HET 0 ATP O2G O 2.
|
|
69
|
-
HET 0 ATP O3G O -0.
|
|
70
|
-
HET 0 ATP PB P 0.
|
|
71
|
-
HET 0 ATP O1B O 0.810 1.
|
|
72
|
-
HET 0 ATP O2B O -1.
|
|
73
|
-
HET 0 ATP O3B O 1.
|
|
74
|
-
HET 0 ATP PA P -0.
|
|
75
|
-
HET 0 ATP O1A O -2.
|
|
76
|
-
HET 0 ATP O2A O -0.
|
|
77
|
-
HET 0 ATP O3A O 0.
|
|
78
|
-
HET 0 ATP HOG2 H 2.100 -0.
|
|
79
|
-
HET 0 ATP HOG3 H -0.
|
|
80
|
-
HET 0 ATP HOB2 H -1.
|
|
81
|
-
HET 0 ATP HOA2 H 0.
|
|
66
|
+
HET 0 ATP PG P 1.200 -0.226 -6.850
|
|
67
|
+
HET 0 ATP O1G O 1.740 1.140 -6.672
|
|
68
|
+
HET 0 ATP O2G O 2.123 -1.036 -7.891
|
|
69
|
+
HET 0 ATP O3G O -0.302 -0.139 -7.421
|
|
70
|
+
HET 0 ATP PB P 0.255 -0.130 -4.446
|
|
71
|
+
HET 0 ATP O1B O 0.810 1.234 -4.304
|
|
72
|
+
HET 0 ATP O2B O -1.231 -0.044 -5.057
|
|
73
|
+
HET 0 ATP O3B O 1.192 -0.990 -5.433
|
|
74
|
+
HET 0 ATP PA P -0.745 0.068 -2.071
|
|
75
|
+
HET 0 ATP O1A O -2.097 0.143 -2.669
|
|
76
|
+
HET 0 ATP O2A O -0.125 1.549 -1.957
|
|
77
|
+
HET 0 ATP O3A O 0.203 -0.840 -3.002
|
|
78
|
+
HET 0 ATP HOG2 H 2.100 -0.546 -8.725
|
|
79
|
+
HET 0 ATP HOG3 H -0.616 -1.048 -7.522
|
|
80
|
+
HET 0 ATP HOB2 H -1.554 -0.952 -5.132
|
|
81
|
+
HET 0 ATP HOA2 H 0.752 1.455 -1.563
|
|
82
82
|
>>> print(atp[indices[1]])
|
|
83
|
-
HET 0 ATP O5' O -0.
|
|
84
|
-
HET 0 ATP C5' C -1.
|
|
85
|
-
HET 0 ATP C4' C -1.
|
|
86
|
-
HET 0 ATP O4' O -0.
|
|
87
|
-
HET 0 ATP C3' C -2.
|
|
88
|
-
HET 0 ATP O3' O -4.
|
|
89
|
-
HET 0 ATP C2' C -2.
|
|
90
|
-
HET 0 ATP O2' O -2.
|
|
91
|
-
HET 0 ATP C1' C -0.830 -0.
|
|
92
|
-
HET 0 ATP N9 N 0.
|
|
93
|
-
HET 0 ATP C8 C 1.
|
|
94
|
-
HET 0 ATP N7 N 2.
|
|
95
|
-
HET 0 ATP C5 C 1.
|
|
96
|
-
HET 0 ATP C6 C 2.
|
|
97
|
-
HET 0 ATP N6 N 3.
|
|
98
|
-
HET 0 ATP N1 N 1.
|
|
99
|
-
HET 0 ATP C2 C 0.
|
|
100
|
-
HET 0 ATP N3 N 0.
|
|
101
|
-
HET 0 ATP C4 C 0.
|
|
102
|
-
HET 0 ATP H5'1 H -2.
|
|
103
|
-
HET 0 ATP H5'2 H -1.
|
|
104
|
-
HET 0 ATP H4' H -2.
|
|
105
|
-
HET 0 ATP H3' H -2.
|
|
106
|
-
HET 0 ATP HO3' H -4.
|
|
107
|
-
HET 0 ATP H2' H -1.
|
|
108
|
-
HET 0 ATP HO2' H -3.
|
|
109
|
-
HET 0 ATP H1' H -1.
|
|
110
|
-
HET 0 ATP H8 H 1.
|
|
111
|
-
HET 0 ATP HN61 H 3.
|
|
112
|
-
HET 0 ATP HN62 H 4.
|
|
113
|
-
HET 0 ATP H2 H 0.
|
|
83
|
+
HET 0 ATP O5' O -0.844 -0.587 -0.604
|
|
84
|
+
HET 0 ATP C5' C -1.694 0.260 0.170
|
|
85
|
+
HET 0 ATP C4' C -1.831 -0.309 1.584
|
|
86
|
+
HET 0 ATP O4' O -0.542 -0.355 2.234
|
|
87
|
+
HET 0 ATP C3' C -2.683 0.630 2.465
|
|
88
|
+
HET 0 ATP O3' O -4.033 0.165 2.534
|
|
89
|
+
HET 0 ATP C2' C -2.011 0.555 3.856
|
|
90
|
+
HET 0 ATP O2' O -2.926 0.043 4.827
|
|
91
|
+
HET 0 ATP C1' C -0.830 -0.418 3.647
|
|
92
|
+
HET 0 ATP N9 N 0.332 0.015 4.425
|
|
93
|
+
HET 0 ATP C8 C 1.302 0.879 4.012
|
|
94
|
+
HET 0 ATP N7 N 2.184 1.042 4.955
|
|
95
|
+
HET 0 ATP C5 C 1.833 0.300 6.033
|
|
96
|
+
HET 0 ATP C6 C 2.391 0.077 7.303
|
|
97
|
+
HET 0 ATP N6 N 3.564 0.706 7.681
|
|
98
|
+
HET 0 ATP N1 N 1.763 -0.747 8.135
|
|
99
|
+
HET 0 ATP C2 C 0.644 -1.352 7.783
|
|
100
|
+
HET 0 ATP N3 N 0.088 -1.178 6.602
|
|
101
|
+
HET 0 ATP C4 C 0.644 -0.371 5.704
|
|
102
|
+
HET 0 ATP H5'1 H -2.678 0.312 -0.296
|
|
103
|
+
HET 0 ATP H5'2 H -1.263 1.259 0.221
|
|
104
|
+
HET 0 ATP H4' H -2.275 -1.304 1.550
|
|
105
|
+
HET 0 ATP H3' H -2.651 1.649 2.078
|
|
106
|
+
HET 0 ATP HO3' H -4.515 0.788 3.094
|
|
107
|
+
HET 0 ATP H2' H -1.646 1.537 4.157
|
|
108
|
+
HET 0 ATP HO2' H -3.667 0.662 4.867
|
|
109
|
+
HET 0 ATP H1' H -1.119 -1.430 3.931
|
|
110
|
+
HET 0 ATP H8 H 1.334 1.357 3.044
|
|
111
|
+
HET 0 ATP HN61 H 3.938 0.548 8.562
|
|
112
|
+
HET 0 ATP HN62 H 4.015 1.303 7.064
|
|
113
|
+
HET 0 ATP H2 H 0.166 -2.014 8.490
|
|
114
114
|
"""
|
|
115
115
|
if isinstance(array, BondList):
|
|
116
116
|
bonds = array
|
|
@@ -181,54 +181,54 @@ def get_molecule_masks(array):
|
|
|
181
181
|
>>> print(len(masks))
|
|
182
182
|
2
|
|
183
183
|
>>> print(atp[masks[0]])
|
|
184
|
-
HET 0 ATP PG P 1.200 -0.
|
|
185
|
-
HET 0 ATP O1G O 1.740 1.140 -6.
|
|
186
|
-
HET 0 ATP O2G O 2.
|
|
187
|
-
HET 0 ATP O3G O -0.
|
|
188
|
-
HET 0 ATP PB P 0.
|
|
189
|
-
HET 0 ATP O1B O 0.810 1.
|
|
190
|
-
HET 0 ATP O2B O -1.
|
|
191
|
-
HET 0 ATP O3B O 1.
|
|
192
|
-
HET 0 ATP PA P -0.
|
|
193
|
-
HET 0 ATP O1A O -2.
|
|
194
|
-
HET 0 ATP O2A O -0.
|
|
195
|
-
HET 0 ATP O3A O 0.
|
|
196
|
-
HET 0 ATP HOG2 H 2.100 -0.
|
|
197
|
-
HET 0 ATP HOG3 H -0.
|
|
198
|
-
HET 0 ATP HOB2 H -1.
|
|
199
|
-
HET 0 ATP HOA2 H 0.
|
|
184
|
+
HET 0 ATP PG P 1.200 -0.226 -6.850
|
|
185
|
+
HET 0 ATP O1G O 1.740 1.140 -6.672
|
|
186
|
+
HET 0 ATP O2G O 2.123 -1.036 -7.891
|
|
187
|
+
HET 0 ATP O3G O -0.302 -0.139 -7.421
|
|
188
|
+
HET 0 ATP PB P 0.255 -0.130 -4.446
|
|
189
|
+
HET 0 ATP O1B O 0.810 1.234 -4.304
|
|
190
|
+
HET 0 ATP O2B O -1.231 -0.044 -5.057
|
|
191
|
+
HET 0 ATP O3B O 1.192 -0.990 -5.433
|
|
192
|
+
HET 0 ATP PA P -0.745 0.068 -2.071
|
|
193
|
+
HET 0 ATP O1A O -2.097 0.143 -2.669
|
|
194
|
+
HET 0 ATP O2A O -0.125 1.549 -1.957
|
|
195
|
+
HET 0 ATP O3A O 0.203 -0.840 -3.002
|
|
196
|
+
HET 0 ATP HOG2 H 2.100 -0.546 -8.725
|
|
197
|
+
HET 0 ATP HOG3 H -0.616 -1.048 -7.522
|
|
198
|
+
HET 0 ATP HOB2 H -1.554 -0.952 -5.132
|
|
199
|
+
HET 0 ATP HOA2 H 0.752 1.455 -1.563
|
|
200
200
|
>>> print(atp[masks[1]])
|
|
201
|
-
HET 0 ATP O5' O -0.
|
|
202
|
-
HET 0 ATP C5' C -1.
|
|
203
|
-
HET 0 ATP C4' C -1.
|
|
204
|
-
HET 0 ATP O4' O -0.
|
|
205
|
-
HET 0 ATP C3' C -2.
|
|
206
|
-
HET 0 ATP O3' O -4.
|
|
207
|
-
HET 0 ATP C2' C -2.
|
|
208
|
-
HET 0 ATP O2' O -2.
|
|
209
|
-
HET 0 ATP C1' C -0.830 -0.
|
|
210
|
-
HET 0 ATP N9 N 0.
|
|
211
|
-
HET 0 ATP C8 C 1.
|
|
212
|
-
HET 0 ATP N7 N 2.
|
|
213
|
-
HET 0 ATP C5 C 1.
|
|
214
|
-
HET 0 ATP C6 C 2.
|
|
215
|
-
HET 0 ATP N6 N 3.
|
|
216
|
-
HET 0 ATP N1 N 1.
|
|
217
|
-
HET 0 ATP C2 C 0.
|
|
218
|
-
HET 0 ATP N3 N 0.
|
|
219
|
-
HET 0 ATP C4 C 0.
|
|
220
|
-
HET 0 ATP H5'1 H -2.
|
|
221
|
-
HET 0 ATP H5'2 H -1.
|
|
222
|
-
HET 0 ATP H4' H -2.
|
|
223
|
-
HET 0 ATP H3' H -2.
|
|
224
|
-
HET 0 ATP HO3' H -4.
|
|
225
|
-
HET 0 ATP H2' H -1.
|
|
226
|
-
HET 0 ATP HO2' H -3.
|
|
227
|
-
HET 0 ATP H1' H -1.
|
|
228
|
-
HET 0 ATP H8 H 1.
|
|
229
|
-
HET 0 ATP HN61 H 3.
|
|
230
|
-
HET 0 ATP HN62 H 4.
|
|
231
|
-
HET 0 ATP H2 H 0.
|
|
201
|
+
HET 0 ATP O5' O -0.844 -0.587 -0.604
|
|
202
|
+
HET 0 ATP C5' C -1.694 0.260 0.170
|
|
203
|
+
HET 0 ATP C4' C -1.831 -0.309 1.584
|
|
204
|
+
HET 0 ATP O4' O -0.542 -0.355 2.234
|
|
205
|
+
HET 0 ATP C3' C -2.683 0.630 2.465
|
|
206
|
+
HET 0 ATP O3' O -4.033 0.165 2.534
|
|
207
|
+
HET 0 ATP C2' C -2.011 0.555 3.856
|
|
208
|
+
HET 0 ATP O2' O -2.926 0.043 4.827
|
|
209
|
+
HET 0 ATP C1' C -0.830 -0.418 3.647
|
|
210
|
+
HET 0 ATP N9 N 0.332 0.015 4.425
|
|
211
|
+
HET 0 ATP C8 C 1.302 0.879 4.012
|
|
212
|
+
HET 0 ATP N7 N 2.184 1.042 4.955
|
|
213
|
+
HET 0 ATP C5 C 1.833 0.300 6.033
|
|
214
|
+
HET 0 ATP C6 C 2.391 0.077 7.303
|
|
215
|
+
HET 0 ATP N6 N 3.564 0.706 7.681
|
|
216
|
+
HET 0 ATP N1 N 1.763 -0.747 8.135
|
|
217
|
+
HET 0 ATP C2 C 0.644 -1.352 7.783
|
|
218
|
+
HET 0 ATP N3 N 0.088 -1.178 6.602
|
|
219
|
+
HET 0 ATP C4 C 0.644 -0.371 5.704
|
|
220
|
+
HET 0 ATP H5'1 H -2.678 0.312 -0.296
|
|
221
|
+
HET 0 ATP H5'2 H -1.263 1.259 0.221
|
|
222
|
+
HET 0 ATP H4' H -2.275 -1.304 1.550
|
|
223
|
+
HET 0 ATP H3' H -2.651 1.649 2.078
|
|
224
|
+
HET 0 ATP HO3' H -4.515 0.788 3.094
|
|
225
|
+
HET 0 ATP H2' H -1.646 1.537 4.157
|
|
226
|
+
HET 0 ATP HO2' H -3.667 0.662 4.867
|
|
227
|
+
HET 0 ATP H1' H -1.119 -1.430 3.931
|
|
228
|
+
HET 0 ATP H8 H 1.334 1.357 3.044
|
|
229
|
+
HET 0 ATP HN61 H 3.938 0.548 8.562
|
|
230
|
+
HET 0 ATP HN62 H 4.015 1.303 7.064
|
|
231
|
+
HET 0 ATP H2 H 0.166 -2.014 8.490
|
|
232
232
|
"""
|
|
233
233
|
if isinstance(array, BondList):
|
|
234
234
|
bonds = array
|
|
@@ -288,55 +288,55 @@ def molecule_iter(array):
|
|
|
288
288
|
... print(molecule)
|
|
289
289
|
... print()
|
|
290
290
|
New molecule
|
|
291
|
-
HET 0 ATP PG P 1.200 -0.
|
|
292
|
-
HET 0 ATP O1G O 1.740 1.140 -6.
|
|
293
|
-
HET 0 ATP O2G O 2.
|
|
294
|
-
HET 0 ATP O3G O -0.
|
|
295
|
-
HET 0 ATP PB P 0.
|
|
296
|
-
HET 0 ATP O1B O 0.810 1.
|
|
297
|
-
HET 0 ATP O2B O -1.
|
|
298
|
-
HET 0 ATP O3B O 1.
|
|
299
|
-
HET 0 ATP PA P -0.
|
|
300
|
-
HET 0 ATP O1A O -2.
|
|
301
|
-
HET 0 ATP O2A O -0.
|
|
302
|
-
HET 0 ATP O3A O 0.
|
|
303
|
-
HET 0 ATP HOG2 H 2.100 -0.
|
|
304
|
-
HET 0 ATP HOG3 H -0.
|
|
305
|
-
HET 0 ATP HOB2 H -1.
|
|
306
|
-
HET 0 ATP HOA2 H 0.
|
|
291
|
+
HET 0 ATP PG P 1.200 -0.226 -6.850
|
|
292
|
+
HET 0 ATP O1G O 1.740 1.140 -6.672
|
|
293
|
+
HET 0 ATP O2G O 2.123 -1.036 -7.891
|
|
294
|
+
HET 0 ATP O3G O -0.302 -0.139 -7.421
|
|
295
|
+
HET 0 ATP PB P 0.255 -0.130 -4.446
|
|
296
|
+
HET 0 ATP O1B O 0.810 1.234 -4.304
|
|
297
|
+
HET 0 ATP O2B O -1.231 -0.044 -5.057
|
|
298
|
+
HET 0 ATP O3B O 1.192 -0.990 -5.433
|
|
299
|
+
HET 0 ATP PA P -0.745 0.068 -2.071
|
|
300
|
+
HET 0 ATP O1A O -2.097 0.143 -2.669
|
|
301
|
+
HET 0 ATP O2A O -0.125 1.549 -1.957
|
|
302
|
+
HET 0 ATP O3A O 0.203 -0.840 -3.002
|
|
303
|
+
HET 0 ATP HOG2 H 2.100 -0.546 -8.725
|
|
304
|
+
HET 0 ATP HOG3 H -0.616 -1.048 -7.522
|
|
305
|
+
HET 0 ATP HOB2 H -1.554 -0.952 -5.132
|
|
306
|
+
HET 0 ATP HOA2 H 0.752 1.455 -1.563
|
|
307
307
|
<BLANKLINE>
|
|
308
308
|
New molecule
|
|
309
|
-
HET 0 ATP O5' O -0.
|
|
310
|
-
HET 0 ATP C5' C -1.
|
|
311
|
-
HET 0 ATP C4' C -1.
|
|
312
|
-
HET 0 ATP O4' O -0.
|
|
313
|
-
HET 0 ATP C3' C -2.
|
|
314
|
-
HET 0 ATP O3' O -4.
|
|
315
|
-
HET 0 ATP C2' C -2.
|
|
316
|
-
HET 0 ATP O2' O -2.
|
|
317
|
-
HET 0 ATP C1' C -0.830 -0.
|
|
318
|
-
HET 0 ATP N9 N 0.
|
|
319
|
-
HET 0 ATP C8 C 1.
|
|
320
|
-
HET 0 ATP N7 N 2.
|
|
321
|
-
HET 0 ATP C5 C 1.
|
|
322
|
-
HET 0 ATP C6 C 2.
|
|
323
|
-
HET 0 ATP N6 N 3.
|
|
324
|
-
HET 0 ATP N1 N 1.
|
|
325
|
-
HET 0 ATP C2 C 0.
|
|
326
|
-
HET 0 ATP N3 N 0.
|
|
327
|
-
HET 0 ATP C4 C 0.
|
|
328
|
-
HET 0 ATP H5'1 H -2.
|
|
329
|
-
HET 0 ATP H5'2 H -1.
|
|
330
|
-
HET 0 ATP H4' H -2.
|
|
331
|
-
HET 0 ATP H3' H -2.
|
|
332
|
-
HET 0 ATP HO3' H -4.
|
|
333
|
-
HET 0 ATP H2' H -1.
|
|
334
|
-
HET 0 ATP HO2' H -3.
|
|
335
|
-
HET 0 ATP H1' H -1.
|
|
336
|
-
HET 0 ATP H8 H 1.
|
|
337
|
-
HET 0 ATP HN61 H 3.
|
|
338
|
-
HET 0 ATP HN62 H 4.
|
|
339
|
-
HET 0 ATP H2 H 0.
|
|
309
|
+
HET 0 ATP O5' O -0.844 -0.587 -0.604
|
|
310
|
+
HET 0 ATP C5' C -1.694 0.260 0.170
|
|
311
|
+
HET 0 ATP C4' C -1.831 -0.309 1.584
|
|
312
|
+
HET 0 ATP O4' O -0.542 -0.355 2.234
|
|
313
|
+
HET 0 ATP C3' C -2.683 0.630 2.465
|
|
314
|
+
HET 0 ATP O3' O -4.033 0.165 2.534
|
|
315
|
+
HET 0 ATP C2' C -2.011 0.555 3.856
|
|
316
|
+
HET 0 ATP O2' O -2.926 0.043 4.827
|
|
317
|
+
HET 0 ATP C1' C -0.830 -0.418 3.647
|
|
318
|
+
HET 0 ATP N9 N 0.332 0.015 4.425
|
|
319
|
+
HET 0 ATP C8 C 1.302 0.879 4.012
|
|
320
|
+
HET 0 ATP N7 N 2.184 1.042 4.955
|
|
321
|
+
HET 0 ATP C5 C 1.833 0.300 6.033
|
|
322
|
+
HET 0 ATP C6 C 2.391 0.077 7.303
|
|
323
|
+
HET 0 ATP N6 N 3.564 0.706 7.681
|
|
324
|
+
HET 0 ATP N1 N 1.763 -0.747 8.135
|
|
325
|
+
HET 0 ATP C2 C 0.644 -1.352 7.783
|
|
326
|
+
HET 0 ATP N3 N 0.088 -1.178 6.602
|
|
327
|
+
HET 0 ATP C4 C 0.644 -0.371 5.704
|
|
328
|
+
HET 0 ATP H5'1 H -2.678 0.312 -0.296
|
|
329
|
+
HET 0 ATP H5'2 H -1.263 1.259 0.221
|
|
330
|
+
HET 0 ATP H4' H -2.275 -1.304 1.550
|
|
331
|
+
HET 0 ATP H3' H -2.651 1.649 2.078
|
|
332
|
+
HET 0 ATP HO3' H -4.515 0.788 3.094
|
|
333
|
+
HET 0 ATP H2' H -1.646 1.537 4.157
|
|
334
|
+
HET 0 ATP HO2' H -3.667 0.662 4.867
|
|
335
|
+
HET 0 ATP H1' H -1.119 -1.430 3.931
|
|
336
|
+
HET 0 ATP H8 H 1.334 1.357 3.044
|
|
337
|
+
HET 0 ATP HN61 H 3.938 0.548 8.562
|
|
338
|
+
HET 0 ATP HN62 H 4.015 1.303 7.064
|
|
339
|
+
HET 0 ATP H2 H 0.166 -2.014 8.490
|
|
340
340
|
<BLANKLINE>
|
|
341
341
|
"""
|
|
342
342
|
if array.bonds is None:
|
|
Binary file
|
biotite/structure/segments.py
CHANGED
|
@@ -16,7 +16,7 @@ __all__ = [
|
|
|
16
16
|
import numpy as np
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
def apply_segment_wise(starts, data, function, axis):
|
|
19
|
+
def apply_segment_wise(starts, data, function, axis=None):
|
|
20
20
|
"""
|
|
21
21
|
Generalized version of :func:`apply_residue_wise()` for
|
|
22
22
|
residues and chains.
|
|
@@ -36,7 +36,6 @@ def apply_segment_wise(starts, data, function, axis):
|
|
|
36
36
|
value = function(segment)
|
|
37
37
|
else:
|
|
38
38
|
value = function(segment, axis=axis)
|
|
39
|
-
value = function(segment, axis=axis)
|
|
40
39
|
# Identify the shape of the resulting array by evaluation
|
|
41
40
|
# of the function return value for the first segment
|
|
42
41
|
if processed_data is None:
|
biotite/structure/util.py
CHANGED
|
@@ -8,9 +8,18 @@ Utility functions for in internal use in `Bio.Structure` package
|
|
|
8
8
|
|
|
9
9
|
__name__ = "biotite.structure"
|
|
10
10
|
__author__ = "Patrick Kunzmann"
|
|
11
|
-
__all__ = [
|
|
11
|
+
__all__ = [
|
|
12
|
+
"vector_dot",
|
|
13
|
+
"norm_vector",
|
|
14
|
+
"distance",
|
|
15
|
+
"matrix_rotate",
|
|
16
|
+
"coord_for_atom_name_per_residue",
|
|
17
|
+
]
|
|
12
18
|
|
|
13
19
|
import numpy as np
|
|
20
|
+
from biotite.structure.atoms import AtomArrayStack
|
|
21
|
+
from biotite.structure.error import BadStructureError
|
|
22
|
+
from biotite.structure.residues import get_residue_masks, get_residue_starts
|
|
14
23
|
|
|
15
24
|
|
|
16
25
|
def vector_dot(v1, v2):
|
|
@@ -94,3 +103,66 @@ def matrix_rotate(v, matrix):
|
|
|
94
103
|
if orig_ndim > 2:
|
|
95
104
|
v = v.reshape(*orig_shape)
|
|
96
105
|
return v
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def coord_for_atom_name_per_residue(atoms, atom_names, mask=None):
|
|
109
|
+
"""
|
|
110
|
+
Get the coordinates of a specific atom for every residue.
|
|
111
|
+
|
|
112
|
+
If a residue does not contain the specified atom, the coordinates are `NaN`.
|
|
113
|
+
If a residue contains multiple atoms with the specified name, an exception is
|
|
114
|
+
raised.
|
|
115
|
+
|
|
116
|
+
Parameters
|
|
117
|
+
----------
|
|
118
|
+
atoms : AtomArray, shape=(n,) or AtomArrayStack, shape=(m,n)
|
|
119
|
+
The atom array or stack to get the residue-wise coordinates from.
|
|
120
|
+
atom_names : list of str, length=k
|
|
121
|
+
The atom names to get the coordinates for.
|
|
122
|
+
mask : ndarray, shape=(n,), dtype=bool, optional
|
|
123
|
+
A boolean mask to further select valid atoms from `atoms`.
|
|
124
|
+
|
|
125
|
+
Returns
|
|
126
|
+
-------
|
|
127
|
+
coord: ndarray, shape=(k, m, r, 3) or shape=(k, r, 3)
|
|
128
|
+
The coordinates of the specified atom for each residue.
|
|
129
|
+
"""
|
|
130
|
+
is_multi_model = isinstance(atoms, AtomArrayStack)
|
|
131
|
+
residue_starts = get_residue_starts(atoms)
|
|
132
|
+
all_residue_masks = get_residue_masks(atoms, residue_starts)
|
|
133
|
+
|
|
134
|
+
if is_multi_model:
|
|
135
|
+
coord = np.full(
|
|
136
|
+
(len(atom_names), atoms.stack_depth(), len(residue_starts), 3),
|
|
137
|
+
np.nan,
|
|
138
|
+
dtype=np.float32,
|
|
139
|
+
)
|
|
140
|
+
else:
|
|
141
|
+
coord = np.full(
|
|
142
|
+
(len(atom_names), len(residue_starts), 3),
|
|
143
|
+
np.nan,
|
|
144
|
+
dtype=np.float32,
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
for i, atom_name in enumerate(atom_names):
|
|
148
|
+
specified_atom_mask = atoms.atom_name == atom_name
|
|
149
|
+
if mask is not None:
|
|
150
|
+
specified_atom_mask &= mask
|
|
151
|
+
all_residue_masks_for_specified_atom = all_residue_masks & specified_atom_mask
|
|
152
|
+
number_of_specified_atoms_per_residue = np.count_nonzero(
|
|
153
|
+
all_residue_masks_for_specified_atom, axis=-1
|
|
154
|
+
)
|
|
155
|
+
if np.any(number_of_specified_atoms_per_residue > 1):
|
|
156
|
+
raise BadStructureError(f"Multiple '{atom_name}' atoms per residue")
|
|
157
|
+
residues_with_specified_atom = number_of_specified_atoms_per_residue == 1
|
|
158
|
+
coord_of_specified_atoms = atoms.coord[..., specified_atom_mask, :]
|
|
159
|
+
if is_multi_model:
|
|
160
|
+
# Swap dimensions due to NumPy's behavior when using advanced indexing
|
|
161
|
+
# (https://numpy.org/devdocs/user/basics.indexing.html#combining-advanced-and-basic-indexing)
|
|
162
|
+
coord[i, ..., residues_with_specified_atom, :] = (
|
|
163
|
+
coord_of_specified_atoms.transpose(1, 0, 2)
|
|
164
|
+
)
|
|
165
|
+
else:
|
|
166
|
+
coord[i, residues_with_specified_atom, :] = coord_of_specified_atoms
|
|
167
|
+
|
|
168
|
+
return coord
|
biotite/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: biotite
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: A comprehensive library for computational molecular biology
|
|
5
5
|
Project-URL: homepage, https://www.biotite-python.org
|
|
6
6
|
Project-URL: repository, https://github.com/biotite-dev/biotite
|
|
@@ -54,6 +54,8 @@ Requires-Dist: msgpack>=0.5.6
|
|
|
54
54
|
Requires-Dist: networkx>=2.0
|
|
55
55
|
Requires-Dist: numpy>=1.25
|
|
56
56
|
Requires-Dist: requests>=2.12
|
|
57
|
+
Provides-Extra: lint
|
|
58
|
+
Requires-Dist: ruff==0.6.9; extra == 'lint'
|
|
57
59
|
Provides-Extra: test
|
|
58
60
|
Requires-Dist: pytest; extra == 'test'
|
|
59
61
|
Requires-Dist: pytest-codspeed; extra == 'test'
|