biotite 1.0.1__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/dssp/app.py +13 -3
- biotite/application/localapp.py +36 -2
- biotite/application/msaapp.py +10 -10
- biotite/application/muscle/app3.py +5 -18
- biotite/application/muscle/app5.py +5 -5
- biotite/application/sra/app.py +0 -5
- biotite/application/util.py +22 -2
- biotite/application/viennarna/rnaalifold.py +8 -8
- biotite/application/viennarna/rnaplot.py +9 -3
- 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 +8 -9
- biotite/database/uniprot/check.py +22 -17
- biotite/database/uniprot/download.py +3 -6
- biotite/database/uniprot/query.py +4 -5
- 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 +49 -14
- biotite/sequence/align/banded.cp311-win_amd64.pyd +0 -0
- biotite/sequence/align/banded.pyx +26 -26
- biotite/sequence/align/cigar.py +2 -2
- biotite/sequence/align/kmeralphabet.cp311-win_amd64.pyd +0 -0
- biotite/sequence/align/kmeralphabet.pyx +19 -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 +58 -48
- 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 +284 -57
- 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.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 +5 -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/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/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 +105 -29
- biotite/sequence/search.py +0 -1
- biotite/sequence/seqtypes.py +136 -8
- biotite/sequence/sequence.py +1 -2
- biotite/setup_ccd.py +197 -0
- biotite/structure/__init__.py +6 -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 +109 -0
- biotite/structure/alphabet/layers.py +86 -0
- biotite/structure/alphabet/pb.license +21 -0
- biotite/structure/alphabet/pb.py +170 -0
- biotite/structure/alphabet/unkerasify.py +128 -0
- biotite/structure/atoms.py +163 -66
- biotite/structure/basepairs.py +26 -26
- biotite/structure/bonds.cp311-win_amd64.pyd +0 -0
- biotite/structure/bonds.pyx +79 -25
- 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 +74 -127
- biotite/structure/hbond.py +17 -19
- biotite/structure/info/__init__.py +1 -0
- biotite/structure/info/atoms.py +24 -15
- biotite/structure/info/bonds.py +12 -6
- biotite/structure/info/ccd.py +125 -34
- biotite/structure/info/{ccd/components.bcif → components.bcif} +0 -0
- biotite/structure/info/groups.py +62 -19
- biotite/structure/info/masses.py +9 -6
- biotite/structure/info/misc.py +15 -22
- biotite/structure/info/radii.py +92 -22
- biotite/structure/info/standardize.py +4 -4
- 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 +80 -53
- biotite/structure/io/pdb/convert.py +4 -3
- biotite/structure/io/pdb/file.py +85 -25
- biotite/structure/io/pdb/hybrid36.cp311-win_amd64.pyd +0 -0
- biotite/structure/io/pdbqt/file.py +36 -36
- biotite/structure/io/pdbx/__init__.py +1 -0
- biotite/structure/io/pdbx/bcif.py +54 -15
- biotite/structure/io/pdbx/cif.py +92 -66
- biotite/structure/io/pdbx/component.py +15 -4
- biotite/structure/io/pdbx/compress.py +321 -0
- biotite/structure/io/pdbx/convert.py +410 -75
- biotite/structure/io/pdbx/encoding.cp311-win_amd64.pyd +0 -0
- biotite/structure/io/pdbx/encoding.pyx +98 -17
- biotite/structure/io/trajfile.py +9 -6
- biotite/structure/io/util.py +38 -0
- biotite/structure/mechanics.py +0 -1
- biotite/structure/molecules.py +141 -156
- 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 +69 -11
- 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 +76 -4
- biotite/version.py +9 -4
- biotite/visualize.py +111 -1
- {biotite-1.0.1.dist-info → biotite-1.2.0.dist-info}/METADATA +6 -2
- {biotite-1.0.1.dist-info → biotite-1.2.0.dist-info}/RECORD +173 -143
- 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.2.0.dist-info}/WHEEL +0 -0
- {biotite-1.0.1.dist-info → biotite-1.2.0.dist-info}/licenses/LICENSE.rst +0 -0
biotite/structure/basepairs.py
CHANGED
|
@@ -338,8 +338,8 @@ def base_pairs_edge(atom_array, base_pairs):
|
|
|
338
338
|
|
|
339
339
|
See Also
|
|
340
340
|
--------
|
|
341
|
-
base_pairs
|
|
342
|
-
base_pairs_glycosidic_bond
|
|
341
|
+
base_pairs : Get the base pairs required for this function.
|
|
342
|
+
base_pairs_glycosidic_bond : Determine the orientation for each base pair.
|
|
343
343
|
|
|
344
344
|
Notes
|
|
345
345
|
-----
|
|
@@ -351,6 +351,11 @@ def base_pairs_edge(atom_array, base_pairs):
|
|
|
351
351
|
The edge returned always corresponds to the edge with the most
|
|
352
352
|
hydrogen bonding interactions.
|
|
353
353
|
|
|
354
|
+
References
|
|
355
|
+
----------
|
|
356
|
+
|
|
357
|
+
.. footbibliography::
|
|
358
|
+
|
|
354
359
|
Examples
|
|
355
360
|
--------
|
|
356
361
|
Compute the interacting base edges for the dna helix with the PDB
|
|
@@ -392,11 +397,6 @@ def base_pairs_edge(atom_array, base_pairs):
|
|
|
392
397
|
WATSON_CRICK to WATSON_CRICK
|
|
393
398
|
WATSON_CRICK to WATSON_CRICK
|
|
394
399
|
WATSON_CRICK to WATSON_CRICK
|
|
395
|
-
|
|
396
|
-
References
|
|
397
|
-
----------
|
|
398
|
-
|
|
399
|
-
.. footbibliography::
|
|
400
400
|
"""
|
|
401
401
|
# Result-``ndarray`` matches the dimensions of the input array
|
|
402
402
|
results = np.zeros_like(base_pairs, dtype="uint8")
|
|
@@ -494,7 +494,7 @@ def base_pairs_glycosidic_bond(atom_array, base_pairs):
|
|
|
494
494
|
|
|
495
495
|
Returns
|
|
496
496
|
-------
|
|
497
|
-
results : ndarray, dtype=
|
|
497
|
+
results : ndarray, dtype=int, shape=(n,)
|
|
498
498
|
The ``ndarray`` has the same dimensions as ``base_pairs``. Each
|
|
499
499
|
cell corresponds to the interacting edge of the referenced base
|
|
500
500
|
in ``base_pairs``.
|
|
@@ -504,15 +504,20 @@ def base_pairs_glycosidic_bond(atom_array, base_pairs):
|
|
|
504
504
|
|
|
505
505
|
See Also
|
|
506
506
|
--------
|
|
507
|
-
base_pairs
|
|
508
|
-
base_pairs_edge
|
|
509
|
-
GlycosidicBond
|
|
507
|
+
base_pairs : Get the base pairs required for this function.
|
|
508
|
+
base_pairs_edge : Determine the interacting edge for each base pair.
|
|
509
|
+
GlycosidicBond : The Enum type for interpretation of the return value.
|
|
510
510
|
|
|
511
511
|
Notes
|
|
512
512
|
-----
|
|
513
513
|
The orientation is found using the geometric centers of the bases
|
|
514
514
|
and the glycosidic bonds as described in :footcite:`Yang2003`.
|
|
515
515
|
|
|
516
|
+
References
|
|
517
|
+
----------
|
|
518
|
+
|
|
519
|
+
.. footbibliography::
|
|
520
|
+
|
|
516
521
|
Examples
|
|
517
522
|
--------
|
|
518
523
|
Compute the glycosidic bond orientations for the dna helix with the
|
|
@@ -544,11 +549,6 @@ def base_pairs_glycosidic_bond(atom_array, base_pairs):
|
|
|
544
549
|
CIS
|
|
545
550
|
CIS
|
|
546
551
|
CIS
|
|
547
|
-
|
|
548
|
-
References
|
|
549
|
-
----------
|
|
550
|
-
|
|
551
|
-
.. footbibliography::
|
|
552
552
|
"""
|
|
553
553
|
results = np.zeros(len(base_pairs), dtype="uint8")
|
|
554
554
|
|
|
@@ -654,6 +654,11 @@ def base_stacking(atom_array, min_atoms_per_base=3):
|
|
|
654
654
|
Please note that ring normal vectors are assumed to be equal to the
|
|
655
655
|
base normal vectors.
|
|
656
656
|
|
|
657
|
+
References
|
|
658
|
+
----------
|
|
659
|
+
|
|
660
|
+
.. footbibliography::
|
|
661
|
+
|
|
657
662
|
Examples
|
|
658
663
|
--------
|
|
659
664
|
Compute the stacking interactions for a DNA-double-helix (PDB ID
|
|
@@ -685,11 +690,6 @@ def base_stacking(atom_array, min_atoms_per_base=3):
|
|
|
685
690
|
[21 22]
|
|
686
691
|
[22 23]
|
|
687
692
|
[23 24]]
|
|
688
|
-
|
|
689
|
-
References
|
|
690
|
-
----------
|
|
691
|
-
|
|
692
|
-
.. footbibliography::
|
|
693
693
|
"""
|
|
694
694
|
# Get the stacking candidates according to a cutoff distance, where
|
|
695
695
|
# each base is identified as the first index of its respective
|
|
@@ -833,6 +833,11 @@ def base_pairs(atom_array, min_atoms_per_base=3, unique=True):
|
|
|
833
833
|
1.00Å and 0.96Å respectively. Thus, including some buffer, a 3.6Å
|
|
834
834
|
cutoff should cover all hydrogen bonds.
|
|
835
835
|
|
|
836
|
+
References
|
|
837
|
+
----------
|
|
838
|
+
|
|
839
|
+
.. footbibliography::
|
|
840
|
+
|
|
836
841
|
Examples
|
|
837
842
|
--------
|
|
838
843
|
Compute the base pairs for the structure with the PDB ID 1QXB:
|
|
@@ -855,11 +860,6 @@ def base_pairs(atom_array, min_atoms_per_base=3, unique=True):
|
|
|
855
860
|
['DG' 'DC']
|
|
856
861
|
['DC' 'DG']
|
|
857
862
|
['DG' 'DC']]
|
|
858
|
-
|
|
859
|
-
References
|
|
860
|
-
----------
|
|
861
|
-
|
|
862
|
-
.. footbibliography::
|
|
863
863
|
"""
|
|
864
864
|
|
|
865
865
|
# Get the nucleotides for the given atom_array
|
|
Binary file
|
biotite/structure/bonds.pyx
CHANGED
|
@@ -17,6 +17,7 @@ cimport cython
|
|
|
17
17
|
cimport numpy as np
|
|
18
18
|
from libc.stdlib cimport free, realloc
|
|
19
19
|
|
|
20
|
+
from collections.abc import Sequence
|
|
20
21
|
import itertools
|
|
21
22
|
import numbers
|
|
22
23
|
from enum import IntEnum
|
|
@@ -59,6 +60,8 @@ class BondType(IntEnum):
|
|
|
59
60
|
- `AROMATIC_SINGLE` - Aromatic bond with a single formal bond
|
|
60
61
|
- `AROMATIC_DOUBLE` - Aromatic bond with a double formal bond
|
|
61
62
|
- `AROMATIC_TRIPLE` - Aromatic bond with a triple formal bond
|
|
63
|
+
- `AROMATIC` - Aromatic bond without specification of the formal bond
|
|
64
|
+
- `COORDINATION` - Coordination complex involving a metal atom
|
|
62
65
|
"""
|
|
63
66
|
ANY = 0
|
|
64
67
|
SINGLE = 1
|
|
@@ -68,6 +71,8 @@ class BondType(IntEnum):
|
|
|
68
71
|
AROMATIC_SINGLE = 5
|
|
69
72
|
AROMATIC_DOUBLE = 6
|
|
70
73
|
AROMATIC_TRIPLE = 7
|
|
74
|
+
COORDINATION = 8
|
|
75
|
+
AROMATIC = 9
|
|
71
76
|
|
|
72
77
|
|
|
73
78
|
def without_aromaticity(self):
|
|
@@ -88,10 +93,14 @@ class BondType(IntEnum):
|
|
|
88
93
|
>>> print(BondType.AROMATIC_DOUBLE.without_aromaticity().name)
|
|
89
94
|
DOUBLE
|
|
90
95
|
"""
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return BondType
|
|
96
|
+
if self == BondType.AROMATIC_SINGLE:
|
|
97
|
+
return BondType.SINGLE
|
|
98
|
+
elif self == BondType.AROMATIC_DOUBLE:
|
|
99
|
+
return BondType.DOUBLE
|
|
100
|
+
elif self == BondType.AROMATIC_TRIPLE:
|
|
101
|
+
return BondType.TRIPLE
|
|
102
|
+
elif self == BondType.AROMATIC:
|
|
103
|
+
return BondType.ANY
|
|
95
104
|
else:
|
|
96
105
|
return self
|
|
97
106
|
|
|
@@ -305,6 +314,61 @@ class BondList(Copyable):
|
|
|
305
314
|
self._bonds = np.zeros((0, 3), dtype=np.uint32)
|
|
306
315
|
self._max_bonds_per_atom = 0
|
|
307
316
|
|
|
317
|
+
@staticmethod
|
|
318
|
+
def concatenate(bonds_lists):
|
|
319
|
+
"""
|
|
320
|
+
Concatenate multiple :class:`BondList` objects into a single
|
|
321
|
+
:class:`BondList`, respectively.
|
|
322
|
+
|
|
323
|
+
Parameters
|
|
324
|
+
----------
|
|
325
|
+
bonds_lists : iterable object of BondList
|
|
326
|
+
The bond lists to be concatenated.
|
|
327
|
+
|
|
328
|
+
Returns
|
|
329
|
+
-------
|
|
330
|
+
concatenated_bonds : BondList
|
|
331
|
+
The concatenated bond lists.
|
|
332
|
+
|
|
333
|
+
Examples
|
|
334
|
+
--------
|
|
335
|
+
|
|
336
|
+
>>> bonds1 = BondList(2, np.array([(0, 1)]))
|
|
337
|
+
>>> bonds2 = BondList(3, np.array([(0, 1), (0, 2)]))
|
|
338
|
+
>>> merged_bonds = BondList.concatenate([bonds1, bonds2])
|
|
339
|
+
>>> print(merged_bonds.get_atom_count())
|
|
340
|
+
5
|
|
341
|
+
>>> print(merged_bonds.as_array()[:, :2])
|
|
342
|
+
[[0 1]
|
|
343
|
+
[2 3]
|
|
344
|
+
[2 4]]
|
|
345
|
+
"""
|
|
346
|
+
# Ensure that the bonds_lists can be iterated over multiple times
|
|
347
|
+
if not isinstance(bonds_lists, Sequence):
|
|
348
|
+
bonds_lists = list(bonds_lists)
|
|
349
|
+
|
|
350
|
+
cdef np.ndarray merged_bonds = np.concatenate(
|
|
351
|
+
[bond_list._bonds for bond_list in bonds_lists]
|
|
352
|
+
)
|
|
353
|
+
# Offset the indices of appended bonds list
|
|
354
|
+
# (consistent with addition of AtomArray)
|
|
355
|
+
cdef int start = 0, stop = 0
|
|
356
|
+
cdef int cum_atom_count = 0
|
|
357
|
+
for bond_list in bonds_lists:
|
|
358
|
+
stop = start + bond_list._bonds.shape[0]
|
|
359
|
+
merged_bonds[start : stop, :2] += cum_atom_count
|
|
360
|
+
cum_atom_count += bond_list._atom_count
|
|
361
|
+
start = stop
|
|
362
|
+
|
|
363
|
+
cdef merged_bond_list = BondList(cum_atom_count)
|
|
364
|
+
# Array is not used in constructor to prevent unnecessary
|
|
365
|
+
# maximum and redundant bond calculation
|
|
366
|
+
merged_bond_list._bonds = merged_bonds
|
|
367
|
+
merged_bond_list._max_bonds_per_atom = max(
|
|
368
|
+
[bond_list._max_bonds_per_atom for bond_list in bonds_lists]
|
|
369
|
+
)
|
|
370
|
+
return merged_bond_list
|
|
371
|
+
|
|
308
372
|
def __copy_create__(self):
|
|
309
373
|
# Create empty bond list to prevent
|
|
310
374
|
# unnecessary removal of redundant atoms
|
|
@@ -453,9 +517,14 @@ class BondList(Copyable):
|
|
|
453
517
|
0 1 SINGLE
|
|
454
518
|
1 2 DOUBLE
|
|
455
519
|
"""
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
520
|
+
bond_types = self._bonds[:,2]
|
|
521
|
+
for aromatic_type, non_aromatic_type in [
|
|
522
|
+
(BondType.AROMATIC_SINGLE, BondType.SINGLE),
|
|
523
|
+
(BondType.AROMATIC_DOUBLE, BondType.DOUBLE),
|
|
524
|
+
(BondType.AROMATIC_TRIPLE, BondType.TRIPLE),
|
|
525
|
+
(BondType.AROMATIC, BondType.ANY),
|
|
526
|
+
]:
|
|
527
|
+
bond_types[bond_types == aromatic_type] = non_aromatic_type
|
|
459
528
|
|
|
460
529
|
def remove_bond_order(self):
|
|
461
530
|
"""
|
|
@@ -874,7 +943,6 @@ class BondList(Copyable):
|
|
|
874
943
|
----------
|
|
875
944
|
atom_index : int
|
|
876
945
|
The index of the atom whose bonds should be removed.
|
|
877
|
-
|
|
878
946
|
"""
|
|
879
947
|
cdef uint32 index = _to_positive_index(atom_index, self._atom_count)
|
|
880
948
|
|
|
@@ -994,20 +1062,7 @@ class BondList(Copyable):
|
|
|
994
1062
|
)
|
|
995
1063
|
|
|
996
1064
|
def __add__(self, bond_list):
|
|
997
|
-
|
|
998
|
-
= np.concatenate([self._bonds, bond_list._bonds])
|
|
999
|
-
# Offset the indices of appended bonds list
|
|
1000
|
-
# (consistent with addition of AtomArray)
|
|
1001
|
-
merged_bonds[len(self._bonds):, :2] += self._atom_count
|
|
1002
|
-
cdef uint32 merged_count = self._atom_count + bond_list._atom_count
|
|
1003
|
-
cdef merged_bond_list = BondList(merged_count)
|
|
1004
|
-
# Array is not used in constructor to prevent unnecessary
|
|
1005
|
-
# maximum and redundant bond calculation
|
|
1006
|
-
merged_bond_list._bonds = merged_bonds
|
|
1007
|
-
merged_bond_list._max_bonds_per_atom = max(
|
|
1008
|
-
self._max_bonds_per_atom, bond_list._max_bonds_per_atom
|
|
1009
|
-
)
|
|
1010
|
-
return merged_bond_list
|
|
1065
|
+
return BondList.concatenate([self, bond_list])
|
|
1011
1066
|
|
|
1012
1067
|
def __getitem__(self, index):
|
|
1013
1068
|
## Variables for both, integer and boolean index arrays
|
|
@@ -1427,7 +1482,7 @@ def connect_via_distances(atoms, dict distance_range=None, bint inter_residue=Tr
|
|
|
1427
1482
|
BondList
|
|
1428
1483
|
The created bond list.
|
|
1429
1484
|
|
|
1430
|
-
See
|
|
1485
|
+
See Also
|
|
1431
1486
|
--------
|
|
1432
1487
|
connect_via_residue_names
|
|
1433
1488
|
|
|
@@ -1566,7 +1621,7 @@ def connect_via_residue_names(atoms, bint inter_residue=True,
|
|
|
1566
1621
|
No bonds are added for residues that are not found in
|
|
1567
1622
|
``components.cif``.
|
|
1568
1623
|
|
|
1569
|
-
See
|
|
1624
|
+
See Also
|
|
1570
1625
|
--------
|
|
1571
1626
|
connect_via_distances
|
|
1572
1627
|
|
|
@@ -1608,7 +1663,6 @@ def connect_via_residue_names(atoms, bint inter_residue=True,
|
|
|
1608
1663
|
('OXT', 'HXT'): <BondType.SINGLE: 1>},
|
|
1609
1664
|
'XYZ': {('A', 'B'): <BondType.SINGLE: 1>,
|
|
1610
1665
|
('B', 'C'): <BondType.SINGLE: 1>}}
|
|
1611
|
-
|
|
1612
1666
|
"""
|
|
1613
1667
|
from .info.bonds import bonds_in_residue
|
|
1614
1668
|
from .residues import get_residue_starts
|
biotite/structure/box.py
CHANGED
|
@@ -45,10 +45,10 @@ def vectors_from_unitcell(len_a, len_b, len_c, alpha, beta, gamma):
|
|
|
45
45
|
----------
|
|
46
46
|
len_a, len_b, len_c : float
|
|
47
47
|
The lengths of the three box/unit cell vectors *a*, *b* and *c*.
|
|
48
|
-
alpha, beta, gamma:
|
|
48
|
+
alpha, beta, gamma : float
|
|
49
49
|
The angles between the box vectors in radians.
|
|
50
50
|
*alpha* is the angle between *b* and *c*,
|
|
51
|
-
*beta* between *a* and *c*, *gamma* between *a* and *b
|
|
51
|
+
*beta* between *a* and *c*, *gamma* between *a* and *b*.
|
|
52
52
|
|
|
53
53
|
Returns
|
|
54
54
|
-------
|
|
@@ -58,9 +58,9 @@ def vectors_from_unitcell(len_a, len_b, len_c, alpha, beta, gamma):
|
|
|
58
58
|
The value can be directly used as :attr:`box` attribute in an
|
|
59
59
|
atom array.
|
|
60
60
|
|
|
61
|
-
See
|
|
61
|
+
See Also
|
|
62
62
|
--------
|
|
63
|
-
unitcell_from_vectors
|
|
63
|
+
unitcell_from_vectors : The reverse operation.
|
|
64
64
|
"""
|
|
65
65
|
a_x = len_a
|
|
66
66
|
b_x = len_b * np.cos(gamma)
|
|
@@ -87,7 +87,7 @@ def unitcell_from_vectors(box):
|
|
|
87
87
|
Parameters
|
|
88
88
|
----------
|
|
89
89
|
box : ndarray, shape=(3,3)
|
|
90
|
-
The box vectors
|
|
90
|
+
The box vectors.
|
|
91
91
|
|
|
92
92
|
Returns
|
|
93
93
|
-------
|
|
@@ -96,9 +96,9 @@ def unitcell_from_vectors(box):
|
|
|
96
96
|
alpha, beta, gamma : float
|
|
97
97
|
The angles between the box vectors in radians.
|
|
98
98
|
|
|
99
|
-
See
|
|
99
|
+
See Also
|
|
100
100
|
--------
|
|
101
|
-
vectors_from_unitcell
|
|
101
|
+
vectors_from_unitcell : The reverse operation.
|
|
102
102
|
"""
|
|
103
103
|
a = box[0]
|
|
104
104
|
b = box[1]
|
|
@@ -124,6 +124,7 @@ def box_volume(box):
|
|
|
124
124
|
Returns
|
|
125
125
|
-------
|
|
126
126
|
volume : float or ndarray, shape=(m,)
|
|
127
|
+
The volume(s) of the given box(es).
|
|
127
128
|
"""
|
|
128
129
|
# Using the triple product
|
|
129
130
|
return np.abs(linalg.det(box))
|
|
@@ -164,9 +165,9 @@ def repeat_box(atoms, amount=1):
|
|
|
164
165
|
Equal to
|
|
165
166
|
``numpy.tile(np.arange(atoms.array_length()), (1 + 2 * amount) ** 3)``.
|
|
166
167
|
|
|
167
|
-
See
|
|
168
|
+
See Also
|
|
168
169
|
--------
|
|
169
|
-
repeat_box_coord
|
|
170
|
+
repeat_box_coord : Variant that acts directly on coordinates.
|
|
170
171
|
|
|
171
172
|
Examples
|
|
172
173
|
--------
|
|
@@ -383,9 +384,9 @@ def remove_pbc(atoms, selection=None):
|
|
|
383
384
|
The input structure with removed segmentation over periodic
|
|
384
385
|
boundaries.
|
|
385
386
|
|
|
386
|
-
See
|
|
387
|
+
See Also
|
|
387
388
|
--------
|
|
388
|
-
remove_pbc_from_coord
|
|
389
|
+
remove_pbc_from_coord : Variant that acts directly on coordinates.
|
|
389
390
|
|
|
390
391
|
Notes
|
|
391
392
|
-----
|
|
@@ -430,8 +431,6 @@ def remove_pbc_from_coord(coord, box):
|
|
|
430
431
|
is moved inside the box.
|
|
431
432
|
All other coordinates are assembled relative to the origin by using
|
|
432
433
|
the displacement coordinates in adjacent array positions.
|
|
433
|
-
Basically, this function performs the reverse action of
|
|
434
|
-
:func:`move_inside_box()`.
|
|
435
434
|
|
|
436
435
|
Parameters
|
|
437
436
|
----------
|
|
@@ -447,10 +446,9 @@ def remove_pbc_from_coord(coord, box):
|
|
|
447
446
|
sanitized_coord : ndarray, dtype=float, shape=(m,n,3) or shape=(n,3)
|
|
448
447
|
The reassembled coordinates.
|
|
449
448
|
|
|
450
|
-
See
|
|
449
|
+
See Also
|
|
451
450
|
--------
|
|
452
|
-
|
|
453
|
-
move_inside_box
|
|
451
|
+
move_inside_box : The reverse operation.
|
|
454
452
|
|
|
455
453
|
Notes
|
|
456
454
|
-----
|
|
@@ -501,9 +499,9 @@ def coord_to_fraction(coord, box):
|
|
|
501
499
|
fraction : ndarray, dtype=float, shape=(n,3) or shape=(m,n,3)
|
|
502
500
|
The fractions of the box vectors.
|
|
503
501
|
|
|
504
|
-
See
|
|
502
|
+
See Also
|
|
505
503
|
--------
|
|
506
|
-
fraction_to_coord
|
|
504
|
+
fraction_to_coord : The reverse operation.
|
|
507
505
|
|
|
508
506
|
Examples
|
|
509
507
|
--------
|
|
@@ -548,9 +546,9 @@ def fraction_to_coord(fraction, box):
|
|
|
548
546
|
coord : ndarray, dtype=float, shape=(n,3) or shape=(m,n,3)
|
|
549
547
|
The coordinates.
|
|
550
548
|
|
|
551
|
-
See
|
|
549
|
+
See Also
|
|
552
550
|
--------
|
|
553
|
-
coord_to_fraction
|
|
551
|
+
coord_to_fraction : The reverse operation.
|
|
554
552
|
"""
|
|
555
553
|
return np.matmul(fraction, box)
|
|
556
554
|
|
|
@@ -570,7 +568,7 @@ def is_orthogonal(box):
|
|
|
570
568
|
Returns
|
|
571
569
|
-------
|
|
572
570
|
is_orthgonal : bool or ndarray, shape=(m,), dtype=bool
|
|
573
|
-
True, if the box vectors are orthogonal, false otherwise
|
|
571
|
+
True, if the box vectors are orthogonal, false otherwise.
|
|
574
572
|
|
|
575
573
|
Notes
|
|
576
574
|
-----
|
|
Binary file
|