biotite 1.1.0__cp311-cp311-win_amd64.whl → 1.2.0__cp311-cp311-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/application.py +3 -3
- biotite/application/autodock/app.py +1 -1
- biotite/application/blast/webapp.py +1 -1
- biotite/application/clustalo/app.py +1 -1
- biotite/application/localapp.py +2 -2
- biotite/application/msaapp.py +10 -10
- biotite/application/muscle/app3.py +3 -3
- biotite/application/muscle/app5.py +3 -3
- biotite/application/sra/app.py +0 -5
- biotite/application/util.py +21 -1
- biotite/application/viennarna/rnaalifold.py +8 -8
- biotite/application/viennarna/rnaplot.py +3 -1
- biotite/application/viennarna/util.py +1 -1
- biotite/application/webapp.py +1 -1
- biotite/database/afdb/__init__.py +12 -0
- biotite/database/afdb/download.py +191 -0
- biotite/database/entrez/dbnames.py +10 -0
- biotite/database/entrez/download.py +9 -10
- biotite/database/entrez/key.py +1 -1
- biotite/database/entrez/query.py +5 -4
- biotite/database/pubchem/download.py +6 -6
- biotite/database/pubchem/error.py +10 -0
- biotite/database/pubchem/query.py +12 -23
- biotite/database/rcsb/download.py +3 -2
- biotite/database/rcsb/query.py +2 -3
- biotite/database/uniprot/check.py +2 -2
- biotite/database/uniprot/download.py +2 -5
- biotite/database/uniprot/query.py +3 -4
- biotite/file.py +14 -2
- biotite/interface/__init__.py +19 -0
- biotite/interface/openmm/__init__.py +16 -0
- biotite/interface/openmm/state.py +93 -0
- biotite/interface/openmm/system.py +227 -0
- biotite/interface/pymol/__init__.py +198 -0
- biotite/interface/pymol/cgo.py +346 -0
- biotite/interface/pymol/convert.py +185 -0
- biotite/interface/pymol/display.py +267 -0
- biotite/interface/pymol/object.py +1226 -0
- biotite/interface/pymol/shapes.py +178 -0
- biotite/interface/pymol/startup.py +169 -0
- biotite/interface/rdkit/__init__.py +15 -0
- biotite/interface/rdkit/mol.py +490 -0
- biotite/interface/version.py +71 -0
- biotite/interface/warning.py +19 -0
- biotite/sequence/align/__init__.py +0 -4
- biotite/sequence/align/alignment.py +33 -11
- biotite/sequence/align/banded.cp311-win_amd64.pyd +0 -0
- biotite/sequence/align/banded.pyx +21 -21
- biotite/sequence/align/cigar.py +2 -2
- biotite/sequence/align/kmeralphabet.cp311-win_amd64.pyd +0 -0
- biotite/sequence/align/kmeralphabet.pyx +2 -2
- biotite/sequence/align/kmersimilarity.cp311-win_amd64.pyd +0 -0
- biotite/sequence/align/kmertable.cp311-win_amd64.pyd +0 -0
- biotite/sequence/align/kmertable.pyx +6 -6
- biotite/sequence/align/localgapped.cp311-win_amd64.pyd +0 -0
- biotite/sequence/align/localgapped.pyx +47 -47
- biotite/sequence/align/localungapped.cp311-win_amd64.pyd +0 -0
- biotite/sequence/align/localungapped.pyx +10 -10
- biotite/sequence/align/matrix.py +12 -3
- biotite/sequence/align/multiple.cp311-win_amd64.pyd +0 -0
- biotite/sequence/align/pairwise.cp311-win_amd64.pyd +0 -0
- biotite/sequence/align/pairwise.pyx +35 -35
- biotite/sequence/align/permutation.cp311-win_amd64.pyd +0 -0
- biotite/sequence/align/selector.cp311-win_amd64.pyd +0 -0
- biotite/sequence/align/selector.pyx +2 -2
- biotite/sequence/align/statistics.py +1 -1
- biotite/sequence/align/tracetable.cp311-win_amd64.pyd +0 -0
- biotite/sequence/alphabet.py +2 -2
- biotite/sequence/annotation.py +19 -13
- biotite/sequence/codec.cp311-win_amd64.pyd +0 -0
- biotite/sequence/codon.py +1 -2
- biotite/sequence/graphics/alignment.py +25 -39
- biotite/sequence/graphics/dendrogram.py +4 -2
- biotite/sequence/graphics/features.py +2 -2
- biotite/sequence/graphics/logo.py +10 -12
- biotite/sequence/io/fasta/convert.py +1 -2
- biotite/sequence/io/fasta/file.py +1 -1
- biotite/sequence/io/fastq/file.py +3 -3
- biotite/sequence/io/genbank/file.py +3 -3
- biotite/sequence/io/genbank/sequence.py +2 -0
- biotite/sequence/io/gff/convert.py +1 -1
- biotite/sequence/io/gff/file.py +1 -2
- biotite/sequence/phylo/nj.cp311-win_amd64.pyd +0 -0
- biotite/sequence/phylo/tree.cp311-win_amd64.pyd +0 -0
- biotite/sequence/phylo/upgma.cp311-win_amd64.pyd +0 -0
- biotite/sequence/profile.py +19 -25
- biotite/sequence/search.py +0 -1
- biotite/sequence/seqtypes.py +12 -5
- biotite/sequence/sequence.py +1 -2
- biotite/structure/__init__.py +2 -0
- biotite/structure/alphabet/i3d.py +1 -2
- biotite/structure/alphabet/pb.py +1 -2
- biotite/structure/alphabet/unkerasify.py +8 -2
- biotite/structure/atoms.py +35 -27
- biotite/structure/basepairs.py +26 -26
- biotite/structure/bonds.cp311-win_amd64.pyd +0 -0
- biotite/structure/bonds.pyx +8 -5
- biotite/structure/box.py +19 -21
- biotite/structure/celllist.cp311-win_amd64.pyd +0 -0
- biotite/structure/celllist.pyx +83 -67
- biotite/structure/chains.py +5 -37
- biotite/structure/charges.cp311-win_amd64.pyd +0 -0
- biotite/structure/compare.py +420 -13
- biotite/structure/density.py +1 -1
- biotite/structure/dotbracket.py +27 -28
- biotite/structure/filter.py +8 -8
- biotite/structure/geometry.py +15 -15
- biotite/structure/hbond.py +17 -19
- biotite/structure/info/atoms.py +11 -2
- biotite/structure/info/ccd.py +0 -2
- biotite/structure/info/components.bcif +0 -0
- biotite/structure/info/groups.py +0 -3
- biotite/structure/info/misc.py +0 -1
- biotite/structure/info/radii.py +92 -22
- biotite/structure/info/standardize.py +1 -2
- biotite/structure/integrity.py +4 -6
- biotite/structure/io/general.py +2 -2
- biotite/structure/io/gro/file.py +8 -9
- biotite/structure/io/mol/convert.py +1 -1
- biotite/structure/io/mol/ctab.py +33 -28
- biotite/structure/io/mol/mol.py +1 -1
- biotite/structure/io/mol/sdf.py +39 -13
- biotite/structure/io/pdb/convert.py +2 -3
- biotite/structure/io/pdb/file.py +11 -22
- biotite/structure/io/pdb/hybrid36.cp311-win_amd64.pyd +0 -0
- biotite/structure/io/pdbqt/file.py +4 -4
- biotite/structure/io/pdbx/bcif.py +22 -7
- biotite/structure/io/pdbx/cif.py +20 -7
- biotite/structure/io/pdbx/component.py +6 -0
- biotite/structure/io/pdbx/compress.py +2 -2
- biotite/structure/io/pdbx/convert.py +222 -33
- biotite/structure/io/pdbx/encoding.cp311-win_amd64.pyd +0 -0
- biotite/structure/io/trajfile.py +9 -6
- biotite/structure/io/util.py +38 -0
- biotite/structure/mechanics.py +0 -1
- biotite/structure/molecules.py +0 -15
- biotite/structure/pseudoknots.py +7 -13
- biotite/structure/repair.py +2 -4
- biotite/structure/residues.py +13 -24
- biotite/structure/rings.py +335 -0
- biotite/structure/sasa.cp311-win_amd64.pyd +0 -0
- biotite/structure/sasa.pyx +2 -1
- biotite/structure/segments.py +68 -9
- biotite/structure/sequence.py +0 -1
- biotite/structure/sse.py +0 -2
- biotite/structure/superimpose.py +74 -62
- biotite/structure/tm.py +581 -0
- biotite/structure/transform.py +12 -25
- biotite/structure/util.py +3 -3
- biotite/version.py +9 -4
- biotite/visualize.py +111 -1
- {biotite-1.1.0.dist-info → biotite-1.2.0.dist-info}/METADATA +5 -3
- {biotite-1.1.0.dist-info → biotite-1.2.0.dist-info}/RECORD +155 -135
- {biotite-1.1.0.dist-info → biotite-1.2.0.dist-info}/WHEEL +0 -0
- {biotite-1.1.0.dist-info → biotite-1.2.0.dist-info}/licenses/LICENSE.rst +0 -0
biotite/structure/util.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# information.
|
|
4
4
|
|
|
5
5
|
"""
|
|
6
|
-
Utility functions for in internal use in `Bio.Structure` package
|
|
6
|
+
Utility functions for in internal use in `Bio.Structure` package.
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
9
|
__name__ = "biotite.structure"
|
|
@@ -28,7 +28,7 @@ def vector_dot(v1, v2):
|
|
|
28
28
|
|
|
29
29
|
Parameters
|
|
30
30
|
----------
|
|
31
|
-
v1,v2 : ndarray
|
|
31
|
+
v1, v2 : ndarray
|
|
32
32
|
The arrays to calculate the product from.
|
|
33
33
|
The vectors are represented by the last axis.
|
|
34
34
|
|
|
@@ -63,7 +63,7 @@ def distance(v1, v2):
|
|
|
63
63
|
|
|
64
64
|
Parameters
|
|
65
65
|
----------
|
|
66
|
-
v1,v2 : ndarray
|
|
66
|
+
v1, v2 : ndarray
|
|
67
67
|
The arrays to calculate the product from.
|
|
68
68
|
The vectors are represented by the last axis.
|
|
69
69
|
|
biotite/version.py
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
# file generated by
|
|
1
|
+
# file generated by setuptools-scm
|
|
2
2
|
# don't change, don't track in version control
|
|
3
|
+
|
|
4
|
+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
|
|
5
|
+
|
|
3
6
|
TYPE_CHECKING = False
|
|
4
7
|
if TYPE_CHECKING:
|
|
5
|
-
from typing import Tuple
|
|
8
|
+
from typing import Tuple
|
|
9
|
+
from typing import Union
|
|
10
|
+
|
|
6
11
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
7
12
|
else:
|
|
8
13
|
VERSION_TUPLE = object
|
|
@@ -12,5 +17,5 @@ __version__: str
|
|
|
12
17
|
__version_tuple__: VERSION_TUPLE
|
|
13
18
|
version_tuple: VERSION_TUPLE
|
|
14
19
|
|
|
15
|
-
__version__ = version = '1.
|
|
16
|
-
__version_tuple__ = version_tuple = (1,
|
|
20
|
+
__version__ = version = '1.2.0'
|
|
21
|
+
__version_tuple__ = version_tuple = (1, 2, 0)
|
biotite/visualize.py
CHANGED
|
@@ -4,12 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
__name__ = "biotite"
|
|
6
6
|
__author__ = "Patrick Kunzmann"
|
|
7
|
-
__all__ = ["colors", "set_font_size_in_coord", "AdaptiveFancyArrow"]
|
|
7
|
+
__all__ = ["colors", "plot_scaled_text", "set_font_size_in_coord", "AdaptiveFancyArrow"]
|
|
8
8
|
|
|
9
|
+
import warnings
|
|
9
10
|
from collections import OrderedDict
|
|
10
11
|
import numpy as np
|
|
11
12
|
from numpy.linalg import norm
|
|
12
13
|
|
|
14
|
+
_FONT_PROPERTY_KEYS = ["family", "style", "variant", "weight", "stretch", "size"]
|
|
15
|
+
|
|
16
|
+
|
|
13
17
|
# Biotite themed colors
|
|
14
18
|
colors = OrderedDict(
|
|
15
19
|
[
|
|
@@ -27,6 +31,105 @@ colors = OrderedDict(
|
|
|
27
31
|
)
|
|
28
32
|
|
|
29
33
|
|
|
34
|
+
def plot_scaled_text(
|
|
35
|
+
axes, text, x, y, width=None, height=None, mode="unlocked", **kwargs
|
|
36
|
+
):
|
|
37
|
+
"""
|
|
38
|
+
Create a :class:`matplotlib.textpath.TextPath`, whose text size is given in
|
|
39
|
+
coordinates instead of font size.
|
|
40
|
+
|
|
41
|
+
Parameters
|
|
42
|
+
----------
|
|
43
|
+
axes : Axes
|
|
44
|
+
The axes to draw the text on.
|
|
45
|
+
text : str
|
|
46
|
+
The text to be drawn.
|
|
47
|
+
x, y : float
|
|
48
|
+
The lower left position of the text.
|
|
49
|
+
width, height : float, optional
|
|
50
|
+
The width/height `text` should have in its reference coordinate system.
|
|
51
|
+
At least one value must be supplied.
|
|
52
|
+
mode : {'proportional', 'unlocked', 'maximum', 'minimum'}, optional
|
|
53
|
+
Defines how the text size is scaled.
|
|
54
|
+
The scaling mode:
|
|
55
|
+
|
|
56
|
+
- *proportional* - The width and height are scaled by the
|
|
57
|
+
same extent.
|
|
58
|
+
Either `width` or `height` must be set for this mode.
|
|
59
|
+
- *unlocked* - The width and the height are scaled by
|
|
60
|
+
different extents, changing the aspect ratio of the text.
|
|
61
|
+
Both `width` and `height` must be set for this mode.
|
|
62
|
+
- *maximum* - The width and the height are scaled by
|
|
63
|
+
the same extent, so that they are at maximum as large
|
|
64
|
+
as the supplied `width`/`height`.
|
|
65
|
+
Both `width` and `height` must be set for this mode.
|
|
66
|
+
- *minimum* - The width and the height are scaled by
|
|
67
|
+
the same extent, so that they are at minimum as large
|
|
68
|
+
as the supplied `width`/`height`.
|
|
69
|
+
Both `width` and `height` must be set for this mode.
|
|
70
|
+
|
|
71
|
+
**kwargs
|
|
72
|
+
Additional parameters for the :class:`matplotlib.font_manager.FontProperties`
|
|
73
|
+
of the text or the created :class:`matplotlib.patches.PathPatch`.
|
|
74
|
+
|
|
75
|
+
Returns
|
|
76
|
+
-------
|
|
77
|
+
patch : matplotlib.patches.PathPatch
|
|
78
|
+
The patch that represents the text.
|
|
79
|
+
"""
|
|
80
|
+
from matplotlib.patches import PathPatch
|
|
81
|
+
from matplotlib.textpath import TextPath
|
|
82
|
+
from matplotlib.transforms import Affine2D
|
|
83
|
+
|
|
84
|
+
# The larger the size, the more there is an offset at the x-axis
|
|
85
|
+
# -> Keep font size small to reduce this error to a minimum
|
|
86
|
+
# The size is transformed to the desired size afterwards anyway
|
|
87
|
+
font_property_kwargs = {
|
|
88
|
+
key: kwargs.pop(key) for key in _FONT_PROPERTY_KEYS if key in kwargs
|
|
89
|
+
}
|
|
90
|
+
path = TextPath((x, y), text, size=1e-3, prop=font_property_kwargs)
|
|
91
|
+
bbox = path.get_extents()
|
|
92
|
+
|
|
93
|
+
if mode == "proportional":
|
|
94
|
+
if width is None:
|
|
95
|
+
# Proportional scaling based on height
|
|
96
|
+
scale_y = height / bbox.height
|
|
97
|
+
scale_x = scale_y
|
|
98
|
+
elif height is None:
|
|
99
|
+
# Proportional scaling based on width
|
|
100
|
+
scale_x = width / bbox.width
|
|
101
|
+
scale_y = scale_x
|
|
102
|
+
else:
|
|
103
|
+
raise ValueError(
|
|
104
|
+
"width or height are mutually exclusive in 'proportional' mode"
|
|
105
|
+
)
|
|
106
|
+
elif mode == "unlocked":
|
|
107
|
+
scale_x = width / bbox.width
|
|
108
|
+
scale_y = height / bbox.height
|
|
109
|
+
elif mode == "minimum":
|
|
110
|
+
scale_x = width / bbox.width
|
|
111
|
+
scale_y = height / bbox.height
|
|
112
|
+
scale = max(scale_x, scale_y)
|
|
113
|
+
scale_x, scale_y = scale, scale
|
|
114
|
+
elif mode == "maximum":
|
|
115
|
+
scale_x = width / bbox.width
|
|
116
|
+
scale_y = height / bbox.height
|
|
117
|
+
scale = min(scale_x, scale_y)
|
|
118
|
+
scale_x, scale_y = scale, scale
|
|
119
|
+
|
|
120
|
+
path = (
|
|
121
|
+
Affine2D()
|
|
122
|
+
.translate(-bbox.x0, -bbox.y0)
|
|
123
|
+
.scale(scale_x, scale_y)
|
|
124
|
+
.translate(bbox.x0, bbox.y0)
|
|
125
|
+
.transform_path(path)
|
|
126
|
+
)
|
|
127
|
+
patch = PathPatch(path, **kwargs)
|
|
128
|
+
axes.add_patch(patch)
|
|
129
|
+
|
|
130
|
+
return patch
|
|
131
|
+
|
|
132
|
+
|
|
30
133
|
def set_font_size_in_coord(text, width=None, height=None, mode="unlocked"):
|
|
31
134
|
"""
|
|
32
135
|
Specifiy the font size of an existing `Text` object in coordinates
|
|
@@ -38,6 +141,8 @@ def set_font_size_in_coord(text, width=None, height=None, mode="unlocked"):
|
|
|
38
141
|
The scaling can be proportional or non-proportional, depending
|
|
39
142
|
the `mode`.
|
|
40
143
|
|
|
144
|
+
DEPRECATED: Use :func:`plot_scaled_text()` instead.
|
|
145
|
+
|
|
41
146
|
Parameters
|
|
42
147
|
----------
|
|
43
148
|
text : Text:
|
|
@@ -125,6 +230,11 @@ def set_font_size_in_coord(text, width=None, height=None, mode="unlocked"):
|
|
|
125
230
|
affine = Affine2D().scale(scale_x, scale_y) + affine
|
|
126
231
|
renderer.draw_path(gc, tpath, affine, rgbFace)
|
|
127
232
|
|
|
233
|
+
warnings.warn(
|
|
234
|
+
"Deprecated, use 'biotite.graphics.text.plot_scaled_text()' instead.",
|
|
235
|
+
DeprecationWarning,
|
|
236
|
+
)
|
|
237
|
+
|
|
128
238
|
if mode in ["unlocked", "minimum", "maximum"]:
|
|
129
239
|
if width is None or height is None:
|
|
130
240
|
raise TypeError(f"Width and height must be set in '{mode}' mode")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: biotite
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.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
|
|
@@ -53,9 +53,11 @@ Requires-Dist: biotraj<2.0,>=1.0
|
|
|
53
53
|
Requires-Dist: msgpack>=0.5.6
|
|
54
54
|
Requires-Dist: networkx>=2.0
|
|
55
55
|
Requires-Dist: numpy>=1.25
|
|
56
|
+
Requires-Dist: packaging>=24.0
|
|
56
57
|
Requires-Dist: requests>=2.12
|
|
57
58
|
Provides-Extra: lint
|
|
58
|
-
Requires-Dist:
|
|
59
|
+
Requires-Dist: numpydoc==1.8.0; extra == 'lint'
|
|
60
|
+
Requires-Dist: ruff==0.9.7; extra == 'lint'
|
|
59
61
|
Provides-Extra: test
|
|
60
62
|
Requires-Dist: pytest; extra == 'test'
|
|
61
63
|
Requires-Dist: pytest-codspeed; extra == 'test'
|
|
@@ -186,5 +188,5 @@ Contribution
|
|
|
186
188
|
|
|
187
189
|
Interested in improving *Biotite*?
|
|
188
190
|
Have a look at the
|
|
189
|
-
`contribution guidelines <https://www.biotite-python.org/
|
|
191
|
+
`contribution guidelines <https://www.biotite-python.org/latest/contribution/index.html>`_.
|
|
190
192
|
Feel free to join our community chat on `Discord <https://discord.gg/cUjDguF>`_.
|