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.

Files changed (90) hide show
  1. biotite/application/dssp/app.py +13 -3
  2. biotite/application/localapp.py +34 -0
  3. biotite/application/muscle/app3.py +2 -15
  4. biotite/application/muscle/app5.py +2 -2
  5. biotite/application/util.py +1 -1
  6. biotite/application/viennarna/rnaplot.py +6 -2
  7. biotite/database/rcsb/query.py +6 -6
  8. biotite/database/uniprot/check.py +20 -15
  9. biotite/database/uniprot/download.py +1 -1
  10. biotite/database/uniprot/query.py +1 -1
  11. biotite/sequence/align/alignment.py +16 -3
  12. biotite/sequence/align/banded.cp312-win_amd64.pyd +0 -0
  13. biotite/sequence/align/banded.pyx +5 -5
  14. biotite/sequence/align/kmeralphabet.cp312-win_amd64.pyd +0 -0
  15. biotite/sequence/align/kmeralphabet.pyx +17 -0
  16. biotite/sequence/align/kmersimilarity.cp312-win_amd64.pyd +0 -0
  17. biotite/sequence/align/kmertable.cp312-win_amd64.pyd +0 -0
  18. biotite/sequence/align/kmertable.pyx +52 -42
  19. biotite/sequence/align/localgapped.cp312-win_amd64.pyd +0 -0
  20. biotite/sequence/align/localungapped.cp312-win_amd64.pyd +0 -0
  21. biotite/sequence/align/matrix.py +273 -55
  22. biotite/sequence/align/matrix_data/3Di.mat +24 -0
  23. biotite/sequence/align/matrix_data/PB.license +21 -0
  24. biotite/sequence/align/matrix_data/PB.mat +18 -0
  25. biotite/sequence/align/multiple.cp312-win_amd64.pyd +0 -0
  26. biotite/sequence/align/pairwise.cp312-win_amd64.pyd +0 -0
  27. biotite/sequence/align/permutation.cp312-win_amd64.pyd +0 -0
  28. biotite/sequence/align/selector.cp312-win_amd64.pyd +0 -0
  29. biotite/sequence/align/tracetable.cp312-win_amd64.pyd +0 -0
  30. biotite/sequence/alphabet.py +3 -0
  31. biotite/sequence/codec.cp312-win_amd64.pyd +0 -0
  32. biotite/sequence/graphics/color_schemes/3di_flower.json +48 -0
  33. biotite/sequence/graphics/color_schemes/pb_flower.json +2 -1
  34. biotite/sequence/graphics/colorschemes.py +44 -11
  35. biotite/sequence/phylo/nj.cp312-win_amd64.pyd +0 -0
  36. biotite/sequence/phylo/tree.cp312-win_amd64.pyd +0 -0
  37. biotite/sequence/phylo/upgma.cp312-win_amd64.pyd +0 -0
  38. biotite/sequence/profile.py +86 -4
  39. biotite/sequence/seqtypes.py +124 -3
  40. biotite/setup_ccd.py +197 -0
  41. biotite/structure/__init__.py +4 -3
  42. biotite/structure/alphabet/__init__.py +25 -0
  43. biotite/structure/alphabet/encoder.py +332 -0
  44. biotite/structure/alphabet/encoder_weights_3di.kerasify +0 -0
  45. biotite/structure/alphabet/i3d.py +110 -0
  46. biotite/structure/alphabet/layers.py +86 -0
  47. biotite/structure/alphabet/pb.license +21 -0
  48. biotite/structure/alphabet/pb.py +171 -0
  49. biotite/structure/alphabet/unkerasify.py +122 -0
  50. biotite/structure/atoms.py +129 -40
  51. biotite/structure/bonds.cp312-win_amd64.pyd +0 -0
  52. biotite/structure/bonds.pyx +72 -21
  53. biotite/structure/celllist.cp312-win_amd64.pyd +0 -0
  54. biotite/structure/charges.cp312-win_amd64.pyd +0 -0
  55. biotite/structure/geometry.py +60 -113
  56. biotite/structure/info/__init__.py +1 -0
  57. biotite/structure/info/atoms.py +13 -13
  58. biotite/structure/info/bonds.py +12 -6
  59. biotite/structure/info/ccd.py +125 -32
  60. biotite/structure/info/{ccd/components.bcif → components.bcif} +0 -0
  61. biotite/structure/info/groups.py +63 -17
  62. biotite/structure/info/masses.py +9 -6
  63. biotite/structure/info/misc.py +15 -21
  64. biotite/structure/info/standardize.py +3 -2
  65. biotite/structure/io/mol/sdf.py +41 -40
  66. biotite/structure/io/pdb/convert.py +2 -0
  67. biotite/structure/io/pdb/file.py +74 -3
  68. biotite/structure/io/pdb/hybrid36.cp312-win_amd64.pyd +0 -0
  69. biotite/structure/io/pdbqt/file.py +32 -32
  70. biotite/structure/io/pdbx/__init__.py +1 -0
  71. biotite/structure/io/pdbx/bcif.py +32 -8
  72. biotite/structure/io/pdbx/cif.py +72 -59
  73. biotite/structure/io/pdbx/component.py +9 -4
  74. biotite/structure/io/pdbx/compress.py +321 -0
  75. biotite/structure/io/pdbx/convert.py +194 -48
  76. biotite/structure/io/pdbx/encoding.cp312-win_amd64.pyd +0 -0
  77. biotite/structure/io/pdbx/encoding.pyx +98 -17
  78. biotite/structure/molecules.py +141 -141
  79. biotite/structure/sasa.cp312-win_amd64.pyd +0 -0
  80. biotite/structure/segments.py +1 -2
  81. biotite/structure/util.py +73 -1
  82. biotite/version.py +2 -2
  83. {biotite-1.0.1.dist-info → biotite-1.1.0.dist-info}/METADATA +3 -1
  84. {biotite-1.0.1.dist-info → biotite-1.1.0.dist-info}/RECORD +86 -76
  85. biotite/structure/info/ccd/README.rst +0 -8
  86. biotite/structure/info/ccd/amino_acids.txt +0 -1663
  87. biotite/structure/info/ccd/carbohydrates.txt +0 -1135
  88. biotite/structure/info/ccd/nucleotides.txt +0 -798
  89. {biotite-1.0.1.dist-info → biotite-1.1.0.dist-info}/WHEEL +0 -0
  90. {biotite-1.0.1.dist-info → biotite-1.1.0.dist-info}/licenses/LICENSE.rst +0 -0
