biotite 0.41.1__cp310-cp310-macosx_10_16_x86_64.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/__init__.py +19 -0
- biotite/application/__init__.py +43 -0
- biotite/application/application.py +265 -0
- biotite/application/autodock/__init__.py +12 -0
- biotite/application/autodock/app.py +505 -0
- biotite/application/blast/__init__.py +14 -0
- biotite/application/blast/alignment.py +83 -0
- biotite/application/blast/webapp.py +421 -0
- biotite/application/clustalo/__init__.py +12 -0
- biotite/application/clustalo/app.py +238 -0
- biotite/application/dssp/__init__.py +12 -0
- biotite/application/dssp/app.py +152 -0
- biotite/application/localapp.py +306 -0
- biotite/application/mafft/__init__.py +12 -0
- biotite/application/mafft/app.py +122 -0
- biotite/application/msaapp.py +374 -0
- biotite/application/muscle/__init__.py +13 -0
- biotite/application/muscle/app3.py +254 -0
- biotite/application/muscle/app5.py +171 -0
- biotite/application/sra/__init__.py +18 -0
- biotite/application/sra/app.py +456 -0
- biotite/application/tantan/__init__.py +12 -0
- biotite/application/tantan/app.py +222 -0
- biotite/application/util.py +59 -0
- biotite/application/viennarna/__init__.py +18 -0
- biotite/application/viennarna/rnaalifold.py +304 -0
- biotite/application/viennarna/rnafold.py +269 -0
- biotite/application/viennarna/rnaplot.py +187 -0
- biotite/application/viennarna/util.py +72 -0
- biotite/application/webapp.py +77 -0
- biotite/copyable.py +71 -0
- biotite/database/__init__.py +23 -0
- biotite/database/entrez/__init__.py +15 -0
- biotite/database/entrez/check.py +61 -0
- biotite/database/entrez/dbnames.py +89 -0
- biotite/database/entrez/download.py +223 -0
- biotite/database/entrez/key.py +44 -0
- biotite/database/entrez/query.py +223 -0
- biotite/database/error.py +15 -0
- biotite/database/pubchem/__init__.py +21 -0
- biotite/database/pubchem/download.py +260 -0
- biotite/database/pubchem/error.py +20 -0
- biotite/database/pubchem/query.py +827 -0
- biotite/database/pubchem/throttle.py +99 -0
- biotite/database/rcsb/__init__.py +13 -0
- biotite/database/rcsb/download.py +167 -0
- biotite/database/rcsb/query.py +959 -0
- biotite/database/uniprot/__init__.py +13 -0
- biotite/database/uniprot/check.py +32 -0
- biotite/database/uniprot/download.py +134 -0
- biotite/database/uniprot/query.py +209 -0
- biotite/file.py +251 -0
- biotite/sequence/__init__.py +73 -0
- biotite/sequence/align/__init__.py +49 -0
- biotite/sequence/align/alignment.py +658 -0
- biotite/sequence/align/banded.cpython-310-darwin.so +0 -0
- biotite/sequence/align/banded.pyx +652 -0
- biotite/sequence/align/buckets.py +69 -0
- biotite/sequence/align/cigar.py +434 -0
- biotite/sequence/align/kmeralphabet.cpython-310-darwin.so +0 -0
- biotite/sequence/align/kmeralphabet.pyx +574 -0
- biotite/sequence/align/kmersimilarity.cpython-310-darwin.so +0 -0
- biotite/sequence/align/kmersimilarity.pyx +233 -0
- biotite/sequence/align/kmertable.cpython-310-darwin.so +0 -0
- biotite/sequence/align/kmertable.pyx +3400 -0
- biotite/sequence/align/localgapped.cpython-310-darwin.so +0 -0
- biotite/sequence/align/localgapped.pyx +892 -0
- biotite/sequence/align/localungapped.cpython-310-darwin.so +0 -0
- biotite/sequence/align/localungapped.pyx +279 -0
- biotite/sequence/align/matrix.py +405 -0
- biotite/sequence/align/matrix_data/BLOSUM100.mat +31 -0
- biotite/sequence/align/matrix_data/BLOSUM30.mat +31 -0
- biotite/sequence/align/matrix_data/BLOSUM35.mat +31 -0
- biotite/sequence/align/matrix_data/BLOSUM40.mat +31 -0
- biotite/sequence/align/matrix_data/BLOSUM45.mat +31 -0
- biotite/sequence/align/matrix_data/BLOSUM50.mat +31 -0
- biotite/sequence/align/matrix_data/BLOSUM50_13p.mat +25 -0
- biotite/sequence/align/matrix_data/BLOSUM50_14.3.mat +25 -0
- biotite/sequence/align/matrix_data/BLOSUM50_5.0.mat +25 -0
- biotite/sequence/align/matrix_data/BLOSUM55.mat +31 -0
- biotite/sequence/align/matrix_data/BLOSUM60.mat +31 -0
- biotite/sequence/align/matrix_data/BLOSUM62.mat +31 -0
- biotite/sequence/align/matrix_data/BLOSUM62_13p.mat +25 -0
- biotite/sequence/align/matrix_data/BLOSUM62_14.3.mat +25 -0
- biotite/sequence/align/matrix_data/BLOSUM62_5.0.mat +25 -0
- biotite/sequence/align/matrix_data/BLOSUM65.mat +31 -0
- biotite/sequence/align/matrix_data/BLOSUM70.mat +31 -0
- biotite/sequence/align/matrix_data/BLOSUM75.mat +31 -0
- biotite/sequence/align/matrix_data/BLOSUM80.mat +31 -0
- biotite/sequence/align/matrix_data/BLOSUM85.mat +31 -0
- biotite/sequence/align/matrix_data/BLOSUM90.mat +31 -0
- biotite/sequence/align/matrix_data/BLOSUMN.mat +31 -0
- biotite/sequence/align/matrix_data/CorBLOSUM49_5.0.mat +25 -0
- biotite/sequence/align/matrix_data/CorBLOSUM57_13p.mat +25 -0
- biotite/sequence/align/matrix_data/CorBLOSUM57_14.3.mat +25 -0
- biotite/sequence/align/matrix_data/CorBLOSUM61_5.0.mat +25 -0
- biotite/sequence/align/matrix_data/CorBLOSUM66_13p.mat +25 -0
- biotite/sequence/align/matrix_data/CorBLOSUM67_14.3.mat +25 -0
- biotite/sequence/align/matrix_data/DAYHOFF.mat +32 -0
- biotite/sequence/align/matrix_data/GONNET.mat +26 -0
- biotite/sequence/align/matrix_data/IDENTITY.mat +25 -0
- biotite/sequence/align/matrix_data/MATCH.mat +25 -0
- biotite/sequence/align/matrix_data/NUC.mat +25 -0
- biotite/sequence/align/matrix_data/PAM10.mat +34 -0
- biotite/sequence/align/matrix_data/PAM100.mat +34 -0
- biotite/sequence/align/matrix_data/PAM110.mat +34 -0
- biotite/sequence/align/matrix_data/PAM120.mat +34 -0
- biotite/sequence/align/matrix_data/PAM130.mat +34 -0
- biotite/sequence/align/matrix_data/PAM140.mat +34 -0
- biotite/sequence/align/matrix_data/PAM150.mat +34 -0
- biotite/sequence/align/matrix_data/PAM160.mat +34 -0
- biotite/sequence/align/matrix_data/PAM170.mat +34 -0
- biotite/sequence/align/matrix_data/PAM180.mat +34 -0
- biotite/sequence/align/matrix_data/PAM190.mat +34 -0
- biotite/sequence/align/matrix_data/PAM20.mat +34 -0
- biotite/sequence/align/matrix_data/PAM200.mat +34 -0
- biotite/sequence/align/matrix_data/PAM210.mat +34 -0
- biotite/sequence/align/matrix_data/PAM220.mat +34 -0
- biotite/sequence/align/matrix_data/PAM230.mat +34 -0
- biotite/sequence/align/matrix_data/PAM240.mat +34 -0
- biotite/sequence/align/matrix_data/PAM250.mat +34 -0
- biotite/sequence/align/matrix_data/PAM260.mat +34 -0
- biotite/sequence/align/matrix_data/PAM270.mat +34 -0
- biotite/sequence/align/matrix_data/PAM280.mat +34 -0
- biotite/sequence/align/matrix_data/PAM290.mat +34 -0
- biotite/sequence/align/matrix_data/PAM30.mat +34 -0
- biotite/sequence/align/matrix_data/PAM300.mat +34 -0
- biotite/sequence/align/matrix_data/PAM310.mat +34 -0
- biotite/sequence/align/matrix_data/PAM320.mat +34 -0
- biotite/sequence/align/matrix_data/PAM330.mat +34 -0
- biotite/sequence/align/matrix_data/PAM340.mat +34 -0
- biotite/sequence/align/matrix_data/PAM350.mat +34 -0
- biotite/sequence/align/matrix_data/PAM360.mat +34 -0
- biotite/sequence/align/matrix_data/PAM370.mat +34 -0
- biotite/sequence/align/matrix_data/PAM380.mat +34 -0
- biotite/sequence/align/matrix_data/PAM390.mat +34 -0
- biotite/sequence/align/matrix_data/PAM40.mat +34 -0
- biotite/sequence/align/matrix_data/PAM400.mat +34 -0
- biotite/sequence/align/matrix_data/PAM410.mat +34 -0
- biotite/sequence/align/matrix_data/PAM420.mat +34 -0
- biotite/sequence/align/matrix_data/PAM430.mat +34 -0
- biotite/sequence/align/matrix_data/PAM440.mat +34 -0
- biotite/sequence/align/matrix_data/PAM450.mat +34 -0
- biotite/sequence/align/matrix_data/PAM460.mat +34 -0
- biotite/sequence/align/matrix_data/PAM470.mat +34 -0
- biotite/sequence/align/matrix_data/PAM480.mat +34 -0
- biotite/sequence/align/matrix_data/PAM490.mat +34 -0
- biotite/sequence/align/matrix_data/PAM50.mat +34 -0
- biotite/sequence/align/matrix_data/PAM500.mat +34 -0
- biotite/sequence/align/matrix_data/PAM60.mat +34 -0
- biotite/sequence/align/matrix_data/PAM70.mat +34 -0
- biotite/sequence/align/matrix_data/PAM80.mat +34 -0
- biotite/sequence/align/matrix_data/PAM90.mat +34 -0
- biotite/sequence/align/matrix_data/RBLOSUM52_5.0.mat +25 -0
- biotite/sequence/align/matrix_data/RBLOSUM59_13p.mat +25 -0
- biotite/sequence/align/matrix_data/RBLOSUM59_14.3.mat +25 -0
- biotite/sequence/align/matrix_data/RBLOSUM64_5.0.mat +25 -0
- biotite/sequence/align/matrix_data/RBLOSUM69_13p.mat +25 -0
- biotite/sequence/align/matrix_data/RBLOSUM69_14.3.mat +25 -0
- biotite/sequence/align/multiple.cpython-310-darwin.so +0 -0
- biotite/sequence/align/multiple.pyx +620 -0
- biotite/sequence/align/pairwise.cpython-310-darwin.so +0 -0
- biotite/sequence/align/pairwise.pyx +587 -0
- biotite/sequence/align/permutation.cpython-310-darwin.so +0 -0
- biotite/sequence/align/permutation.pyx +305 -0
- biotite/sequence/align/primes.txt +821 -0
- biotite/sequence/align/selector.cpython-310-darwin.so +0 -0
- biotite/sequence/align/selector.pyx +956 -0
- biotite/sequence/align/statistics.py +265 -0
- biotite/sequence/align/tracetable.cpython-310-darwin.so +0 -0
- biotite/sequence/align/tracetable.pxd +64 -0
- biotite/sequence/align/tracetable.pyx +370 -0
- biotite/sequence/alphabet.py +566 -0
- biotite/sequence/annotation.py +829 -0
- biotite/sequence/codec.cpython-310-darwin.so +0 -0
- biotite/sequence/codec.pyx +155 -0
- biotite/sequence/codon.py +466 -0
- biotite/sequence/codon_tables.txt +202 -0
- biotite/sequence/graphics/__init__.py +33 -0
- biotite/sequence/graphics/alignment.py +1034 -0
- biotite/sequence/graphics/color_schemes/autumn.json +51 -0
- biotite/sequence/graphics/color_schemes/blossom.json +51 -0
- biotite/sequence/graphics/color_schemes/clustalx_dna.json +11 -0
- biotite/sequence/graphics/color_schemes/clustalx_protein.json +28 -0
- biotite/sequence/graphics/color_schemes/flower.json +51 -0
- biotite/sequence/graphics/color_schemes/jalview_buried.json +31 -0
- biotite/sequence/graphics/color_schemes/jalview_hydrophobicity.json +31 -0
- biotite/sequence/graphics/color_schemes/jalview_prop_helix.json +31 -0
- biotite/sequence/graphics/color_schemes/jalview_prop_strand.json +31 -0
- biotite/sequence/graphics/color_schemes/jalview_prop_turn.json +31 -0
- biotite/sequence/graphics/color_schemes/jalview_taylor.json +28 -0
- biotite/sequence/graphics/color_schemes/jalview_zappo.json +28 -0
- biotite/sequence/graphics/color_schemes/ocean.json +51 -0
- biotite/sequence/graphics/color_schemes/pb_flower.json +39 -0
- biotite/sequence/graphics/color_schemes/rainbow_dna.json +11 -0
- biotite/sequence/graphics/color_schemes/rainbow_protein.json +30 -0
- biotite/sequence/graphics/color_schemes/spring.json +51 -0
- biotite/sequence/graphics/color_schemes/sunset.json +51 -0
- biotite/sequence/graphics/color_schemes/wither.json +51 -0
- biotite/sequence/graphics/colorschemes.py +139 -0
- biotite/sequence/graphics/dendrogram.py +184 -0
- biotite/sequence/graphics/features.py +510 -0
- biotite/sequence/graphics/logo.py +110 -0
- biotite/sequence/graphics/plasmid.py +661 -0
- biotite/sequence/io/__init__.py +12 -0
- biotite/sequence/io/fasta/__init__.py +22 -0
- biotite/sequence/io/fasta/convert.py +273 -0
- biotite/sequence/io/fasta/file.py +278 -0
- biotite/sequence/io/fastq/__init__.py +19 -0
- biotite/sequence/io/fastq/convert.py +120 -0
- biotite/sequence/io/fastq/file.py +551 -0
- biotite/sequence/io/genbank/__init__.py +17 -0
- biotite/sequence/io/genbank/annotation.py +277 -0
- biotite/sequence/io/genbank/file.py +575 -0
- biotite/sequence/io/genbank/metadata.py +324 -0
- biotite/sequence/io/genbank/sequence.py +172 -0
- biotite/sequence/io/general.py +192 -0
- biotite/sequence/io/gff/__init__.py +26 -0
- biotite/sequence/io/gff/convert.py +133 -0
- biotite/sequence/io/gff/file.py +434 -0
- biotite/sequence/phylo/__init__.py +36 -0
- biotite/sequence/phylo/nj.cpython-310-darwin.so +0 -0
- biotite/sequence/phylo/nj.pyx +221 -0
- biotite/sequence/phylo/tree.cpython-310-darwin.so +0 -0
- biotite/sequence/phylo/tree.pyx +1169 -0
- biotite/sequence/phylo/upgma.cpython-310-darwin.so +0 -0
- biotite/sequence/phylo/upgma.pyx +164 -0
- biotite/sequence/profile.py +456 -0
- biotite/sequence/search.py +116 -0
- biotite/sequence/seqtypes.py +556 -0
- biotite/sequence/sequence.py +374 -0
- biotite/structure/__init__.py +132 -0
- biotite/structure/atoms.py +1455 -0
- biotite/structure/basepairs.py +1415 -0
- biotite/structure/bonds.cpython-310-darwin.so +0 -0
- biotite/structure/bonds.pyx +1933 -0
- biotite/structure/box.py +592 -0
- biotite/structure/celllist.cpython-310-darwin.so +0 -0
- biotite/structure/celllist.pyx +849 -0
- biotite/structure/chains.py +298 -0
- biotite/structure/charges.cpython-310-darwin.so +0 -0
- biotite/structure/charges.pyx +520 -0
- biotite/structure/compare.py +274 -0
- biotite/structure/density.py +114 -0
- biotite/structure/dotbracket.py +216 -0
- biotite/structure/error.py +31 -0
- biotite/structure/filter.py +585 -0
- biotite/structure/geometry.py +697 -0
- biotite/structure/graphics/__init__.py +13 -0
- biotite/structure/graphics/atoms.py +226 -0
- biotite/structure/graphics/rna.py +282 -0
- biotite/structure/hbond.py +409 -0
- biotite/structure/info/__init__.py +25 -0
- biotite/structure/info/atom_masses.json +121 -0
- biotite/structure/info/atoms.py +82 -0
- biotite/structure/info/bonds.py +145 -0
- biotite/structure/info/ccd/README.rst +8 -0
- biotite/structure/info/ccd/amino_acids.txt +1663 -0
- biotite/structure/info/ccd/carbohydrates.txt +1135 -0
- biotite/structure/info/ccd/components.bcif +0 -0
- biotite/structure/info/ccd/nucleotides.txt +798 -0
- biotite/structure/info/ccd.py +95 -0
- biotite/structure/info/groups.py +90 -0
- biotite/structure/info/masses.py +123 -0
- biotite/structure/info/misc.py +144 -0
- biotite/structure/info/radii.py +197 -0
- biotite/structure/info/standardize.py +196 -0
- biotite/structure/integrity.py +268 -0
- biotite/structure/io/__init__.py +30 -0
- biotite/structure/io/ctab.py +72 -0
- biotite/structure/io/dcd/__init__.py +13 -0
- biotite/structure/io/dcd/file.py +65 -0
- biotite/structure/io/general.py +257 -0
- biotite/structure/io/gro/__init__.py +14 -0
- biotite/structure/io/gro/file.py +343 -0
- biotite/structure/io/mmtf/__init__.py +21 -0
- biotite/structure/io/mmtf/assembly.py +214 -0
- biotite/structure/io/mmtf/convertarray.cpython-310-darwin.so +0 -0
- biotite/structure/io/mmtf/convertarray.pyx +341 -0
- biotite/structure/io/mmtf/convertfile.cpython-310-darwin.so +0 -0
- biotite/structure/io/mmtf/convertfile.pyx +501 -0
- biotite/structure/io/mmtf/decode.cpython-310-darwin.so +0 -0
- biotite/structure/io/mmtf/decode.pyx +152 -0
- biotite/structure/io/mmtf/encode.cpython-310-darwin.so +0 -0
- biotite/structure/io/mmtf/encode.pyx +183 -0
- biotite/structure/io/mmtf/file.py +233 -0
- biotite/structure/io/mol/__init__.py +20 -0
- biotite/structure/io/mol/convert.py +115 -0
- biotite/structure/io/mol/ctab.py +414 -0
- biotite/structure/io/mol/header.py +116 -0
- biotite/structure/io/mol/mol.py +193 -0
- biotite/structure/io/mol/sdf.py +916 -0
- biotite/structure/io/netcdf/__init__.py +13 -0
- biotite/structure/io/netcdf/file.py +63 -0
- biotite/structure/io/npz/__init__.py +20 -0
- biotite/structure/io/npz/file.py +152 -0
- biotite/structure/io/pdb/__init__.py +20 -0
- biotite/structure/io/pdb/convert.py +293 -0
- biotite/structure/io/pdb/file.py +1240 -0
- biotite/structure/io/pdb/hybrid36.cpython-310-darwin.so +0 -0
- biotite/structure/io/pdb/hybrid36.pyx +242 -0
- biotite/structure/io/pdbqt/__init__.py +15 -0
- biotite/structure/io/pdbqt/convert.py +107 -0
- biotite/structure/io/pdbqt/file.py +640 -0
- biotite/structure/io/pdbx/__init__.py +23 -0
- biotite/structure/io/pdbx/bcif.py +648 -0
- biotite/structure/io/pdbx/cif.py +1032 -0
- biotite/structure/io/pdbx/component.py +246 -0
- biotite/structure/io/pdbx/convert.py +1597 -0
- biotite/structure/io/pdbx/encoding.cpython-310-darwin.so +0 -0
- biotite/structure/io/pdbx/encoding.pyx +950 -0
- biotite/structure/io/pdbx/legacy.py +267 -0
- biotite/structure/io/tng/__init__.py +13 -0
- biotite/structure/io/tng/file.py +46 -0
- biotite/structure/io/trajfile.py +710 -0
- biotite/structure/io/trr/__init__.py +13 -0
- biotite/structure/io/trr/file.py +46 -0
- biotite/structure/io/xtc/__init__.py +13 -0
- biotite/structure/io/xtc/file.py +46 -0
- biotite/structure/mechanics.py +75 -0
- biotite/structure/molecules.py +353 -0
- biotite/structure/pseudoknots.py +642 -0
- biotite/structure/rdf.py +243 -0
- biotite/structure/repair.py +253 -0
- biotite/structure/residues.py +562 -0
- biotite/structure/resutil.py +178 -0
- biotite/structure/sasa.cpython-310-darwin.so +0 -0
- biotite/structure/sasa.pyx +322 -0
- biotite/structure/sequence.py +112 -0
- biotite/structure/sse.py +327 -0
- biotite/structure/superimpose.py +727 -0
- biotite/structure/transform.py +504 -0
- biotite/structure/util.py +98 -0
- biotite/temp.py +86 -0
- biotite/version.py +16 -0
- biotite/visualize.py +251 -0
- biotite-0.41.1.dist-info/METADATA +187 -0
- biotite-0.41.1.dist-info/RECORD +340 -0
- biotite-0.41.1.dist-info/WHEEL +4 -0
- biotite-0.41.1.dist-info/licenses/LICENSE.rst +30 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# This source code is part of the Biotite package and is distributed
|
|
2
|
+
# under the 3-Clause BSD License. Please see 'LICENSE.rst' for further
|
|
3
|
+
# information.
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
This subpackage is used for reading and writing trajectories in the
|
|
7
|
+
*AMBER* NetCDF format.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
__name__ = "biotite.structure.io.netcdf"
|
|
11
|
+
__author__ = "Patrick Kunzmann"
|
|
12
|
+
|
|
13
|
+
from .file import *
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# This source code is part of the Biotite package and is distributed
|
|
2
|
+
# under the 3-Clause BSD License. Please see 'LICENSE.rst' for further
|
|
3
|
+
# information.
|
|
4
|
+
|
|
5
|
+
__name__ = "biotite.structure.io.netcdf"
|
|
6
|
+
__author__ = "Patrick Kunzmann"
|
|
7
|
+
__all__ = ["NetCDFFile"]
|
|
8
|
+
|
|
9
|
+
import numpy as np
|
|
10
|
+
from ..trajfile import TrajectoryFile
|
|
11
|
+
from ...box import vectors_from_unitcell, unitcell_from_vectors
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class NetCDFFile(TrajectoryFile):
|
|
15
|
+
"""
|
|
16
|
+
This file class represents a NetCDF trajectory file.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
@classmethod
|
|
20
|
+
def traj_type(cls):
|
|
21
|
+
import mdtraj.formats as traj
|
|
22
|
+
return traj.NetCDFTrajectoryFile
|
|
23
|
+
|
|
24
|
+
@classmethod
|
|
25
|
+
def process_read_values(cls, read_values):
|
|
26
|
+
# .dcd files use Angstrom
|
|
27
|
+
coord = read_values[0]
|
|
28
|
+
time = read_values[1]
|
|
29
|
+
cell_lengths = read_values[2]
|
|
30
|
+
cell_angles = read_values[3]
|
|
31
|
+
if cell_lengths is None or cell_angles is None:
|
|
32
|
+
box = None
|
|
33
|
+
else:
|
|
34
|
+
box = np.stack(
|
|
35
|
+
[vectors_from_unitcell(a, b, c, alpha, beta, gamma)
|
|
36
|
+
for (a, b, c), (alpha, beta, gamma)
|
|
37
|
+
in zip(cell_lengths, np.deg2rad(cell_angles))],
|
|
38
|
+
axis=0
|
|
39
|
+
)
|
|
40
|
+
return coord, box, time
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def prepare_write_values(cls, coord, box, time):
|
|
44
|
+
coord = coord.astype(np.float32, copy=False) \
|
|
45
|
+
if coord is not None else None
|
|
46
|
+
time = time.astype(np.float32, copy=False) \
|
|
47
|
+
if time is not None else None
|
|
48
|
+
if box is None:
|
|
49
|
+
cell_lengths = None
|
|
50
|
+
cell_angles = None
|
|
51
|
+
else:
|
|
52
|
+
cell_lengths = np.zeros((len(box), 3), dtype=np.float32)
|
|
53
|
+
cell_angles = np.zeros((len(box), 3), dtype=np.float32)
|
|
54
|
+
for i, model_box in enumerate(box):
|
|
55
|
+
a, b, c, alpha, beta, gamma = unitcell_from_vectors(model_box)
|
|
56
|
+
cell_lengths[i] = np.array((a, b, c))
|
|
57
|
+
cell_angles[i] = np.rad2deg((alpha, beta, gamma))
|
|
58
|
+
return {
|
|
59
|
+
"coordinates" : coord,
|
|
60
|
+
"time" : time,
|
|
61
|
+
"cell_lengths" : cell_lengths,
|
|
62
|
+
"cell_angles" : cell_angles,
|
|
63
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This source code is part of the Biotite package and is distributed
|
|
2
|
+
# under the 3-Clause BSD License. Please see 'LICENSE.rst' for further
|
|
3
|
+
# information.
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
This subpackage is used for reading and writing an :class:`AtomArray` or
|
|
7
|
+
:class:`AtomArrayStack` using the internal NPZ file format. This binary
|
|
8
|
+
format is used to store `NumPy` arrays. Since atom arrays and stacks are
|
|
9
|
+
completely built on `NumPy` arrays, this format is preferable for
|
|
10
|
+
Biotite internal usage due to fast I/O operations and preservation
|
|
11
|
+
of all atom annotation arrays.
|
|
12
|
+
|
|
13
|
+
DEPRECATED: Pickle data directly or use
|
|
14
|
+
:class:`biotite.structure.io.pdbx.BinaryCIFFile` instead.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
__name__ = "biotite.structure.io.npz"
|
|
18
|
+
__author__ = "Patrick Kunzmann"
|
|
19
|
+
|
|
20
|
+
from .file import *
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# This source code is part of the Biotite package and is distributed
|
|
2
|
+
# under the 3-Clause BSD License. Please see 'LICENSE.rst' for further
|
|
3
|
+
# information.
|
|
4
|
+
|
|
5
|
+
__name__ = "biotite.structure.io.npz"
|
|
6
|
+
__author__ = "Patrick Kunzmann"
|
|
7
|
+
__all__ = ["NpzFile"]
|
|
8
|
+
|
|
9
|
+
import numpy as np
|
|
10
|
+
from ...atoms import Atom, AtomArray, AtomArrayStack
|
|
11
|
+
from ...bonds import BondList
|
|
12
|
+
from ....file import File, is_binary
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class NpzFile(File):
|
|
16
|
+
r"""
|
|
17
|
+
This class represents a NPZ file, the preferable format for
|
|
18
|
+
Biotite internal structure storage.
|
|
19
|
+
|
|
20
|
+
Internally the this class writes/reads all attribute arrays of an
|
|
21
|
+
:class:`AtomArray` or :class:`AtomArrayStack` using the *NumPy*
|
|
22
|
+
:func:`save()`/:func:`load()`
|
|
23
|
+
method. This format offers the fastest I/O operations and completely
|
|
24
|
+
preserves the content all atom annotation arrays.
|
|
25
|
+
|
|
26
|
+
DEPRECATED: Pickle data directly or use
|
|
27
|
+
:class:`biotite.structure.io.pdbx.BinaryCIFFile` instead.
|
|
28
|
+
|
|
29
|
+
Examples
|
|
30
|
+
--------
|
|
31
|
+
Load a \\*.npz file, modify the structure and save the new
|
|
32
|
+
structure into a new file:
|
|
33
|
+
|
|
34
|
+
>>> import os.path
|
|
35
|
+
>>> file = NpzFile.read(os.path.join(path_to_structures, "1l2y.npz"))
|
|
36
|
+
>>> array_stack = file.get_structure()
|
|
37
|
+
>>> array_stack_mod = rotate(array_stack, [1,2,3])
|
|
38
|
+
>>> file = NpzFile()
|
|
39
|
+
>>> file.set_structure(array_stack_mod)
|
|
40
|
+
>>> file.write(os.path.join(path_to_directory, "1l2y_mod.npz"))
|
|
41
|
+
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
def __init__(self):
|
|
45
|
+
super().__init__()
|
|
46
|
+
self._data_dict = None
|
|
47
|
+
|
|
48
|
+
def __copy_fill__(self, clone):
|
|
49
|
+
super().__copy_fill__(clone)
|
|
50
|
+
if self._data_dict is not None:
|
|
51
|
+
for key, value in self._data_dict.items():
|
|
52
|
+
clone._data_dict[key] = np.copy(value)
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def read(cls, file):
|
|
56
|
+
"""
|
|
57
|
+
Read a NPZ file.
|
|
58
|
+
|
|
59
|
+
Parameters
|
|
60
|
+
----------
|
|
61
|
+
file : file-like object or str
|
|
62
|
+
The file to be read.
|
|
63
|
+
Alternatively a file path can be supplied.
|
|
64
|
+
|
|
65
|
+
Returns
|
|
66
|
+
-------
|
|
67
|
+
file_object : NPZFile
|
|
68
|
+
The parsed file.
|
|
69
|
+
"""
|
|
70
|
+
npz_file = NpzFile()
|
|
71
|
+
# File name
|
|
72
|
+
if isinstance(file, str):
|
|
73
|
+
with open(file, "rb") as f:
|
|
74
|
+
npz_file._data_dict = dict(np.load(f, allow_pickle=False))
|
|
75
|
+
# File object
|
|
76
|
+
else:
|
|
77
|
+
if not is_binary(file):
|
|
78
|
+
raise TypeError("A file opened in 'binary' mode is required")
|
|
79
|
+
npz_file._data_dict = dict(np.load(file, allow_pickle=False))
|
|
80
|
+
return npz_file
|
|
81
|
+
|
|
82
|
+
def write(self, file):
|
|
83
|
+
"""
|
|
84
|
+
Write a NPZ file.
|
|
85
|
+
|
|
86
|
+
Parameters
|
|
87
|
+
----------
|
|
88
|
+
file : file-like object or str
|
|
89
|
+
The file to be read.
|
|
90
|
+
Alternatively, a file path can be supplied.
|
|
91
|
+
"""
|
|
92
|
+
if isinstance(file, str):
|
|
93
|
+
with open(file, "wb") as f:
|
|
94
|
+
np.savez(f, **self._data_dict)
|
|
95
|
+
else:
|
|
96
|
+
if not is_binary(file):
|
|
97
|
+
raise TypeError("A file opened in 'binary' mode is required")
|
|
98
|
+
np.savez(file, **self._data_dict)
|
|
99
|
+
|
|
100
|
+
def get_structure(self):
|
|
101
|
+
"""
|
|
102
|
+
Get an :class:`AtomArray` or :class:`AtomArrayStack` from the
|
|
103
|
+
file.
|
|
104
|
+
|
|
105
|
+
If this method returns an array or stack depends on which type
|
|
106
|
+
of object was used when the file was written.
|
|
107
|
+
|
|
108
|
+
Returns
|
|
109
|
+
-------
|
|
110
|
+
array : AtomArray or AtomArrayStack
|
|
111
|
+
The array or stack contained in this file.
|
|
112
|
+
"""
|
|
113
|
+
if self._data_dict is None:
|
|
114
|
+
raise ValueError("The structure of this file "
|
|
115
|
+
"has not been loaded or set yet")
|
|
116
|
+
coord = self._data_dict["coord"]
|
|
117
|
+
# The type of the structure is determined by the dimensionality
|
|
118
|
+
# of the 'coord' field
|
|
119
|
+
if len(coord.shape) == 3:
|
|
120
|
+
array = AtomArrayStack(coord.shape[0], coord.shape[1])
|
|
121
|
+
else:
|
|
122
|
+
array = AtomArray(coord.shape[0])
|
|
123
|
+
|
|
124
|
+
for key, value in self._data_dict.items():
|
|
125
|
+
if key == "coord":
|
|
126
|
+
array.coord = value
|
|
127
|
+
elif key == "bonds":
|
|
128
|
+
array.bonds = BondList(array.array_length(), value)
|
|
129
|
+
elif key == "box":
|
|
130
|
+
array.box = value
|
|
131
|
+
else:
|
|
132
|
+
array.set_annotation(key, value)
|
|
133
|
+
return array
|
|
134
|
+
|
|
135
|
+
def set_structure(self, array):
|
|
136
|
+
"""
|
|
137
|
+
Set the :class:`AtomArray` or :class:`AtomArrayStack` for the
|
|
138
|
+
file.
|
|
139
|
+
|
|
140
|
+
Parameters
|
|
141
|
+
----------
|
|
142
|
+
array : AtomArray or AtomArrayStack
|
|
143
|
+
The array or stack to be saved into this file.
|
|
144
|
+
"""
|
|
145
|
+
self._data_dict = {}
|
|
146
|
+
self._data_dict["coord"] = np.copy(array.coord)
|
|
147
|
+
if array.bonds is not None:
|
|
148
|
+
self._data_dict["bonds"] = array.bonds.as_array()
|
|
149
|
+
if array.box is not None:
|
|
150
|
+
self._data_dict["box"] = np.copy(array.box)
|
|
151
|
+
for annot in array.get_annotation_categories():
|
|
152
|
+
self._data_dict[annot] = np.copy(array.get_annotation(annot))
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This source code is part of the Biotite package and is distributed
|
|
2
|
+
# under the 3-Clause BSD License. Please see 'LICENSE.rst' for further
|
|
3
|
+
# information.
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
This subpackage is used for reading and writing an :class:`AtomArray` or
|
|
7
|
+
:class:`AtomArrayStack` using the popular PDB format.
|
|
8
|
+
Since this format has some limitations, it will be completely replaced
|
|
9
|
+
someday by the modern PDBx format.
|
|
10
|
+
Therefore this subpackage should only be used, if usage of the
|
|
11
|
+
PDBx (CIF or BinaryCIF) format is not suitable (e.g. when interfacing
|
|
12
|
+
other software).
|
|
13
|
+
In all other cases, usage of the :mod:`pdbx` subpackage is encouraged.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
__name__ = "biotite.structure.io.pdb"
|
|
17
|
+
__author__ = "Patrick Kunzmann"
|
|
18
|
+
|
|
19
|
+
from .file import *
|
|
20
|
+
from .convert import *
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
# This source code is part of the Biotite package and is distributed
|
|
2
|
+
# under the 3-Clause BSD License. Please see 'LICENSE.rst' for further
|
|
3
|
+
# information.
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
Some convenience functions for consistency with other ``structure.io``
|
|
7
|
+
subpackages.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
__name__ = "biotite.structure.io.pdb"
|
|
11
|
+
__author__ = "Patrick Kunzmann"
|
|
12
|
+
__all__ = ["get_model_count", "get_structure", "set_structure",
|
|
13
|
+
"list_assemblies", "get_assembly", "get_symmetry_mates"]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def get_model_count(pdb_file):
|
|
17
|
+
"""
|
|
18
|
+
Get the number of models contained in a :class:`PDBFile`.
|
|
19
|
+
|
|
20
|
+
Parameters
|
|
21
|
+
----------
|
|
22
|
+
pdb_file : PDBFile
|
|
23
|
+
The file object.
|
|
24
|
+
|
|
25
|
+
Returns
|
|
26
|
+
-------
|
|
27
|
+
model_count : int
|
|
28
|
+
The number of models.
|
|
29
|
+
"""
|
|
30
|
+
return pdb_file.get_model_count()
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def get_structure(pdb_file, model=None, altloc="first", extra_fields=[],
|
|
34
|
+
include_bonds=False):
|
|
35
|
+
"""
|
|
36
|
+
Create an :class:`AtomArray` or :class:`AtomArrayStack` from a
|
|
37
|
+
:class:`PDBFile`.
|
|
38
|
+
|
|
39
|
+
This function is a thin wrapper around the :class:`PDBFile` method
|
|
40
|
+
:func:`get_structure()` for the sake of consistency with other
|
|
41
|
+
``structure.io`` subpackages.
|
|
42
|
+
|
|
43
|
+
Parameters
|
|
44
|
+
----------
|
|
45
|
+
pdb_file : PDBFile
|
|
46
|
+
The file object.
|
|
47
|
+
model : int, optional
|
|
48
|
+
If this parameter is given, the function will return an
|
|
49
|
+
:class:`AtomArray` from the atoms corresponding to the given
|
|
50
|
+
model number (starting at 1).
|
|
51
|
+
Negative values are used to index models starting from the last
|
|
52
|
+
model instead of the first model.
|
|
53
|
+
If this parameter is omitted, an :class:`AtomArrayStack`
|
|
54
|
+
containing all models will be returned, even if the structure
|
|
55
|
+
contains only one model.
|
|
56
|
+
altloc : {'first', 'occupancy', 'all'}
|
|
57
|
+
This parameter defines how *altloc* IDs are handled:
|
|
58
|
+
- ``'first'`` - Use atoms that have the first *altloc* ID
|
|
59
|
+
appearing in a residue.
|
|
60
|
+
- ``'occupancy'`` - Use atoms that have the *altloc* ID
|
|
61
|
+
with the highest occupancy for a residue.
|
|
62
|
+
- ``'all'`` - Use all atoms.
|
|
63
|
+
Note that this leads to duplicate atoms.
|
|
64
|
+
When this option is chosen, the ``altloc_id`` annotation
|
|
65
|
+
array is added to the returned structure.
|
|
66
|
+
extra_fields : list of str, optional
|
|
67
|
+
The strings in the list are optional annotation categories
|
|
68
|
+
that should be stored in the output array or stack.
|
|
69
|
+
These are valid values:
|
|
70
|
+
``'atom_id'``, ``'b_factor'``, ``'occupancy'`` and ``'charge'``.
|
|
71
|
+
include_bonds : bool, optional
|
|
72
|
+
If set to true, a :class:`BondList` will be created for the
|
|
73
|
+
resulting :class:`AtomArray` containing the bond information
|
|
74
|
+
from the file.
|
|
75
|
+
Bonds, whose order could not be determined from the
|
|
76
|
+
*Chemical Component Dictionary*
|
|
77
|
+
(e.g. especially inter-residue bonds),
|
|
78
|
+
have :attr:`BondType.ANY`, since the PDB format itself does
|
|
79
|
+
not support bond orders.
|
|
80
|
+
|
|
81
|
+
Returns
|
|
82
|
+
-------
|
|
83
|
+
array : AtomArray or AtomArrayStack
|
|
84
|
+
The return type depends on the `model` parameter.
|
|
85
|
+
|
|
86
|
+
"""
|
|
87
|
+
return pdb_file.get_structure(model, altloc, extra_fields, include_bonds)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def set_structure(pdb_file, array, hybrid36=False):
|
|
91
|
+
"""
|
|
92
|
+
write an :class:`AtomArray` or :class:`AtomArrayStack` into a
|
|
93
|
+
:class:`PDBFile`.
|
|
94
|
+
|
|
95
|
+
This function is a thin wrapper around the :class:`PDBFile` method
|
|
96
|
+
:func:`set_structure()` for the sake of consistency with other
|
|
97
|
+
``structure.io`` subpackages.
|
|
98
|
+
|
|
99
|
+
This will save the coordinates, the mandatory annotation categories
|
|
100
|
+
and the optional annotation categories
|
|
101
|
+
'atom_id', 'b_factor', 'occupancy' and 'charge'.
|
|
102
|
+
|
|
103
|
+
Parameters
|
|
104
|
+
----------
|
|
105
|
+
pdb_file : PDBFile
|
|
106
|
+
The file object.
|
|
107
|
+
array : AtomArray or AtomArrayStack
|
|
108
|
+
The structure to be written. If a stack is given, each array in
|
|
109
|
+
the stack will be in a separate model.
|
|
110
|
+
hybrid36: boolean, optional
|
|
111
|
+
Defines wether the file should be written in hybrid-36 format.
|
|
112
|
+
|
|
113
|
+
Notes
|
|
114
|
+
-----
|
|
115
|
+
If `array` has an associated :class:`BondList`, ``CONECT``
|
|
116
|
+
records are also written for all non-water hetero residues
|
|
117
|
+
and all inter-residue connections.
|
|
118
|
+
"""
|
|
119
|
+
pdb_file.set_structure(array, hybrid36)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def list_assemblies(pdb_file):
|
|
123
|
+
"""
|
|
124
|
+
List the biological assemblies that are available for the
|
|
125
|
+
structure in the given file.
|
|
126
|
+
|
|
127
|
+
This function receives the data from the ``REMARK 300`` records
|
|
128
|
+
in the file.
|
|
129
|
+
Consequently, this remark must be present in the file.
|
|
130
|
+
|
|
131
|
+
Parameters
|
|
132
|
+
----------
|
|
133
|
+
pdb_file : PDBFile
|
|
134
|
+
The file object.
|
|
135
|
+
|
|
136
|
+
Returns
|
|
137
|
+
-------
|
|
138
|
+
assemblies : list of str
|
|
139
|
+
A list that contains the available assembly IDs.
|
|
140
|
+
|
|
141
|
+
Examples
|
|
142
|
+
--------
|
|
143
|
+
>>> import os.path
|
|
144
|
+
>>> file = PDBFile.read(os.path.join(path_to_structures, "1f2n.pdb"))
|
|
145
|
+
>>> print(list_assemblies(file))
|
|
146
|
+
['1']
|
|
147
|
+
"""
|
|
148
|
+
return pdb_file.list_assemblies()
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def get_assembly(pdb_file, assembly_id=None, model=None, altloc="first",
|
|
152
|
+
extra_fields=[], include_bonds=False):
|
|
153
|
+
"""
|
|
154
|
+
Build the given biological assembly.
|
|
155
|
+
|
|
156
|
+
This function receives the data from ``REMARK 350`` records in
|
|
157
|
+
the file.
|
|
158
|
+
Consequently, this remark must be present in the file.
|
|
159
|
+
|
|
160
|
+
Parameters
|
|
161
|
+
----------
|
|
162
|
+
pdb_file : PDBFile
|
|
163
|
+
The file object.
|
|
164
|
+
assembly_id : str
|
|
165
|
+
The assembly to build.
|
|
166
|
+
Available assembly IDs can be obtained via
|
|
167
|
+
:func:`list_assemblies()`.
|
|
168
|
+
model : int, optional
|
|
169
|
+
If this parameter is given, the function will return an
|
|
170
|
+
:class:`AtomArray` from the atoms corresponding to the given
|
|
171
|
+
model number (starting at 1).
|
|
172
|
+
Negative values are used to index models starting from the
|
|
173
|
+
last model instead of the first model.
|
|
174
|
+
If this parameter is omitted, an :class:`AtomArrayStack`
|
|
175
|
+
containing all models will be returned, even if the
|
|
176
|
+
structure contains only one model.
|
|
177
|
+
altloc : {'first', 'occupancy', 'all'}
|
|
178
|
+
This parameter defines how *altloc* IDs are handled:
|
|
179
|
+
- ``'first'`` - Use atoms that have the first
|
|
180
|
+
*altloc* ID appearing in a residue.
|
|
181
|
+
- ``'occupancy'`` - Use atoms that have the *altloc* ID
|
|
182
|
+
with the highest occupancy for a residue.
|
|
183
|
+
- ``'all'`` - Use all atoms.
|
|
184
|
+
Note that this leads to duplicate atoms.
|
|
185
|
+
When this option is chosen, the ``altloc_id``
|
|
186
|
+
annotation array is added to the returned structure.
|
|
187
|
+
extra_fields : list of str, optional
|
|
188
|
+
The strings in the list are optional annotation categories
|
|
189
|
+
that should be stored in the output array or stack.
|
|
190
|
+
These are valid values:
|
|
191
|
+
``'atom_id'``, ``'b_factor'``, ``'occupancy'`` and
|
|
192
|
+
``'charge'``.
|
|
193
|
+
include_bonds : bool, optional
|
|
194
|
+
If set to true, a :class:`BondList` will be created for the
|
|
195
|
+
resulting :class:`AtomArray` containing the bond information
|
|
196
|
+
from the file.
|
|
197
|
+
Bonds, whose order could not be determined from the
|
|
198
|
+
*Chemical Component Dictionary*
|
|
199
|
+
(e.g. especially inter-residue bonds),
|
|
200
|
+
have :attr:`BondType.ANY`, since the PDB format itself does
|
|
201
|
+
not support bond orders.
|
|
202
|
+
|
|
203
|
+
Returns
|
|
204
|
+
-------
|
|
205
|
+
assembly : AtomArray or AtomArrayStack
|
|
206
|
+
The assembly.
|
|
207
|
+
The return type depends on the `model` parameter.
|
|
208
|
+
|
|
209
|
+
Examples
|
|
210
|
+
--------
|
|
211
|
+
|
|
212
|
+
>>> import os.path
|
|
213
|
+
>>> file = PDBFile.read(os.path.join(path_to_structures, "1f2n.pdb"))
|
|
214
|
+
>>> assembly = get_assembly(file, model=1)
|
|
215
|
+
"""
|
|
216
|
+
return pdb_file.get_assembly(
|
|
217
|
+
assembly_id, model, altloc, extra_fields, include_bonds
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
def get_symmetry_mates(pdb_file, model=None, altloc="first",
|
|
222
|
+
extra_fields=[], include_bonds=False):
|
|
223
|
+
"""
|
|
224
|
+
Build a structure model containing all symmetric copies
|
|
225
|
+
of the structure within a single unit cell, given by the space
|
|
226
|
+
group.
|
|
227
|
+
|
|
228
|
+
This function receives the data from ``REMARK 290`` records in
|
|
229
|
+
the file.
|
|
230
|
+
Consequently, this remark must be present in the file, which is
|
|
231
|
+
usually only true for crystal structures.
|
|
232
|
+
|
|
233
|
+
Parameters
|
|
234
|
+
----------
|
|
235
|
+
pdb_file : PDBFile
|
|
236
|
+
The file object.
|
|
237
|
+
model : int, optional
|
|
238
|
+
If this parameter is given, the function will return an
|
|
239
|
+
:class:`AtomArray` from the atoms corresponding to the given
|
|
240
|
+
model number (starting at 1).
|
|
241
|
+
Negative values are used to index models starting from the
|
|
242
|
+
last model instead of the first model.
|
|
243
|
+
If this parameter is omitted, an :class:`AtomArrayStack`
|
|
244
|
+
containing all models will be returned, even if the
|
|
245
|
+
structure contains only one model.
|
|
246
|
+
altloc : {'first', 'occupancy', 'all'}
|
|
247
|
+
This parameter defines how *altloc* IDs are handled:
|
|
248
|
+
- ``'first'`` - Use atoms that have the first
|
|
249
|
+
*altloc* ID appearing in a residue.
|
|
250
|
+
- ``'occupancy'`` - Use atoms that have the *altloc* ID
|
|
251
|
+
with the highest occupancy for a residue.
|
|
252
|
+
- ``'all'`` - Use all atoms.
|
|
253
|
+
Note that this leads to duplicate atoms.
|
|
254
|
+
When this option is chosen, the ``altloc_id``
|
|
255
|
+
annotation array is added to the returned structure.
|
|
256
|
+
extra_fields : list of str, optional
|
|
257
|
+
The strings in the list are optional annotation categories
|
|
258
|
+
that should be stored in the output array or stack.
|
|
259
|
+
These are valid values:
|
|
260
|
+
``'atom_id'``, ``'b_factor'``, ``'occupancy'`` and
|
|
261
|
+
``'charge'``.
|
|
262
|
+
include_bonds : bool, optional
|
|
263
|
+
If set to true, a :class:`BondList` will be created for the
|
|
264
|
+
resulting :class:`AtomArray` containing the bond information
|
|
265
|
+
from the file.
|
|
266
|
+
Bonds, whose order could not be determined from the
|
|
267
|
+
*Chemical Component Dictionary*
|
|
268
|
+
(e.g. especially inter-residue bonds),
|
|
269
|
+
have :attr:`BondType.ANY`, since the PDB format itself does
|
|
270
|
+
not support bond orders.
|
|
271
|
+
|
|
272
|
+
Returns
|
|
273
|
+
-------
|
|
274
|
+
symmetry_mates : AtomArray or AtomArrayStack
|
|
275
|
+
All atoms within a single unit cell.
|
|
276
|
+
The return type depends on the `model` parameter.
|
|
277
|
+
|
|
278
|
+
Notes
|
|
279
|
+
-----
|
|
280
|
+
To expand the structure beyond a single unit cell, use
|
|
281
|
+
:func:`repeat_box()` with the return value as its
|
|
282
|
+
input.
|
|
283
|
+
|
|
284
|
+
Examples
|
|
285
|
+
--------
|
|
286
|
+
|
|
287
|
+
>>> import os.path
|
|
288
|
+
>>> file = PDBFile.read(os.path.join(path_to_structures, "1aki.pdb"))
|
|
289
|
+
>>> atoms_in_unit_cell = get_symmetry_mates(file, model=1)
|
|
290
|
+
"""
|
|
291
|
+
return pdb_file.get_symmetry_mates(
|
|
292
|
+
model, altloc, extra_fields, include_bonds
|
|
293
|
+
)
|