biotite 1.5.0__cp313-cp313-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-313-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-313-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/kmeralphabet.pyx +595 -0
- biotite/sequence/align/kmersimilarity.cpython-313-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/kmersimilarity.pyx +233 -0
- biotite/sequence/align/kmertable.cpython-313-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/kmertable.pyx +3411 -0
- biotite/sequence/align/localgapped.cpython-313-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/localgapped.pyx +892 -0
- biotite/sequence/align/localungapped.cpython-313-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-313-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/multiple.pyx +619 -0
- biotite/sequence/align/pairwise.cpython-313-x86_64-linux-gnu.so +0 -0
- biotite/sequence/align/pairwise.pyx +585 -0
- biotite/sequence/align/permutation.cpython-313-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-313-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-313-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-313-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-313-x86_64-linux-gnu.so +0 -0
- biotite/sequence/phylo/nj.pyx +221 -0
- biotite/sequence/phylo/tree.cpython-313-x86_64-linux-gnu.so +0 -0
- biotite/sequence/phylo/tree.pyx +1169 -0
- biotite/sequence/phylo/upgma.cpython-313-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-313-x86_64-linux-gnu.so +0 -0
- biotite/structure/bonds.pyx +2036 -0
- biotite/structure/box.py +724 -0
- biotite/structure/celllist.cpython-313-x86_64-linux-gnu.so +0 -0
- biotite/structure/celllist.pyx +864 -0
- biotite/structure/chains.py +310 -0
- biotite/structure/charges.cpython-313-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-313-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-313-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-313-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,500 @@
|
|
|
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.application.autodock"
|
|
6
|
+
__author__ = "Patrick Kunzmann"
|
|
7
|
+
__all__ = ["VinaApp"]
|
|
8
|
+
|
|
9
|
+
import copy
|
|
10
|
+
from tempfile import NamedTemporaryFile
|
|
11
|
+
import numpy as np
|
|
12
|
+
from biotite.application.application import AppState, requires_state
|
|
13
|
+
from biotite.application.localapp import LocalApp, cleanup_tempfile
|
|
14
|
+
from biotite.structure.bonds import find_connected
|
|
15
|
+
from biotite.structure.error import BadStructureError
|
|
16
|
+
from biotite.structure.io.pdbqt import PDBQTFile
|
|
17
|
+
from biotite.structure.residues import get_residue_masks, get_residue_starts_for
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class VinaApp(LocalApp):
|
|
21
|
+
"""
|
|
22
|
+
Dock a ligand to a receptor molecule using *AutoDock Vina*.
|
|
23
|
+
|
|
24
|
+
Parameters
|
|
25
|
+
----------
|
|
26
|
+
ligand : AtomArray
|
|
27
|
+
The structure of the receptor molecule.
|
|
28
|
+
Must have an associated :class:`BondList`.
|
|
29
|
+
An associated ``charge`` annotation is recommended for proper
|
|
30
|
+
calculation of partial charges.
|
|
31
|
+
receptor : AtomArray, shape=(n,)
|
|
32
|
+
The structure of the receptor molecule.
|
|
33
|
+
Must have an associated :class:`BondList`.
|
|
34
|
+
An associated ``charge`` annotation is recommended for proper
|
|
35
|
+
calculation of partial charges.
|
|
36
|
+
center : ndarray, shape=(3,), dtype=float
|
|
37
|
+
The *xyz* coordinates for the center of the search space.
|
|
38
|
+
size : ndarray, shape=(3,), dtype=float
|
|
39
|
+
The size of the search space in *xyz* directions.
|
|
40
|
+
flexible : ndarray, shape=(n,), dtype=bool, optional
|
|
41
|
+
A boolean mask that indicates flexible amino acid side chains
|
|
42
|
+
in `receptor`.
|
|
43
|
+
Each residue, where at least one atom index is ``True`` in
|
|
44
|
+
`flexible`, is considered flexible.
|
|
45
|
+
By default, the receptor has no flexibility.
|
|
46
|
+
bin_path : str, optional
|
|
47
|
+
Path to the *Vina* binary.
|
|
48
|
+
|
|
49
|
+
Examples
|
|
50
|
+
--------
|
|
51
|
+
|
|
52
|
+
>>> # A dummy receptor and ligand
|
|
53
|
+
>>> ligand = residue("ASP")
|
|
54
|
+
>>> receptor = atom_array
|
|
55
|
+
>>> app = VinaApp(
|
|
56
|
+
... ligand, receptor,
|
|
57
|
+
... # Binding pocket is in the center of the receptor
|
|
58
|
+
... center=centroid(receptor),
|
|
59
|
+
... # 20 Å x 20 Å x 20 Å search space
|
|
60
|
+
... size=[20, 20, 20],
|
|
61
|
+
... # Handle residues 2 and 5 as flexible
|
|
62
|
+
... flexible=(receptor.res_id == 2) | (receptor.res_id == 5)
|
|
63
|
+
... )
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
def __init__(self, ligand, receptor, center, size, flexible=None, bin_path="vina"):
|
|
67
|
+
super().__init__(bin_path)
|
|
68
|
+
|
|
69
|
+
if ligand.bonds is None:
|
|
70
|
+
raise ValueError("The ligand has no associated BondList")
|
|
71
|
+
if receptor.bonds is None:
|
|
72
|
+
raise ValueError("The receptor has no associated BondList")
|
|
73
|
+
|
|
74
|
+
self._ligand = ligand.copy()
|
|
75
|
+
self._receptor = receptor.copy()
|
|
76
|
+
self._center = copy.deepcopy(center)
|
|
77
|
+
self._size = copy.deepcopy(size)
|
|
78
|
+
self._is_flexible = flexible is not None
|
|
79
|
+
self._seed = None
|
|
80
|
+
self._exhaustiveness = None
|
|
81
|
+
self._number = None
|
|
82
|
+
self._energy_range = None
|
|
83
|
+
|
|
84
|
+
if self._is_flexible:
|
|
85
|
+
flexible_indices = np.where(flexible)[0]
|
|
86
|
+
self._flex_res_starts = np.unique(
|
|
87
|
+
get_residue_starts_for(receptor, flexible_indices)
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
self._ligand_file = NamedTemporaryFile("w", suffix=".pdbqt", delete=False)
|
|
91
|
+
self._receptor_file = NamedTemporaryFile("w", suffix=".pdbqt", delete=False)
|
|
92
|
+
self._receptor_flex_file = NamedTemporaryFile(
|
|
93
|
+
"w", suffix=".pdbqt", delete=False
|
|
94
|
+
)
|
|
95
|
+
self._out_file = NamedTemporaryFile("r", suffix=".pdbqt", delete=False)
|
|
96
|
+
|
|
97
|
+
@requires_state(AppState.CREATED)
|
|
98
|
+
def set_seed(self, seed):
|
|
99
|
+
"""
|
|
100
|
+
Fix the seed for the random number generator to get
|
|
101
|
+
reproducible results.
|
|
102
|
+
|
|
103
|
+
By default, the seed is chosen randomly.
|
|
104
|
+
|
|
105
|
+
Parameters
|
|
106
|
+
----------
|
|
107
|
+
seed : int
|
|
108
|
+
The seed for the random number generator.
|
|
109
|
+
"""
|
|
110
|
+
self._seed = seed
|
|
111
|
+
|
|
112
|
+
@requires_state(AppState.CREATED)
|
|
113
|
+
def set_exhaustiveness(self, exhaustiveness):
|
|
114
|
+
"""
|
|
115
|
+
Set the *exhaustiveness* parameter for *Vina*.
|
|
116
|
+
|
|
117
|
+
A higher exhaustiveness may lead to better docking results, but
|
|
118
|
+
also increases the computation time.
|
|
119
|
+
By default, the exhaustiveness is ``8``.
|
|
120
|
+
|
|
121
|
+
Parameters
|
|
122
|
+
----------
|
|
123
|
+
exhaustiveness : int
|
|
124
|
+
The value for the exhaustiveness parameter.
|
|
125
|
+
Must be greater than 0.
|
|
126
|
+
"""
|
|
127
|
+
self._exhaustiveness = exhaustiveness
|
|
128
|
+
|
|
129
|
+
@requires_state(AppState.CREATED)
|
|
130
|
+
def set_max_number_of_models(self, number):
|
|
131
|
+
"""
|
|
132
|
+
Set the maximum number of binding modes to generate.
|
|
133
|
+
|
|
134
|
+
*Vina* may generate less modes, if the docking process does
|
|
135
|
+
not find enough distinct conformations.
|
|
136
|
+
By default, the maximum number is ``9``.
|
|
137
|
+
|
|
138
|
+
Parameters
|
|
139
|
+
----------
|
|
140
|
+
number : int
|
|
141
|
+
The maximum number of generated modes/models.
|
|
142
|
+
"""
|
|
143
|
+
self._number = number
|
|
144
|
+
|
|
145
|
+
@requires_state(AppState.CREATED)
|
|
146
|
+
def set_energy_range(self, energy_range):
|
|
147
|
+
"""
|
|
148
|
+
Set the maximum energy range of the generated models.
|
|
149
|
+
|
|
150
|
+
*Vina* will ignore binding modes if the difference between this
|
|
151
|
+
mode and the best mode is greater than this value.
|
|
152
|
+
By default, the range is ``3.0``.
|
|
153
|
+
|
|
154
|
+
Parameters
|
|
155
|
+
----------
|
|
156
|
+
energy_range : float
|
|
157
|
+
The energy range (kcal/mol).
|
|
158
|
+
"""
|
|
159
|
+
self._energy_range = energy_range
|
|
160
|
+
|
|
161
|
+
def run(self):
|
|
162
|
+
# Use different atom ID ranges for atoms in ligand and receptor
|
|
163
|
+
# for unambiguous assignment, if the receptor contains flexible
|
|
164
|
+
# residues
|
|
165
|
+
self._ligand.set_annotation(
|
|
166
|
+
"atom_id", np.arange(1, self._ligand.array_length() + 1)
|
|
167
|
+
)
|
|
168
|
+
self._receptor.set_annotation(
|
|
169
|
+
"atom_id",
|
|
170
|
+
np.arange(
|
|
171
|
+
self._ligand.array_length() + 1,
|
|
172
|
+
self._ligand.array_length() + self._receptor.array_length() + 1,
|
|
173
|
+
),
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
ligand_file = PDBQTFile()
|
|
177
|
+
# Contains 'true' entries for all atoms that have not been
|
|
178
|
+
# removed from ligand
|
|
179
|
+
self._ligand_mask = ligand_file.set_structure(
|
|
180
|
+
self._ligand, rotatable_bonds="all"
|
|
181
|
+
)
|
|
182
|
+
ligand_file.write(self._ligand_file)
|
|
183
|
+
self._ligand_file.flush()
|
|
184
|
+
|
|
185
|
+
if self._is_flexible:
|
|
186
|
+
self._rigid_mask = np.ones(self._receptor.array_length(), dtype=bool)
|
|
187
|
+
# Contains 'true' entries for all atoms that have not been
|
|
188
|
+
# removed from receptor in flexible side chains
|
|
189
|
+
self._receptor_mask = np.zeros(self._receptor.array_length(), dtype=bool)
|
|
190
|
+
for i, start in enumerate(self._flex_res_starts):
|
|
191
|
+
flex_mask, rigid_mask, root = self._get_flexible_residue(start)
|
|
192
|
+
self._rigid_mask &= rigid_mask
|
|
193
|
+
root_in_flex_residue = np.where(
|
|
194
|
+
np.arange(self._receptor.array_length())[flex_mask] == root
|
|
195
|
+
)[0][0]
|
|
196
|
+
flex_file = PDBQTFile()
|
|
197
|
+
self._receptor_mask[flex_mask] |= flex_file.set_structure(
|
|
198
|
+
self._receptor[flex_mask],
|
|
199
|
+
rotatable_bonds="all",
|
|
200
|
+
root=root_in_flex_residue,
|
|
201
|
+
include_torsdof=False,
|
|
202
|
+
)
|
|
203
|
+
# Enclose each flexible residue
|
|
204
|
+
# with BEGIN_RES and END_RES
|
|
205
|
+
self._receptor_flex_file.write(f"BEGIN_RES {i}\n")
|
|
206
|
+
flex_file.write(self._receptor_flex_file)
|
|
207
|
+
self._receptor_flex_file.write(f"END_RES {i}\n")
|
|
208
|
+
self._receptor_flex_file.flush()
|
|
209
|
+
|
|
210
|
+
receptor_file = PDBQTFile()
|
|
211
|
+
receptor_file.set_structure(
|
|
212
|
+
self._receptor[self._rigid_mask],
|
|
213
|
+
rotatable_bonds=None,
|
|
214
|
+
include_torsdof=False,
|
|
215
|
+
)
|
|
216
|
+
receptor_file.write(self._receptor_file)
|
|
217
|
+
self._receptor_file.flush()
|
|
218
|
+
|
|
219
|
+
else:
|
|
220
|
+
receptor_file = PDBQTFile()
|
|
221
|
+
receptor_file.set_structure(
|
|
222
|
+
self._receptor, rotatable_bonds=None, include_torsdof=False
|
|
223
|
+
)
|
|
224
|
+
receptor_file.write(self._receptor_file)
|
|
225
|
+
self._receptor_file.flush()
|
|
226
|
+
|
|
227
|
+
arguments = [
|
|
228
|
+
"--ligand",
|
|
229
|
+
self._ligand_file.name,
|
|
230
|
+
"--receptor",
|
|
231
|
+
self._receptor_file.name,
|
|
232
|
+
"--out",
|
|
233
|
+
self._out_file.name,
|
|
234
|
+
"--center_x",
|
|
235
|
+
f"{self._center[0]:.3f}",
|
|
236
|
+
"--center_y",
|
|
237
|
+
f"{self._center[1]:.3f}",
|
|
238
|
+
"--center_z",
|
|
239
|
+
f"{self._center[2]:.3f}",
|
|
240
|
+
"--size_x",
|
|
241
|
+
f"{self._size[0]:.3f}",
|
|
242
|
+
"--size_y",
|
|
243
|
+
f"{self._size[1]:.3f}",
|
|
244
|
+
"--size_z",
|
|
245
|
+
f"{self._size[2]:.3f}",
|
|
246
|
+
]
|
|
247
|
+
if self._seed is not None:
|
|
248
|
+
arguments.extend(["--seed", str(self._seed)])
|
|
249
|
+
if self._exhaustiveness is not None:
|
|
250
|
+
arguments.extend(["--exhaustiveness", str(self._exhaustiveness)])
|
|
251
|
+
if self._number is not None:
|
|
252
|
+
arguments.extend(["--num_modes", str(self._number)])
|
|
253
|
+
if self._energy_range is not None:
|
|
254
|
+
arguments.extend(["--energy_range", str(self._energy_range)])
|
|
255
|
+
if self._is_flexible:
|
|
256
|
+
arguments.extend(["--flex", str(self._receptor_flex_file.name)])
|
|
257
|
+
|
|
258
|
+
self.set_arguments(arguments)
|
|
259
|
+
super().run()
|
|
260
|
+
|
|
261
|
+
def evaluate(self):
|
|
262
|
+
super().evaluate()
|
|
263
|
+
out_file = PDBQTFile.read(self._out_file)
|
|
264
|
+
|
|
265
|
+
models = out_file.get_structure()
|
|
266
|
+
|
|
267
|
+
n_ligand_atoms = np.count_nonzero(self._ligand_mask)
|
|
268
|
+
self._ligand_models = models[..., :n_ligand_atoms]
|
|
269
|
+
self._flex_models = models[..., n_ligand_atoms:]
|
|
270
|
+
self._n_models = models.stack_depth()
|
|
271
|
+
|
|
272
|
+
remarks = out_file.get_remarks()
|
|
273
|
+
self._energies = np.array(
|
|
274
|
+
# VINA RESULT: -5.8 0.000 0.000
|
|
275
|
+
# ^
|
|
276
|
+
[float(remark[12:].split()[0]) for remark in remarks]
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
def clean_up(self):
|
|
280
|
+
super().clean_up()
|
|
281
|
+
cleanup_tempfile(self._ligand_file)
|
|
282
|
+
cleanup_tempfile(self._receptor_file)
|
|
283
|
+
cleanup_tempfile(self._receptor_flex_file)
|
|
284
|
+
cleanup_tempfile(self._out_file)
|
|
285
|
+
|
|
286
|
+
@requires_state(AppState.JOINED)
|
|
287
|
+
def get_energies(self):
|
|
288
|
+
"""
|
|
289
|
+
Get the predicted binding energy for each generated binding
|
|
290
|
+
mode.
|
|
291
|
+
|
|
292
|
+
Returns
|
|
293
|
+
-------
|
|
294
|
+
energies : ndarray, dtype=float
|
|
295
|
+
The predicted binding energies (kcal/mol).
|
|
296
|
+
The energies are sorted from best to worst.
|
|
297
|
+
"""
|
|
298
|
+
return self._energies
|
|
299
|
+
|
|
300
|
+
@requires_state(AppState.JOINED)
|
|
301
|
+
def get_ligand_models(self):
|
|
302
|
+
"""
|
|
303
|
+
Get the ligand structure with the conformations for each
|
|
304
|
+
generated binding mode.
|
|
305
|
+
|
|
306
|
+
Returns
|
|
307
|
+
-------
|
|
308
|
+
ligand : AtomArrayStack
|
|
309
|
+
The docked ligand.
|
|
310
|
+
Each model corresponds to one binding mode.
|
|
311
|
+
The models are sorted from best to worst predicted binding
|
|
312
|
+
affinity.
|
|
313
|
+
|
|
314
|
+
Notes
|
|
315
|
+
-----
|
|
316
|
+
The returned structure may contain less atoms than the input
|
|
317
|
+
structure, as *Vina* removes nonpolar hydrogen atoms.
|
|
318
|
+
Furthermore, the returned structure contains *AutoDock* atom
|
|
319
|
+
types as ``element`` annotation.
|
|
320
|
+
"""
|
|
321
|
+
return self._ligand_models
|
|
322
|
+
|
|
323
|
+
@requires_state(AppState.JOINED)
|
|
324
|
+
def get_ligand_coord(self):
|
|
325
|
+
"""
|
|
326
|
+
Get the ligand coordinates for each generated binding mode.
|
|
327
|
+
|
|
328
|
+
Returns
|
|
329
|
+
-------
|
|
330
|
+
coord : ndarray, shape=(m,n,3), dtype=float
|
|
331
|
+
The coordinates for *m* binding modes and *n* atoms
|
|
332
|
+
of the input ligand.
|
|
333
|
+
The models are sorted from best to worst predicted binding
|
|
334
|
+
affinity.
|
|
335
|
+
Missing coordinates due to the removed nonpolar hydrogen
|
|
336
|
+
atoms are set to *NaN*.
|
|
337
|
+
"""
|
|
338
|
+
coord = np.full(
|
|
339
|
+
(self._n_models, self._ligand.array_length(), 3), np.nan, dtype=np.float32
|
|
340
|
+
)
|
|
341
|
+
coord[:, self._ligand_mask] = self._ligand_models.coord
|
|
342
|
+
return coord
|
|
343
|
+
|
|
344
|
+
@requires_state(AppState.JOINED)
|
|
345
|
+
def get_flexible_residue_models(self):
|
|
346
|
+
"""
|
|
347
|
+
Get the structure for the flexible side chains with the
|
|
348
|
+
conformations for each generated binding mode.
|
|
349
|
+
|
|
350
|
+
If no flexible side chains were defined, the returned
|
|
351
|
+
:class:`AtomArrayStack` contains no atoms.
|
|
352
|
+
|
|
353
|
+
Returns
|
|
354
|
+
-------
|
|
355
|
+
side_chains : AtomArrayStack
|
|
356
|
+
The docked side chains.
|
|
357
|
+
Each model corresponds to one binding mode.
|
|
358
|
+
The models are sorted from best to worst predicted binding
|
|
359
|
+
affinity.
|
|
360
|
+
|
|
361
|
+
Notes
|
|
362
|
+
-----
|
|
363
|
+
The returned structure may contain less atoms than the input
|
|
364
|
+
structure, as *Vina* removes nonpolar hydrogen atoms.
|
|
365
|
+
Furthermore, the returned structure contains *AutoDock* atom
|
|
366
|
+
types as ``element`` annotation.
|
|
367
|
+
"""
|
|
368
|
+
return self._flex_models
|
|
369
|
+
|
|
370
|
+
@requires_state(AppState.JOINED)
|
|
371
|
+
def get_receptor_coord(self):
|
|
372
|
+
"""
|
|
373
|
+
Get the get_receptor_coord coordinates for each generated
|
|
374
|
+
binding mode.
|
|
375
|
+
|
|
376
|
+
Returns
|
|
377
|
+
-------
|
|
378
|
+
coord : ndarray, shape=(m,n,3), dtype=float
|
|
379
|
+
The coordinates for *m* binding modes and *n* atoms
|
|
380
|
+
of the input receptor.
|
|
381
|
+
The models are sorted from best to worst predicted binding
|
|
382
|
+
affinity.
|
|
383
|
+
Missing coordinates due to the removed nonpolar hydrogen
|
|
384
|
+
atoms from flexible side chains are set to *NaN*.
|
|
385
|
+
|
|
386
|
+
Notes
|
|
387
|
+
-----
|
|
388
|
+
The output is only meaningful, if flexible side chains were
|
|
389
|
+
defined.
|
|
390
|
+
Otherwise, the returned coordinates are simply *m* repetitions
|
|
391
|
+
of the input receptor coordinates.
|
|
392
|
+
"""
|
|
393
|
+
coord = np.repeat(
|
|
394
|
+
self._receptor.coord[np.newaxis, ...], repeats=self._n_models, axis=0
|
|
395
|
+
)
|
|
396
|
+
if self._is_flexible:
|
|
397
|
+
# Replace original coordinates with modeled coordinates
|
|
398
|
+
# for the the flexible side chains
|
|
399
|
+
# The coordinates from removed atoms are NaN
|
|
400
|
+
coord[:, ~self._rigid_mask] = np.nan
|
|
401
|
+
coord[:, self._receptor_mask] = self._flex_models.coord
|
|
402
|
+
return coord
|
|
403
|
+
|
|
404
|
+
def _get_flexible_residue(self, residue_start):
|
|
405
|
+
residue_indices = np.where(
|
|
406
|
+
get_residue_masks(self._receptor, [residue_start])[0]
|
|
407
|
+
)[0]
|
|
408
|
+
root_indices_in_residue = np.isin(
|
|
409
|
+
self._receptor.atom_name[residue_indices], ("CA",)
|
|
410
|
+
)
|
|
411
|
+
root_indices = residue_indices[root_indices_in_residue]
|
|
412
|
+
if len(root_indices) == 0:
|
|
413
|
+
raise BadStructureError("Found no CA atom in residue")
|
|
414
|
+
if len(root_indices) > 1:
|
|
415
|
+
raise BadStructureError("Multiple CA atom in residue")
|
|
416
|
+
root_index = root_indices[0]
|
|
417
|
+
|
|
418
|
+
# Find the index of the atom connected to root on the flexible
|
|
419
|
+
# side chain (CB)
|
|
420
|
+
root_connect_indices, _ = self._receptor.bonds.get_bonds(root_index)
|
|
421
|
+
connected_index = None
|
|
422
|
+
try:
|
|
423
|
+
connected_index = root_connect_indices[
|
|
424
|
+
np.isin(self._receptor.atom_name[root_connect_indices], ("CB",))
|
|
425
|
+
][0]
|
|
426
|
+
except IndexError:
|
|
427
|
+
# Residue has no appropriate connection (e.g. in glycine)
|
|
428
|
+
# -> There is no atom in the flexible side chain
|
|
429
|
+
flex_mask = np.zeros(self._receptor.array_length(), dtype=bool)
|
|
430
|
+
rigid_mask = np.ones(self._receptor.array_length(), dtype=bool)
|
|
431
|
+
return flex_mask, rigid_mask, root_index
|
|
432
|
+
|
|
433
|
+
# Remove the root bond from the bond list
|
|
434
|
+
# to find the atoms involved in the flexible part
|
|
435
|
+
bonds = self._receptor.bonds.copy()
|
|
436
|
+
bonds.remove_bond(root_index, connected_index)
|
|
437
|
+
flexible_indices = find_connected(bonds, connected_index)
|
|
438
|
+
if root_index in flexible_indices:
|
|
439
|
+
raise BadStructureError(
|
|
440
|
+
"There are multiple connections between the flexible and "
|
|
441
|
+
"rigid part, maybe a cyclic residue like proline was selected"
|
|
442
|
+
)
|
|
443
|
+
|
|
444
|
+
flex_mask = np.zeros(self._receptor.array_length(), dtype=bool)
|
|
445
|
+
flex_mask[flexible_indices] = True
|
|
446
|
+
rigid_mask = ~flex_mask
|
|
447
|
+
# Root index is part of rigid and flexible part
|
|
448
|
+
flex_mask[root_index] = True
|
|
449
|
+
|
|
450
|
+
return flex_mask, rigid_mask, root_index
|
|
451
|
+
|
|
452
|
+
@staticmethod
|
|
453
|
+
def dock(ligand, receptor, center, size, flexible=None, bin_path="vina"):
|
|
454
|
+
"""
|
|
455
|
+
Dock a ligand to a receptor molecule using *AutoDock Vina*.
|
|
456
|
+
|
|
457
|
+
This is a convenience function, that wraps the :class:`VinaApp`
|
|
458
|
+
execution.
|
|
459
|
+
|
|
460
|
+
Parameters
|
|
461
|
+
----------
|
|
462
|
+
ligand : AtomArray
|
|
463
|
+
The structure of the receptor molecule.
|
|
464
|
+
Must have an associated :class:`BondList`.
|
|
465
|
+
An associated ``charge`` annotation is recommended for proper
|
|
466
|
+
calculation of partial charges.
|
|
467
|
+
receptor : AtomArray, shape=(n,)
|
|
468
|
+
The structure of the receptor molecule.
|
|
469
|
+
Must have an associated :class:`BondList`.
|
|
470
|
+
An associated ``charge`` annotation is recommended for proper
|
|
471
|
+
calculation of partial charges.
|
|
472
|
+
center : ndarray, shape=(3,), dtype=float
|
|
473
|
+
The *xyz* coordinates for the center of the search space.
|
|
474
|
+
size : ndarray, shape=(3,), dtype=float
|
|
475
|
+
The size of the search space in *xyz* directions.
|
|
476
|
+
flexible : ndarray, shape=(n,), dtype=bool, optional
|
|
477
|
+
A boolean mask that indicates flexible amino acid side chains
|
|
478
|
+
in `receptor`.
|
|
479
|
+
Each residue, where at least one atom index is ``True`` in
|
|
480
|
+
`flexible`, is considered flexible.
|
|
481
|
+
By default, the receptor has no flexibility.
|
|
482
|
+
bin_path : str, optional
|
|
483
|
+
Path to the *Vina* binary.
|
|
484
|
+
|
|
485
|
+
Returns
|
|
486
|
+
-------
|
|
487
|
+
coord : ndarray, shape=(m,n,3), dtype=float
|
|
488
|
+
The docked ligand coordinates for *m* binding modes and
|
|
489
|
+
*n* atoms of the input ligand.
|
|
490
|
+
The models are sorted from best to worst predicted binding
|
|
491
|
+
affinity.
|
|
492
|
+
Missing coordinates due to the removed nonpolar hydrogen
|
|
493
|
+
atoms are set to *NaN*.
|
|
494
|
+
energies : ndarray, shape=(m,), dtype=float
|
|
495
|
+
The corresponding predicted binding energies (kcal/mol).
|
|
496
|
+
"""
|
|
497
|
+
app = VinaApp(ligand, receptor, center, size, flexible, bin_path)
|
|
498
|
+
app.start()
|
|
499
|
+
app.join()
|
|
500
|
+
return app.get_ligand_coord(), app.get_energies()
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
A subpackage for heuristic local alignments against a large database
|
|
7
|
+
using BLAST.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
__name__ = "biotite.application.blast"
|
|
11
|
+
__author__ = "Patrick Kunzmann"
|
|
12
|
+
|
|
13
|
+
from .alignment import *
|
|
14
|
+
from .webapp import *
|
|
@@ -0,0 +1,92 @@
|
|
|
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.application.blast"
|
|
6
|
+
__author__ = "Patrick Kunzmann"
|
|
7
|
+
__all__ = ["BlastAlignment"]
|
|
8
|
+
|
|
9
|
+
from biotite.sequence.align.alignment import Alignment
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class BlastAlignment(Alignment):
|
|
13
|
+
"""
|
|
14
|
+
A specialized :class:`Alignment` class for alignments using the
|
|
15
|
+
BLAST application. It stores additional data, like the E-value,
|
|
16
|
+
the HSP position and a description of the hit sequence.
|
|
17
|
+
|
|
18
|
+
Like its superclass, all attributes of a :class:`BlastAlignment` are
|
|
19
|
+
public. The attributes are the same as the constructor parameters.
|
|
20
|
+
|
|
21
|
+
Parameters
|
|
22
|
+
----------
|
|
23
|
+
sequences : list
|
|
24
|
+
A list of aligned sequences. Does actually not contain the
|
|
25
|
+
complete original sequences, but the HSP sequences.
|
|
26
|
+
trace : ndarray, dtype=int, shape=(n,m)
|
|
27
|
+
The alignment trace.
|
|
28
|
+
score : int
|
|
29
|
+
Alignment score.
|
|
30
|
+
e_value : float
|
|
31
|
+
Expectation value for the number of random sequences of a
|
|
32
|
+
similar sized database getting an equal or higher score by
|
|
33
|
+
change when aligned with the query sequence.
|
|
34
|
+
query_interval : tuple of int
|
|
35
|
+
Describes the position of the HSP part of the query sequence
|
|
36
|
+
in the original query sequence. The first element is the start
|
|
37
|
+
position, the second element is the inclusive stop position.
|
|
38
|
+
Indexing starts at 1.
|
|
39
|
+
hit_interval : tuple of int
|
|
40
|
+
Analogous to `query_interval`, this describes the position of
|
|
41
|
+
the HSP part of the hit sequence in the complete hit sequence.
|
|
42
|
+
hit_id : str
|
|
43
|
+
The NCBI *unique identifier* (UID) of the hit sequence.
|
|
44
|
+
hit_definition : str
|
|
45
|
+
The name of the hit sequence.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
def __init__(
|
|
49
|
+
self,
|
|
50
|
+
sequences,
|
|
51
|
+
trace,
|
|
52
|
+
score,
|
|
53
|
+
e_value,
|
|
54
|
+
query_interval,
|
|
55
|
+
hit_interval,
|
|
56
|
+
hit_id,
|
|
57
|
+
hit_definition,
|
|
58
|
+
):
|
|
59
|
+
super().__init__(sequences, trace, score)
|
|
60
|
+
self.e_value = e_value
|
|
61
|
+
self.query_interval = query_interval
|
|
62
|
+
self.hit_interval = hit_interval
|
|
63
|
+
self.hit_id = hit_id
|
|
64
|
+
self.hit_definition = hit_definition
|
|
65
|
+
|
|
66
|
+
def __eq__(self, item):
|
|
67
|
+
if not isinstance(item, BlastAlignment):
|
|
68
|
+
return False
|
|
69
|
+
if self.e_value != item.e_value:
|
|
70
|
+
return False
|
|
71
|
+
if self.query_interval != item.query_interval:
|
|
72
|
+
return False
|
|
73
|
+
if self.hit_interval != item.hit_interval:
|
|
74
|
+
return False
|
|
75
|
+
if self.hit_id != item.hit_id:
|
|
76
|
+
return False
|
|
77
|
+
if self.hit_definition != item.hit_definition:
|
|
78
|
+
return False
|
|
79
|
+
return super().__eq__(item)
|
|
80
|
+
|
|
81
|
+
def __getitem__(self, index):
|
|
82
|
+
super_alignment = super().__getitem__(index)
|
|
83
|
+
return BlastAlignment(
|
|
84
|
+
super_alignment.sequences,
|
|
85
|
+
super_alignment.trace,
|
|
86
|
+
super_alignment.score,
|
|
87
|
+
self.e_value,
|
|
88
|
+
self.query_interval,
|
|
89
|
+
self.hit_interval,
|
|
90
|
+
self.hit_id,
|
|
91
|
+
self.hit_definition,
|
|
92
|
+
)
|