@@ -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.230 -6.850
67
- HET 0 ATP O1G O 1.740 1.140 -6.670
68
- HET 0 ATP O2G O 2.120 -1.040 -7.890
69
- HET 0 ATP O3G O -0.300 -0.140 -7.420
70
- HET 0 ATP PB P 0.260 -0.130 -4.450
71
- HET 0 ATP O1B O 0.810 1.230 -4.300
72
- HET 0 ATP O2B O -1.230 -0.040 -5.060
73
- HET 0 ATP O3B O 1.190 -0.990 -5.430
74
- HET 0 ATP PA P -0.740 0.070 -2.070
75
- HET 0 ATP O1A O -2.100 0.140 -2.670
76
- HET 0 ATP O2A O -0.120 1.550 -1.960
77
- HET 0 ATP O3A O 0.200 -0.840 -3.000
78
- HET 0 ATP HOG2 H 2.100 -0.550 -8.730
79
- HET 0 ATP HOG3 H -0.620 -1.050 -7.520
80
- HET 0 ATP HOB2 H -1.550 -0.950 -5.130
81
- HET 0 ATP HOA2 H 0.750 1.460 -1.560
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.840 -0.590 -0.600
84
- HET 0 ATP C5' C -1.690 0.260 0.170
85
- HET 0 ATP C4' C -1.830 -0.310 1.580
86
- HET 0 ATP O4' O -0.540 -0.360 2.230
87
- HET 0 ATP C3' C -2.680 0.630 2.460
88
- HET 0 ATP O3' O -4.030 0.160 2.530
89
- HET 0 ATP C2' C -2.010 0.560 3.860
90
- HET 0 ATP O2' O -2.930 0.040 4.830
91
- HET 0 ATP C1' C -0.830 -0.420 3.650
92
- HET 0 ATP N9 N 0.330 0.020 4.430
93
- HET 0 ATP C8 C 1.300 0.880 4.010
94
- HET 0 ATP N7 N 2.180 1.040 4.960
95
- HET 0 ATP C5 C 1.830 0.300 6.030
96
- HET 0 ATP C6 C 2.390 0.080 7.300
97
- HET 0 ATP N6 N 3.560 0.710 7.680
98
- HET 0 ATP N1 N 1.760 -0.750 8.140
99
- HET 0 ATP C2 C 0.640 -1.350 7.780
100
- HET 0 ATP N3 N 0.090 -1.180 6.600
101
- HET 0 ATP C4 C 0.640 -0.370 5.700
102
- HET 0 ATP H5'1 H -2.680 0.310 -0.300
103
- HET 0 ATP H5'2 H -1.260 1.260 0.220
104
- HET 0 ATP H4' H -2.280 -1.300 1.550
105
- HET 0 ATP H3' H -2.650 1.650 2.080
106
- HET 0 ATP HO3' H -4.520 0.790 3.090
107
- HET 0 ATP H2' H -1.650 1.540 4.160
108
- HET 0 ATP HO2' H -3.670 0.660 4.870
109
- HET 0 ATP H1' H -1.120 -1.430 3.930
110
- HET 0 ATP H8 H 1.330 1.360 3.040
111
- HET 0 ATP HN61 H 3.940 0.550 8.560
112
- HET 0 ATP HN62 H 4.020 1.300 7.060
113
- HET 0 ATP H2 H 0.170 -2.010 8.490
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.230 -6.850
185
- HET 0 ATP O1G O 1.740 1.140 -6.670
186
- HET 0 ATP O2G O 2.120 -1.040 -7.890
187
- HET 0 ATP O3G O -0.300 -0.140 -7.420
188
- HET 0 ATP PB P 0.260 -0.130 -4.450
189
- HET 0 ATP O1B O 0.810 1.230 -4.300
190
- HET 0 ATP O2B O -1.230 -0.040 -5.060
191
- HET 0 ATP O3B O 1.190 -0.990 -5.430
192
- HET 0 ATP PA P -0.740 0.070 -2.070
193
- HET 0 ATP O1A O -2.100 0.140 -2.670
194
- HET 0 ATP O2A O -0.120 1.550 -1.960
195
- HET 0 ATP O3A O 0.200 -0.840 -3.000
196
- HET 0 ATP HOG2 H 2.100 -0.550 -8.730
197
- HET 0 ATP HOG3 H -0.620 -1.050 -7.520
198
- HET 0 ATP HOB2 H -1.550 -0.950 -5.130
199
- HET 0 ATP HOA2 H 0.750 1.460 -1.560
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.840 -0.590 -0.600
202
- HET 0 ATP C5' C -1.690 0.260 0.170
203
- HET 0 ATP C4' C -1.830 -0.310 1.580
204
- HET 0 ATP O4' O -0.540 -0.360 2.230
205
- HET 0 ATP C3' C -2.680 0.630 2.460
206
- HET 0 ATP O3' O -4.030 0.160 2.530
207
- HET 0 ATP C2' C -2.010 0.560 3.860
208
- HET 0 ATP O2' O -2.930 0.040 4.830
209
- HET 0 ATP C1' C -0.830 -0.420 3.650
210
- HET 0 ATP N9 N 0.330 0.020 4.430
211
- HET 0 ATP C8 C 1.300 0.880 4.010
212
- HET 0 ATP N7 N 2.180 1.040 4.960
213
- HET 0 ATP C5 C 1.830 0.300 6.030
214
- HET 0 ATP C6 C 2.390 0.080 7.300
215
- HET 0 ATP N6 N 3.560 0.710 7.680
216
- HET 0 ATP N1 N 1.760 -0.750 8.140
217
- HET 0 ATP C2 C 0.640 -1.350 7.780
218
- HET 0 ATP N3 N 0.090 -1.180 6.600
219
- HET 0 ATP C4 C 0.640 -0.370 5.700
220
- HET 0 ATP H5'1 H -2.680 0.310 -0.300
221
- HET 0 ATP H5'2 H -1.260 1.260 0.220
222
- HET 0 ATP H4' H -2.280 -1.300 1.550
223
- HET 0 ATP H3' H -2.650 1.650 2.080
224
- HET 0 ATP HO3' H -4.520 0.790 3.090
225
- HET 0 ATP H2' H -1.650 1.540 4.160
226
- HET 0 ATP HO2' H -3.670 0.660 4.870
227
- HET 0 ATP H1' H -1.120 -1.430 3.930
228
- HET 0 ATP H8 H 1.330 1.360 3.040
229
- HET 0 ATP HN61 H 3.940 0.550 8.560
230
- HET 0 ATP HN62 H 4.020 1.300 7.060
231
- HET 0 ATP H2 H 0.170 -2.010 8.490
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.230 -6.850
292
- HET 0 ATP O1G O 1.740 1.140 -6.670
293
- HET 0 ATP O2G O 2.120 -1.040 -7.890
294
- HET 0 ATP O3G O -0.300 -0.140 -7.420
295
- HET 0 ATP PB P 0.260 -0.130 -4.450
296
- HET 0 ATP O1B O 0.810 1.230 -4.300
297
- HET 0 ATP O2B O -1.230 -0.040 -5.060
298
- HET 0 ATP O3B O 1.190 -0.990 -5.430
299
- HET 0 ATP PA P -0.740 0.070 -2.070
300
- HET 0 ATP O1A O -2.100 0.140 -2.670
301
- HET 0 ATP O2A O -0.120 1.550 -1.960
302
- HET 0 ATP O3A O 0.200 -0.840 -3.000
303
- HET 0 ATP HOG2 H 2.100 -0.550 -8.730
304
- HET 0 ATP HOG3 H -0.620 -1.050 -7.520
305
- HET 0 ATP HOB2 H -1.550 -0.950 -5.130
306
- HET 0 ATP HOA2 H 0.750 1.460 -1.560
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.840 -0.590 -0.600
310
- HET 0 ATP C5' C -1.690 0.260 0.170
311
- HET 0 ATP C4' C -1.830 -0.310 1.580
312
- HET 0 ATP O4' O -0.540 -0.360 2.230
313
- HET 0 ATP C3' C -2.680 0.630 2.460
314
- HET 0 ATP O3' O -4.030 0.160 2.530
315
- HET 0 ATP C2' C -2.010 0.560 3.860
316
- HET 0 ATP O2' O -2.930 0.040 4.830
317
- HET 0 ATP C1' C -0.830 -0.420 3.650
318
- HET 0 ATP N9 N 0.330 0.020 4.430
319
- HET 0 ATP C8 C 1.300 0.880 4.010
320
- HET 0 ATP N7 N 2.180 1.040 4.960
321
- HET 0 ATP C5 C 1.830 0.300 6.030
322
- HET 0 ATP C6 C 2.390 0.080 7.300
323
- HET 0 ATP N6 N 3.560 0.710 7.680
324
- HET 0 ATP N1 N 1.760 -0.750 8.140
325
- HET 0 ATP C2 C 0.640 -1.350 7.780
326
- HET 0 ATP N3 N 0.090 -1.180 6.600
327
- HET 0 ATP C4 C 0.640 -0.370 5.700
328
- HET 0 ATP H5'1 H -2.680 0.310 -0.300
329
- HET 0 ATP H5'2 H -1.260 1.260 0.220
330
- HET 0 ATP H4' H -2.280 -1.300 1.550
331
- HET 0 ATP H3' H -2.650 1.650 2.080
332
- HET 0 ATP HO3' H -4.520 0.790 3.090
333
- HET 0 ATP H2' H -1.650 1.540 4.160
334
- HET 0 ATP HO2' H -3.670 0.660 4.870
335
- HET 0 ATP H1' H -1.120 -1.430 3.930
336
- HET 0 ATP H8 H 1.330 1.360 3.040
337
- HET 0 ATP HN61 H 3.940 0.550 8.560
338
- HET 0 ATP HN62 H 4.020 1.300 7.060
339
- HET 0 ATP H2 H 0.170 -2.010 8.490
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
@@ -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__ = ["vector_dot", "norm_vector", "distance", "matrix_rotate"]
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
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.0.1'
16
- __version_tuple__ = version_tuple = (1, 0, 1)
15
+ __version__ = version = '1.1.0'
16
+ __version_tuple__ = version_tuple = (1, 1, 0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: biotite
3
- Version: 1.0.1
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'