biotite 1.5.0__cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_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 +18 -0
- biotite/application/__init__.py +69 -0
- biotite/application/application.py +276 -0
- biotite/application/autodock/__init__.py +12 -0
- biotite/application/autodock/app.py +500 -0
- biotite/application/blast/__init__.py +14 -0
- biotite/application/blast/alignment.py +92 -0
- biotite/application/blast/webapp.py +428 -0
- biotite/application/clustalo/__init__.py +12 -0
- biotite/application/clustalo/app.py +223 -0
- biotite/application/dssp/__init__.py +12 -0
- biotite/application/dssp/app.py +216 -0
- biotite/application/localapp.py +342 -0
- biotite/application/mafft/__init__.py +12 -0
- biotite/application/mafft/app.py +116 -0
- biotite/application/msaapp.py +363 -0
- biotite/application/muscle/__init__.py +13 -0
- biotite/application/muscle/app3.py +227 -0
- biotite/application/muscle/app5.py +163 -0
- biotite/application/sra/__init__.py +18 -0
- biotite/application/sra/app.py +447 -0
- biotite/application/tantan/__init__.py +12 -0
- biotite/application/tantan/app.py +199 -0
- biotite/application/util.py +77 -0
- biotite/application/viennarna/__init__.py +18 -0
- biotite/application/viennarna/rnaalifold.py +310 -0
- biotite/application/viennarna/rnafold.py +254 -0
- biotite/application/viennarna/rnaplot.py +208 -0
- biotite/application/viennarna/util.py +77 -0
- biotite/application/webapp.py +76 -0
- biotite/copyable.py +71 -0
- biotite/database/__init__.py +23 -0
- biotite/database/afdb/__init__.py +12 -0
- biotite/database/afdb/download.py +197 -0
- biotite/database/entrez/__init__.py +15 -0
- biotite/database/entrez/check.py +60 -0
- biotite/database/entrez/dbnames.py +101 -0
- biotite/database/entrez/download.py +228 -0
- biotite/database/entrez/key.py +44 -0
- biotite/database/entrez/query.py +263 -0
- biotite/database/error.py +16 -0
- biotite/database/pubchem/__init__.py +21 -0
- biotite/database/pubchem/download.py +258 -0
- biotite/database/pubchem/error.py +30 -0
- biotite/database/pubchem/query.py +819 -0
- biotite/database/pubchem/throttle.py +98 -0
- biotite/database/rcsb/__init__.py +13 -0
- biotite/database/rcsb/download.py +161 -0
- biotite/database/rcsb/query.py +963 -0
- biotite/database/uniprot/__init__.py +13 -0
- biotite/database/uniprot/check.py +40 -0
- biotite/database/uniprot/download.py +126 -0
- biotite/database/uniprot/query.py +292 -0
- biotite/file.py +244 -0
- biotite/interface/__init__.py +19 -0
- biotite/interface/openmm/__init__.py +20 -0
- biotite/interface/openmm/state.py +93 -0
- biotite/interface/openmm/system.py +227 -0
- biotite/interface/pymol/__init__.py +201 -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 +1228 -0
- biotite/interface/pymol/shapes.py +178 -0
- biotite/interface/pymol/startup.py +169 -0
- biotite/interface/rdkit/__init__.py +19 -0
- biotite/interface/rdkit/mol.py +490 -0
- biotite/interface/version.py +94 -0
- biotite/interface/warning.py +19 -0
- biotite/sequence/__init__.py +84 -0
- biotite/sequence/align/__init__.py +199 -0
- biotite/sequence/align/alignment.py +702 -0
- biotite/sequence/align/banded.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/banded.pyx +652 -0
- biotite/sequence/align/buckets.py +71 -0
- biotite/sequence/align/cigar.py +425 -0
- biotite/sequence/align/kmeralphabet.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/kmeralphabet.pyx +595 -0
- biotite/sequence/align/kmersimilarity.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/kmersimilarity.pyx +233 -0
- biotite/sequence/align/kmertable.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/kmertable.pyx +3411 -0
- biotite/sequence/align/localgapped.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/localgapped.pyx +892 -0
- biotite/sequence/align/localungapped.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/localungapped.pyx +279 -0
- biotite/sequence/align/matrix.py +631 -0
- biotite/sequence/align/matrix_data/3Di.mat +24 -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/PB.license +21 -0
- biotite/sequence/align/matrix_data/PB.mat +18 -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-311-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/multiple.pyx +619 -0
- biotite/sequence/align/pairwise.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/pairwise.pyx +585 -0
- biotite/sequence/align/permutation.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/permutation.pyx +313 -0
- biotite/sequence/align/primes.txt +821 -0
- biotite/sequence/align/selector.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/selector.pyx +954 -0
- biotite/sequence/align/statistics.py +264 -0
- biotite/sequence/align/tracetable.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/tracetable.pxd +64 -0
- biotite/sequence/align/tracetable.pyx +370 -0
- biotite/sequence/alphabet.py +555 -0
- biotite/sequence/annotation.py +836 -0
- biotite/sequence/codec.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/sequence/codec.pyx +155 -0
- biotite/sequence/codon.py +476 -0
- biotite/sequence/codon_tables.txt +202 -0
- biotite/sequence/graphics/__init__.py +33 -0
- biotite/sequence/graphics/alignment.py +1101 -0
- biotite/sequence/graphics/color_schemes/3di_flower.json +48 -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 +40 -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 +170 -0
- biotite/sequence/graphics/dendrogram.py +231 -0
- biotite/sequence/graphics/features.py +544 -0
- biotite/sequence/graphics/logo.py +102 -0
- biotite/sequence/graphics/plasmid.py +712 -0
- biotite/sequence/io/__init__.py +12 -0
- biotite/sequence/io/fasta/__init__.py +22 -0
- biotite/sequence/io/fasta/convert.py +283 -0
- biotite/sequence/io/fasta/file.py +265 -0
- biotite/sequence/io/fastq/__init__.py +19 -0
- biotite/sequence/io/fastq/convert.py +117 -0
- biotite/sequence/io/fastq/file.py +507 -0
- biotite/sequence/io/genbank/__init__.py +17 -0
- biotite/sequence/io/genbank/annotation.py +269 -0
- biotite/sequence/io/genbank/file.py +573 -0
- biotite/sequence/io/genbank/metadata.py +336 -0
- biotite/sequence/io/genbank/sequence.py +173 -0
- biotite/sequence/io/general.py +201 -0
- biotite/sequence/io/gff/__init__.py +26 -0
- biotite/sequence/io/gff/convert.py +128 -0
- biotite/sequence/io/gff/file.py +449 -0
- biotite/sequence/phylo/__init__.py +36 -0
- biotite/sequence/phylo/nj.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/sequence/phylo/nj.pyx +221 -0
- biotite/sequence/phylo/tree.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/sequence/phylo/tree.pyx +1169 -0
- biotite/sequence/phylo/upgma.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/sequence/phylo/upgma.pyx +164 -0
- biotite/sequence/profile.py +561 -0
- biotite/sequence/search.py +117 -0
- biotite/sequence/seqtypes.py +720 -0
- biotite/sequence/sequence.py +373 -0
- biotite/setup_ccd.py +197 -0
- biotite/structure/__init__.py +135 -0
- 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 +1562 -0
- biotite/structure/basepairs.py +1403 -0
- biotite/structure/bonds.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/structure/bonds.pyx +2036 -0
- biotite/structure/box.py +724 -0
- biotite/structure/celllist.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/structure/celllist.pyx +864 -0
- biotite/structure/chains.py +310 -0
- biotite/structure/charges.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/structure/charges.pyx +520 -0
- biotite/structure/compare.py +683 -0
- biotite/structure/density.py +109 -0
- biotite/structure/dotbracket.py +213 -0
- biotite/structure/error.py +39 -0
- biotite/structure/filter.py +591 -0
- biotite/structure/geometry.py +817 -0
- biotite/structure/graphics/__init__.py +13 -0
- biotite/structure/graphics/atoms.py +243 -0
- biotite/structure/graphics/rna.py +298 -0
- biotite/structure/hbond.py +425 -0
- biotite/structure/info/__init__.py +24 -0
- biotite/structure/info/atom_masses.json +121 -0
- biotite/structure/info/atoms.py +98 -0
- biotite/structure/info/bonds.py +149 -0
- biotite/structure/info/ccd.py +200 -0
- biotite/structure/info/components.bcif +0 -0
- biotite/structure/info/groups.py +128 -0
- biotite/structure/info/masses.py +121 -0
- biotite/structure/info/misc.py +137 -0
- biotite/structure/info/radii.py +267 -0
- biotite/structure/info/standardize.py +185 -0
- biotite/structure/integrity.py +213 -0
- biotite/structure/io/__init__.py +29 -0
- biotite/structure/io/dcd/__init__.py +13 -0
- biotite/structure/io/dcd/file.py +67 -0
- biotite/structure/io/general.py +243 -0
- biotite/structure/io/gro/__init__.py +14 -0
- biotite/structure/io/gro/file.py +343 -0
- biotite/structure/io/mol/__init__.py +20 -0
- biotite/structure/io/mol/convert.py +112 -0
- biotite/structure/io/mol/ctab.py +420 -0
- biotite/structure/io/mol/header.py +120 -0
- biotite/structure/io/mol/mol.py +149 -0
- biotite/structure/io/mol/sdf.py +940 -0
- biotite/structure/io/netcdf/__init__.py +13 -0
- biotite/structure/io/netcdf/file.py +64 -0
- biotite/structure/io/pdb/__init__.py +20 -0
- biotite/structure/io/pdb/convert.py +389 -0
- biotite/structure/io/pdb/file.py +1380 -0
- biotite/structure/io/pdb/hybrid36.cpython-311-x86_64-linux-gnu.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 +113 -0
- biotite/structure/io/pdbqt/file.py +688 -0
- biotite/structure/io/pdbx/__init__.py +23 -0
- biotite/structure/io/pdbx/bcif.py +674 -0
- biotite/structure/io/pdbx/cif.py +1091 -0
- biotite/structure/io/pdbx/component.py +251 -0
- biotite/structure/io/pdbx/compress.py +362 -0
- biotite/structure/io/pdbx/convert.py +2113 -0
- biotite/structure/io/pdbx/encoding.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/structure/io/pdbx/encoding.pyx +1078 -0
- biotite/structure/io/trajfile.py +696 -0
- biotite/structure/io/trr/__init__.py +13 -0
- biotite/structure/io/trr/file.py +43 -0
- biotite/structure/io/util.py +38 -0
- biotite/structure/io/xtc/__init__.py +13 -0
- biotite/structure/io/xtc/file.py +43 -0
- biotite/structure/mechanics.py +72 -0
- biotite/structure/molecules.py +337 -0
- biotite/structure/pseudoknots.py +622 -0
- biotite/structure/rdf.py +245 -0
- biotite/structure/repair.py +302 -0
- biotite/structure/residues.py +716 -0
- biotite/structure/rings.py +451 -0
- biotite/structure/sasa.cpython-311-x86_64-linux-gnu.so +0 -0
- biotite/structure/sasa.pyx +322 -0
- biotite/structure/segments.py +328 -0
- biotite/structure/sequence.py +110 -0
- biotite/structure/spacegroups.json +1567 -0
- biotite/structure/spacegroups.license +26 -0
- biotite/structure/sse.py +306 -0
- biotite/structure/superimpose.py +511 -0
- biotite/structure/tm.py +581 -0
- biotite/structure/transform.py +736 -0
- biotite/structure/util.py +160 -0
- biotite/version.py +34 -0
- biotite/visualize.py +375 -0
- biotite-1.5.0.dist-info/METADATA +162 -0
- biotite-1.5.0.dist-info/RECORD +354 -0
- biotite-1.5.0.dist-info/WHEEL +6 -0
- biotite-1.5.0.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,64 @@
|
|
|
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 biotraj
|
|
10
|
+
import numpy as np
|
|
11
|
+
from biotite.structure.box import unitcell_from_vectors, vectors_from_unitcell
|
|
12
|
+
from biotite.structure.io.trajfile import TrajectoryFile
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class NetCDFFile(TrajectoryFile):
|
|
16
|
+
"""
|
|
17
|
+
This file class represents a NetCDF trajectory file.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
@classmethod
|
|
21
|
+
def traj_type(cls):
|
|
22
|
+
return biotraj.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
|
+
[
|
|
36
|
+
vectors_from_unitcell(a, b, c, alpha, beta, gamma)
|
|
37
|
+
for (a, b, c), (alpha, beta, gamma) in zip(
|
|
38
|
+
cell_lengths, np.deg2rad(cell_angles)
|
|
39
|
+
)
|
|
40
|
+
],
|
|
41
|
+
axis=0,
|
|
42
|
+
)
|
|
43
|
+
return coord, box, time
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def prepare_write_values(cls, coord, box, time):
|
|
47
|
+
coord = coord.astype(np.float32, copy=False) if coord is not None else None
|
|
48
|
+
time = time.astype(np.float32, copy=False) if time is not None else None
|
|
49
|
+
if box is None:
|
|
50
|
+
cell_lengths = None
|
|
51
|
+
cell_angles = None
|
|
52
|
+
else:
|
|
53
|
+
cell_lengths = np.zeros((len(box), 3), dtype=np.float32)
|
|
54
|
+
cell_angles = np.zeros((len(box), 3), dtype=np.float32)
|
|
55
|
+
for i, model_box in enumerate(box):
|
|
56
|
+
a, b, c, alpha, beta, gamma = unitcell_from_vectors(model_box)
|
|
57
|
+
cell_lengths[i] = np.array((a, b, c))
|
|
58
|
+
cell_angles[i] = np.rad2deg((alpha, beta, gamma))
|
|
59
|
+
return {
|
|
60
|
+
"coordinates": coord,
|
|
61
|
+
"time": time,
|
|
62
|
+
"cell_lengths": cell_lengths,
|
|
63
|
+
"cell_angles": cell_angles,
|
|
64
|
+
}
|
|
@@ -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 .convert import *
|
|
20
|
+
from .file import *
|
|
@@ -0,0 +1,389 @@
|
|
|
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__ = [
|
|
13
|
+
"get_model_count",
|
|
14
|
+
"get_structure",
|
|
15
|
+
"set_structure",
|
|
16
|
+
"list_assemblies",
|
|
17
|
+
"get_assembly",
|
|
18
|
+
"get_unit_cell",
|
|
19
|
+
"get_symmetry_mates",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
import warnings
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def get_model_count(pdb_file):
|
|
26
|
+
"""
|
|
27
|
+
Get the number of models contained in a :class:`PDBFile`.
|
|
28
|
+
|
|
29
|
+
Parameters
|
|
30
|
+
----------
|
|
31
|
+
pdb_file : PDBFile
|
|
32
|
+
The file object.
|
|
33
|
+
|
|
34
|
+
Returns
|
|
35
|
+
-------
|
|
36
|
+
model_count : int
|
|
37
|
+
The number of models.
|
|
38
|
+
"""
|
|
39
|
+
return pdb_file.get_model_count()
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def get_structure(
|
|
43
|
+
pdb_file, model=None, altloc="first", extra_fields=[], include_bonds=False
|
|
44
|
+
):
|
|
45
|
+
"""
|
|
46
|
+
Create an :class:`AtomArray` or :class:`AtomArrayStack` from a
|
|
47
|
+
:class:`PDBFile`.
|
|
48
|
+
|
|
49
|
+
This function is a thin wrapper around the :class:`PDBFile` method
|
|
50
|
+
:func:`get_structure()` for the sake of consistency with other
|
|
51
|
+
``structure.io`` subpackages.
|
|
52
|
+
|
|
53
|
+
Parameters
|
|
54
|
+
----------
|
|
55
|
+
pdb_file : PDBFile
|
|
56
|
+
The file object.
|
|
57
|
+
model : int, optional
|
|
58
|
+
If this parameter is given, the function will return an
|
|
59
|
+
:class:`AtomArray` from the atoms corresponding to the given
|
|
60
|
+
model number (starting at 1).
|
|
61
|
+
Negative values are used to index models starting from the last
|
|
62
|
+
model instead of the first model.
|
|
63
|
+
If this parameter is omitted, an :class:`AtomArrayStack`
|
|
64
|
+
containing all models will be returned, even if the structure
|
|
65
|
+
contains only one model.
|
|
66
|
+
altloc : {'first', 'occupancy', 'all'}
|
|
67
|
+
This parameter defines how *altloc* IDs are handled:
|
|
68
|
+
- ``'first'`` - Use atoms that have the first *altloc* ID
|
|
69
|
+
appearing in a residue.
|
|
70
|
+
- ``'occupancy'`` - Use atoms that have the *altloc* ID
|
|
71
|
+
with the highest occupancy for a residue.
|
|
72
|
+
- ``'all'`` - Use all atoms.
|
|
73
|
+
Note that this leads to duplicate atoms.
|
|
74
|
+
When this option is chosen, the ``altloc_id`` annotation
|
|
75
|
+
array is added to the returned structure.
|
|
76
|
+
extra_fields : list of str, optional
|
|
77
|
+
The strings in the list are optional annotation categories
|
|
78
|
+
that should be stored in the output array or stack.
|
|
79
|
+
These are valid values:
|
|
80
|
+
``'atom_id'``, ``'b_factor'``, ``'occupancy'`` and ``'charge'``.
|
|
81
|
+
include_bonds : bool, optional
|
|
82
|
+
If set to true, a :class:`BondList` will be created for the
|
|
83
|
+
resulting :class:`AtomArray` containing the bond information
|
|
84
|
+
from the file.
|
|
85
|
+
Bonds, whose order could not be determined from the
|
|
86
|
+
*Chemical Component Dictionary*
|
|
87
|
+
(e.g. especially inter-residue bonds),
|
|
88
|
+
have :attr:`BondType.ANY`, since the PDB format itself does
|
|
89
|
+
not support bond orders.
|
|
90
|
+
|
|
91
|
+
Returns
|
|
92
|
+
-------
|
|
93
|
+
array : AtomArray or AtomArrayStack
|
|
94
|
+
The return type depends on the `model` parameter.
|
|
95
|
+
"""
|
|
96
|
+
return pdb_file.get_structure(model, altloc, extra_fields, include_bonds)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def set_structure(pdb_file, array, hybrid36=False):
|
|
100
|
+
"""
|
|
101
|
+
Write an :class:`AtomArray` or :class:`AtomArrayStack` into a
|
|
102
|
+
:class:`PDBFile`.
|
|
103
|
+
|
|
104
|
+
This function is a thin wrapper around the :class:`PDBFile` method
|
|
105
|
+
:func:`set_structure()` for the sake of consistency with other
|
|
106
|
+
``structure.io`` subpackages.
|
|
107
|
+
|
|
108
|
+
This will save the coordinates, the mandatory annotation categories
|
|
109
|
+
and the optional annotation categories
|
|
110
|
+
'atom_id', 'b_factor', 'occupancy' and 'charge'.
|
|
111
|
+
|
|
112
|
+
Parameters
|
|
113
|
+
----------
|
|
114
|
+
pdb_file : PDBFile
|
|
115
|
+
The file object.
|
|
116
|
+
array : AtomArray or AtomArrayStack
|
|
117
|
+
The structure to be written. If a stack is given, each array in
|
|
118
|
+
the stack will be in a separate model.
|
|
119
|
+
hybrid36 : boolean, optional
|
|
120
|
+
Defines wether the file should be written in hybrid-36 format.
|
|
121
|
+
|
|
122
|
+
Notes
|
|
123
|
+
-----
|
|
124
|
+
If `array` has an associated :class:`BondList`, ``CONECT``
|
|
125
|
+
records are also written for all non-water hetero residues
|
|
126
|
+
and all inter-residue connections.
|
|
127
|
+
"""
|
|
128
|
+
pdb_file.set_structure(array, hybrid36)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def list_assemblies(pdb_file):
|
|
132
|
+
"""
|
|
133
|
+
List the biological assemblies that are available for the
|
|
134
|
+
structure in the given file.
|
|
135
|
+
|
|
136
|
+
This function receives the data from the ``REMARK 300`` records
|
|
137
|
+
in the file.
|
|
138
|
+
Consequently, this remark must be present in the file.
|
|
139
|
+
|
|
140
|
+
Parameters
|
|
141
|
+
----------
|
|
142
|
+
pdb_file : PDBFile
|
|
143
|
+
The file object.
|
|
144
|
+
|
|
145
|
+
Returns
|
|
146
|
+
-------
|
|
147
|
+
assemblies : list of str
|
|
148
|
+
A list that contains the available assembly IDs.
|
|
149
|
+
|
|
150
|
+
Examples
|
|
151
|
+
--------
|
|
152
|
+
>>> import os.path
|
|
153
|
+
>>> file = PDBFile.read(os.path.join(path_to_structures, "1f2n.pdb"))
|
|
154
|
+
>>> print(list_assemblies(file))
|
|
155
|
+
['1']
|
|
156
|
+
"""
|
|
157
|
+
return pdb_file.list_assemblies()
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def get_assembly(
|
|
161
|
+
pdb_file,
|
|
162
|
+
assembly_id=None,
|
|
163
|
+
model=None,
|
|
164
|
+
altloc="first",
|
|
165
|
+
extra_fields=[],
|
|
166
|
+
include_bonds=False,
|
|
167
|
+
):
|
|
168
|
+
"""
|
|
169
|
+
Build the given biological assembly.
|
|
170
|
+
|
|
171
|
+
This function receives the data from ``REMARK 350`` records in
|
|
172
|
+
the file.
|
|
173
|
+
Consequently, this remark must be present in the file.
|
|
174
|
+
|
|
175
|
+
Parameters
|
|
176
|
+
----------
|
|
177
|
+
pdb_file : PDBFile
|
|
178
|
+
The file object.
|
|
179
|
+
assembly_id : str
|
|
180
|
+
The assembly to build.
|
|
181
|
+
Available assembly IDs can be obtained via
|
|
182
|
+
:func:`list_assemblies()`.
|
|
183
|
+
model : int, optional
|
|
184
|
+
If this parameter is given, the function will return an
|
|
185
|
+
:class:`AtomArray` from the atoms corresponding to the given
|
|
186
|
+
model number (starting at 1).
|
|
187
|
+
Negative values are used to index models starting from the
|
|
188
|
+
last model instead of the first model.
|
|
189
|
+
If this parameter is omitted, an :class:`AtomArrayStack`
|
|
190
|
+
containing all models will be returned, even if the
|
|
191
|
+
structure contains only one model.
|
|
192
|
+
altloc : {'first', 'occupancy', 'all'}
|
|
193
|
+
This parameter defines how *altloc* IDs are handled:
|
|
194
|
+
- ``'first'`` - Use atoms that have the first
|
|
195
|
+
*altloc* ID appearing in a residue.
|
|
196
|
+
- ``'occupancy'`` - Use atoms that have the *altloc* ID
|
|
197
|
+
with the highest occupancy for a residue.
|
|
198
|
+
- ``'all'`` - Use all atoms.
|
|
199
|
+
Note that this leads to duplicate atoms.
|
|
200
|
+
When this option is chosen, the ``altloc_id``
|
|
201
|
+
annotation array is added to the returned structure.
|
|
202
|
+
extra_fields : list of str, optional
|
|
203
|
+
The strings in the list are optional annotation categories
|
|
204
|
+
that should be stored in the output array or stack.
|
|
205
|
+
These are valid values:
|
|
206
|
+
``'atom_id'``, ``'b_factor'``, ``'occupancy'`` and
|
|
207
|
+
``'charge'``.
|
|
208
|
+
include_bonds : bool, optional
|
|
209
|
+
If set to true, a :class:`BondList` will be created for the
|
|
210
|
+
resulting :class:`AtomArray` containing the bond information
|
|
211
|
+
from the file.
|
|
212
|
+
Bonds, whose order could not be determined from the
|
|
213
|
+
*Chemical Component Dictionary*
|
|
214
|
+
(e.g. especially inter-residue bonds),
|
|
215
|
+
have :attr:`BondType.ANY`, since the PDB format itself does
|
|
216
|
+
not support bond orders.
|
|
217
|
+
|
|
218
|
+
Returns
|
|
219
|
+
-------
|
|
220
|
+
assembly : AtomArray or AtomArrayStack
|
|
221
|
+
The assembly.
|
|
222
|
+
The return type depends on the `model` parameter.
|
|
223
|
+
Contains the `sym_id` annotation, which enumerates the copies of the asymmetric
|
|
224
|
+
unit in the assembly.
|
|
225
|
+
|
|
226
|
+
Examples
|
|
227
|
+
--------
|
|
228
|
+
|
|
229
|
+
>>> import os.path
|
|
230
|
+
>>> file = PDBFile.read(os.path.join(path_to_structures, "1f2n.pdb"))
|
|
231
|
+
>>> assembly = get_assembly(file, model=1)
|
|
232
|
+
"""
|
|
233
|
+
return pdb_file.get_assembly(
|
|
234
|
+
assembly_id, model, altloc, extra_fields, include_bonds
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
def get_unit_cell(
|
|
239
|
+
pdb_file, model=None, altloc="first", extra_fields=[], include_bonds=False
|
|
240
|
+
):
|
|
241
|
+
"""
|
|
242
|
+
Build a structure model containing all symmetric copies
|
|
243
|
+
of the structure within a single unit cell, given by the space
|
|
244
|
+
group.
|
|
245
|
+
|
|
246
|
+
This function receives the data from ``REMARK 290`` records in
|
|
247
|
+
the file.
|
|
248
|
+
Consequently, this remark must be present in the file, which is
|
|
249
|
+
usually only true for crystal structures.
|
|
250
|
+
|
|
251
|
+
Parameters
|
|
252
|
+
----------
|
|
253
|
+
pdb_file : PDBFile
|
|
254
|
+
The file object.
|
|
255
|
+
model : int, optional
|
|
256
|
+
If this parameter is given, the function will return an
|
|
257
|
+
:class:`AtomArray` from the atoms corresponding to the given
|
|
258
|
+
model number (starting at 1).
|
|
259
|
+
Negative values are used to index models starting from the
|
|
260
|
+
last model instead of the first model.
|
|
261
|
+
If this parameter is omitted, an :class:`AtomArrayStack`
|
|
262
|
+
containing all models will be returned, even if the
|
|
263
|
+
structure contains only one model.
|
|
264
|
+
altloc : {'first', 'occupancy', 'all'}
|
|
265
|
+
This parameter defines how *altloc* IDs are handled:
|
|
266
|
+
- ``'first'`` - Use atoms that have the first
|
|
267
|
+
*altloc* ID appearing in a residue.
|
|
268
|
+
- ``'occupancy'`` - Use atoms that have the *altloc* ID
|
|
269
|
+
with the highest occupancy for a residue.
|
|
270
|
+
- ``'all'`` - Use all atoms.
|
|
271
|
+
Note that this leads to duplicate atoms.
|
|
272
|
+
When this option is chosen, the ``altloc_id``
|
|
273
|
+
annotation array is added to the returned structure.
|
|
274
|
+
extra_fields : list of str, optional
|
|
275
|
+
The strings in the list are optional annotation categories
|
|
276
|
+
that should be stored in the output array or stack.
|
|
277
|
+
These are valid values:
|
|
278
|
+
``'atom_id'``, ``'b_factor'``, ``'occupancy'`` and
|
|
279
|
+
``'charge'``.
|
|
280
|
+
include_bonds : bool, optional
|
|
281
|
+
If set to true, a :class:`BondList` will be created for the
|
|
282
|
+
resulting :class:`AtomArray` containing the bond information
|
|
283
|
+
from the file.
|
|
284
|
+
Bonds, whose order could not be determined from the
|
|
285
|
+
*Chemical Component Dictionary*
|
|
286
|
+
(e.g. especially inter-residue bonds),
|
|
287
|
+
have :attr:`BondType.ANY`, since the PDB format itself does
|
|
288
|
+
not support bond orders.
|
|
289
|
+
|
|
290
|
+
Returns
|
|
291
|
+
-------
|
|
292
|
+
symmetry_mates : AtomArray or AtomArrayStack
|
|
293
|
+
All atoms within a single unit cell.
|
|
294
|
+
The return type depends on the `model` parameter.
|
|
295
|
+
|
|
296
|
+
Notes
|
|
297
|
+
-----
|
|
298
|
+
To expand the structure beyond a single unit cell, use
|
|
299
|
+
:func:`repeat_box()` with the return value as its
|
|
300
|
+
input.
|
|
301
|
+
|
|
302
|
+
Examples
|
|
303
|
+
--------
|
|
304
|
+
|
|
305
|
+
>>> import os.path
|
|
306
|
+
>>> file = PDBFile.read(os.path.join(path_to_structures, "1aki.pdb"))
|
|
307
|
+
>>> atoms_in_unit_cell = get_unit_cell(file, model=1)
|
|
308
|
+
"""
|
|
309
|
+
return pdb_file.get_unit_cell(model, altloc, extra_fields, include_bonds)
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
def get_symmetry_mates(
|
|
313
|
+
pdb_file, model=None, altloc="first", extra_fields=[], include_bonds=False
|
|
314
|
+
):
|
|
315
|
+
"""
|
|
316
|
+
Build a structure model containing all symmetric copies
|
|
317
|
+
of the structure within a single unit cell, given by the space
|
|
318
|
+
group.
|
|
319
|
+
|
|
320
|
+
This function receives the data from ``REMARK 290`` records in
|
|
321
|
+
the file.
|
|
322
|
+
Consequently, this remark must be present in the file, which is
|
|
323
|
+
usually only true for crystal structures.
|
|
324
|
+
|
|
325
|
+
DEPRECATED: Use :func:`get_unit_cell()` instead.
|
|
326
|
+
|
|
327
|
+
Parameters
|
|
328
|
+
----------
|
|
329
|
+
pdb_file : PDBFile
|
|
330
|
+
The file object.
|
|
331
|
+
model : int, optional
|
|
332
|
+
If this parameter is given, the function will return an
|
|
333
|
+
:class:`AtomArray` from the atoms corresponding to the given
|
|
334
|
+
model number (starting at 1).
|
|
335
|
+
Negative values are used to index models starting from the
|
|
336
|
+
last model instead of the first model.
|
|
337
|
+
If this parameter is omitted, an :class:`AtomArrayStack`
|
|
338
|
+
containing all models will be returned, even if the
|
|
339
|
+
structure contains only one model.
|
|
340
|
+
altloc : {'first', 'occupancy', 'all'}
|
|
341
|
+
This parameter defines how *altloc* IDs are handled:
|
|
342
|
+
- ``'first'`` - Use atoms that have the first
|
|
343
|
+
*altloc* ID appearing in a residue.
|
|
344
|
+
- ``'occupancy'`` - Use atoms that have the *altloc* ID
|
|
345
|
+
with the highest occupancy for a residue.
|
|
346
|
+
- ``'all'`` - Use all atoms.
|
|
347
|
+
Note that this leads to duplicate atoms.
|
|
348
|
+
When this option is chosen, the ``altloc_id``
|
|
349
|
+
annotation array is added to the returned structure.
|
|
350
|
+
extra_fields : list of str, optional
|
|
351
|
+
The strings in the list are optional annotation categories
|
|
352
|
+
that should be stored in the output array or stack.
|
|
353
|
+
These are valid values:
|
|
354
|
+
``'atom_id'``, ``'b_factor'``, ``'occupancy'`` and
|
|
355
|
+
``'charge'``.
|
|
356
|
+
include_bonds : bool, optional
|
|
357
|
+
If set to true, a :class:`BondList` will be created for the
|
|
358
|
+
resulting :class:`AtomArray` containing the bond information
|
|
359
|
+
from the file.
|
|
360
|
+
Bonds, whose order could not be determined from the
|
|
361
|
+
*Chemical Component Dictionary*
|
|
362
|
+
(e.g. especially inter-residue bonds),
|
|
363
|
+
have :attr:`BondType.ANY`, since the PDB format itself does
|
|
364
|
+
not support bond orders.
|
|
365
|
+
|
|
366
|
+
Returns
|
|
367
|
+
-------
|
|
368
|
+
symmetry_mates : AtomArray or AtomArrayStack
|
|
369
|
+
All atoms within a single unit cell.
|
|
370
|
+
The return type depends on the `model` parameter.
|
|
371
|
+
|
|
372
|
+
Notes
|
|
373
|
+
-----
|
|
374
|
+
To expand the structure beyond a single unit cell, use
|
|
375
|
+
:func:`repeat_box()` with the return value as its
|
|
376
|
+
input.
|
|
377
|
+
|
|
378
|
+
Examples
|
|
379
|
+
--------
|
|
380
|
+
|
|
381
|
+
>>> import os.path
|
|
382
|
+
>>> file = PDBFile.read(os.path.join(path_to_structures, "1aki.pdb"))
|
|
383
|
+
>>> atoms_in_unit_cell = get_symmetry_mates(file, model=1)
|
|
384
|
+
"""
|
|
385
|
+
warnings.warn(
|
|
386
|
+
"'get_symmetry_mates()' is deprecated, use 'get_unit_cell()' instead",
|
|
387
|
+
DeprecationWarning,
|
|
388
|
+
)
|
|
389
|
+
return pdb_file.get_unit_cell(model, altloc, extra_fields, include_bonds)
|