biotite 1.5.0__cp314-cp314-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.

Files changed (354) hide show
  1. biotite/__init__.py +18 -0
  2. biotite/application/__init__.py +69 -0
  3. biotite/application/application.py +276 -0
  4. biotite/application/autodock/__init__.py +12 -0
  5. biotite/application/autodock/app.py +500 -0
  6. biotite/application/blast/__init__.py +14 -0
  7. biotite/application/blast/alignment.py +92 -0
  8. biotite/application/blast/webapp.py +428 -0
  9. biotite/application/clustalo/__init__.py +12 -0
  10. biotite/application/clustalo/app.py +223 -0
  11. biotite/application/dssp/__init__.py +12 -0
  12. biotite/application/dssp/app.py +216 -0
  13. biotite/application/localapp.py +342 -0
  14. biotite/application/mafft/__init__.py +12 -0
  15. biotite/application/mafft/app.py +116 -0
  16. biotite/application/msaapp.py +363 -0
  17. biotite/application/muscle/__init__.py +13 -0
  18. biotite/application/muscle/app3.py +227 -0
  19. biotite/application/muscle/app5.py +163 -0
  20. biotite/application/sra/__init__.py +18 -0
  21. biotite/application/sra/app.py +447 -0
  22. biotite/application/tantan/__init__.py +12 -0
  23. biotite/application/tantan/app.py +199 -0
  24. biotite/application/util.py +77 -0
  25. biotite/application/viennarna/__init__.py +18 -0
  26. biotite/application/viennarna/rnaalifold.py +310 -0
  27. biotite/application/viennarna/rnafold.py +254 -0
  28. biotite/application/viennarna/rnaplot.py +208 -0
  29. biotite/application/viennarna/util.py +77 -0
  30. biotite/application/webapp.py +76 -0
  31. biotite/copyable.py +71 -0
  32. biotite/database/__init__.py +23 -0
  33. biotite/database/afdb/__init__.py +12 -0
  34. biotite/database/afdb/download.py +197 -0
  35. biotite/database/entrez/__init__.py +15 -0
  36. biotite/database/entrez/check.py +60 -0
  37. biotite/database/entrez/dbnames.py +101 -0
  38. biotite/database/entrez/download.py +228 -0
  39. biotite/database/entrez/key.py +44 -0
  40. biotite/database/entrez/query.py +263 -0
  41. biotite/database/error.py +16 -0
  42. biotite/database/pubchem/__init__.py +21 -0
  43. biotite/database/pubchem/download.py +258 -0
  44. biotite/database/pubchem/error.py +30 -0
  45. biotite/database/pubchem/query.py +819 -0
  46. biotite/database/pubchem/throttle.py +98 -0
  47. biotite/database/rcsb/__init__.py +13 -0
  48. biotite/database/rcsb/download.py +161 -0
  49. biotite/database/rcsb/query.py +963 -0
  50. biotite/database/uniprot/__init__.py +13 -0
  51. biotite/database/uniprot/check.py +40 -0
  52. biotite/database/uniprot/download.py +126 -0
  53. biotite/database/uniprot/query.py +292 -0
  54. biotite/file.py +244 -0
  55. biotite/interface/__init__.py +19 -0
  56. biotite/interface/openmm/__init__.py +20 -0
  57. biotite/interface/openmm/state.py +93 -0
  58. biotite/interface/openmm/system.py +227 -0
  59. biotite/interface/pymol/__init__.py +201 -0
  60. biotite/interface/pymol/cgo.py +346 -0
  61. biotite/interface/pymol/convert.py +185 -0
  62. biotite/interface/pymol/display.py +267 -0
  63. biotite/interface/pymol/object.py +1228 -0
  64. biotite/interface/pymol/shapes.py +178 -0
  65. biotite/interface/pymol/startup.py +169 -0
  66. biotite/interface/rdkit/__init__.py +19 -0
  67. biotite/interface/rdkit/mol.py +490 -0
  68. biotite/interface/version.py +94 -0
  69. biotite/interface/warning.py +19 -0
  70. biotite/sequence/__init__.py +84 -0
  71. biotite/sequence/align/__init__.py +199 -0
  72. biotite/sequence/align/alignment.py +702 -0
  73. biotite/sequence/align/banded.cpython-314-x86_64-linux-gnu.so +0 -0
  74. biotite/sequence/align/banded.pyx +652 -0
  75. biotite/sequence/align/buckets.py +71 -0
  76. biotite/sequence/align/cigar.py +425 -0
  77. biotite/sequence/align/kmeralphabet.cpython-314-x86_64-linux-gnu.so +0 -0
  78. biotite/sequence/align/kmeralphabet.pyx +595 -0
  79. biotite/sequence/align/kmersimilarity.cpython-314-x86_64-linux-gnu.so +0 -0
  80. biotite/sequence/align/kmersimilarity.pyx +233 -0
  81. biotite/sequence/align/kmertable.cpython-314-x86_64-linux-gnu.so +0 -0
  82. biotite/sequence/align/kmertable.pyx +3411 -0
  83. biotite/sequence/align/localgapped.cpython-314-x86_64-linux-gnu.so +0 -0
  84. biotite/sequence/align/localgapped.pyx +892 -0
  85. biotite/sequence/align/localungapped.cpython-314-x86_64-linux-gnu.so +0 -0
  86. biotite/sequence/align/localungapped.pyx +279 -0
  87. biotite/sequence/align/matrix.py +631 -0
  88. biotite/sequence/align/matrix_data/3Di.mat +24 -0
  89. biotite/sequence/align/matrix_data/BLOSUM100.mat +31 -0
  90. biotite/sequence/align/matrix_data/BLOSUM30.mat +31 -0
  91. biotite/sequence/align/matrix_data/BLOSUM35.mat +31 -0
  92. biotite/sequence/align/matrix_data/BLOSUM40.mat +31 -0
  93. biotite/sequence/align/matrix_data/BLOSUM45.mat +31 -0
  94. biotite/sequence/align/matrix_data/BLOSUM50.mat +31 -0
  95. biotite/sequence/align/matrix_data/BLOSUM50_13p.mat +25 -0
  96. biotite/sequence/align/matrix_data/BLOSUM50_14.3.mat +25 -0
  97. biotite/sequence/align/matrix_data/BLOSUM50_5.0.mat +25 -0
  98. biotite/sequence/align/matrix_data/BLOSUM55.mat +31 -0
  99. biotite/sequence/align/matrix_data/BLOSUM60.mat +31 -0
  100. biotite/sequence/align/matrix_data/BLOSUM62.mat +31 -0
  101. biotite/sequence/align/matrix_data/BLOSUM62_13p.mat +25 -0
  102. biotite/sequence/align/matrix_data/BLOSUM62_14.3.mat +25 -0
  103. biotite/sequence/align/matrix_data/BLOSUM62_5.0.mat +25 -0
  104. biotite/sequence/align/matrix_data/BLOSUM65.mat +31 -0
  105. biotite/sequence/align/matrix_data/BLOSUM70.mat +31 -0
  106. biotite/sequence/align/matrix_data/BLOSUM75.mat +31 -0
  107. biotite/sequence/align/matrix_data/BLOSUM80.mat +31 -0
  108. biotite/sequence/align/matrix_data/BLOSUM85.mat +31 -0
  109. biotite/sequence/align/matrix_data/BLOSUM90.mat +31 -0
  110. biotite/sequence/align/matrix_data/BLOSUMN.mat +31 -0
  111. biotite/sequence/align/matrix_data/CorBLOSUM49_5.0.mat +25 -0
  112. biotite/sequence/align/matrix_data/CorBLOSUM57_13p.mat +25 -0
  113. biotite/sequence/align/matrix_data/CorBLOSUM57_14.3.mat +25 -0
  114. biotite/sequence/align/matrix_data/CorBLOSUM61_5.0.mat +25 -0
  115. biotite/sequence/align/matrix_data/CorBLOSUM66_13p.mat +25 -0
  116. biotite/sequence/align/matrix_data/CorBLOSUM67_14.3.mat +25 -0
  117. biotite/sequence/align/matrix_data/DAYHOFF.mat +32 -0
  118. biotite/sequence/align/matrix_data/GONNET.mat +26 -0
  119. biotite/sequence/align/matrix_data/IDENTITY.mat +25 -0
  120. biotite/sequence/align/matrix_data/MATCH.mat +25 -0
  121. biotite/sequence/align/matrix_data/NUC.mat +25 -0
  122. biotite/sequence/align/matrix_data/PAM10.mat +34 -0
  123. biotite/sequence/align/matrix_data/PAM100.mat +34 -0
  124. biotite/sequence/align/matrix_data/PAM110.mat +34 -0
  125. biotite/sequence/align/matrix_data/PAM120.mat +34 -0
  126. biotite/sequence/align/matrix_data/PAM130.mat +34 -0
  127. biotite/sequence/align/matrix_data/PAM140.mat +34 -0
  128. biotite/sequence/align/matrix_data/PAM150.mat +34 -0
  129. biotite/sequence/align/matrix_data/PAM160.mat +34 -0
  130. biotite/sequence/align/matrix_data/PAM170.mat +34 -0
  131. biotite/sequence/align/matrix_data/PAM180.mat +34 -0
  132. biotite/sequence/align/matrix_data/PAM190.mat +34 -0
  133. biotite/sequence/align/matrix_data/PAM20.mat +34 -0
  134. biotite/sequence/align/matrix_data/PAM200.mat +34 -0
  135. biotite/sequence/align/matrix_data/PAM210.mat +34 -0
  136. biotite/sequence/align/matrix_data/PAM220.mat +34 -0
  137. biotite/sequence/align/matrix_data/PAM230.mat +34 -0
  138. biotite/sequence/align/matrix_data/PAM240.mat +34 -0
  139. biotite/sequence/align/matrix_data/PAM250.mat +34 -0
  140. biotite/sequence/align/matrix_data/PAM260.mat +34 -0
  141. biotite/sequence/align/matrix_data/PAM270.mat +34 -0
  142. biotite/sequence/align/matrix_data/PAM280.mat +34 -0
  143. biotite/sequence/align/matrix_data/PAM290.mat +34 -0
  144. biotite/sequence/align/matrix_data/PAM30.mat +34 -0
  145. biotite/sequence/align/matrix_data/PAM300.mat +34 -0
  146. biotite/sequence/align/matrix_data/PAM310.mat +34 -0
  147. biotite/sequence/align/matrix_data/PAM320.mat +34 -0
  148. biotite/sequence/align/matrix_data/PAM330.mat +34 -0
  149. biotite/sequence/align/matrix_data/PAM340.mat +34 -0
  150. biotite/sequence/align/matrix_data/PAM350.mat +34 -0
  151. biotite/sequence/align/matrix_data/PAM360.mat +34 -0
  152. biotite/sequence/align/matrix_data/PAM370.mat +34 -0
  153. biotite/sequence/align/matrix_data/PAM380.mat +34 -0
  154. biotite/sequence/align/matrix_data/PAM390.mat +34 -0
  155. biotite/sequence/align/matrix_data/PAM40.mat +34 -0
  156. biotite/sequence/align/matrix_data/PAM400.mat +34 -0
  157. biotite/sequence/align/matrix_data/PAM410.mat +34 -0
  158. biotite/sequence/align/matrix_data/PAM420.mat +34 -0
  159. biotite/sequence/align/matrix_data/PAM430.mat +34 -0
  160. biotite/sequence/align/matrix_data/PAM440.mat +34 -0
  161. biotite/sequence/align/matrix_data/PAM450.mat +34 -0
  162. biotite/sequence/align/matrix_data/PAM460.mat +34 -0
  163. biotite/sequence/align/matrix_data/PAM470.mat +34 -0
  164. biotite/sequence/align/matrix_data/PAM480.mat +34 -0
  165. biotite/sequence/align/matrix_data/PAM490.mat +34 -0
  166. biotite/sequence/align/matrix_data/PAM50.mat +34 -0
  167. biotite/sequence/align/matrix_data/PAM500.mat +34 -0
  168. biotite/sequence/align/matrix_data/PAM60.mat +34 -0
  169. biotite/sequence/align/matrix_data/PAM70.mat +34 -0
  170. biotite/sequence/align/matrix_data/PAM80.mat +34 -0
  171. biotite/sequence/align/matrix_data/PAM90.mat +34 -0
  172. biotite/sequence/align/matrix_data/PB.license +21 -0
  173. biotite/sequence/align/matrix_data/PB.mat +18 -0
  174. biotite/sequence/align/matrix_data/RBLOSUM52_5.0.mat +25 -0
  175. biotite/sequence/align/matrix_data/RBLOSUM59_13p.mat +25 -0
  176. biotite/sequence/align/matrix_data/RBLOSUM59_14.3.mat +25 -0
  177. biotite/sequence/align/matrix_data/RBLOSUM64_5.0.mat +25 -0
  178. biotite/sequence/align/matrix_data/RBLOSUM69_13p.mat +25 -0
  179. biotite/sequence/align/matrix_data/RBLOSUM69_14.3.mat +25 -0
  180. biotite/sequence/align/multiple.cpython-314-x86_64-linux-gnu.so +0 -0
  181. biotite/sequence/align/multiple.pyx +619 -0
  182. biotite/sequence/align/pairwise.cpython-314-x86_64-linux-gnu.so +0 -0
  183. biotite/sequence/align/pairwise.pyx +585 -0
  184. biotite/sequence/align/permutation.cpython-314-x86_64-linux-gnu.so +0 -0
  185. biotite/sequence/align/permutation.pyx +313 -0
  186. biotite/sequence/align/primes.txt +821 -0
  187. biotite/sequence/align/selector.cpython-314-x86_64-linux-gnu.so +0 -0
  188. biotite/sequence/align/selector.pyx +954 -0
  189. biotite/sequence/align/statistics.py +264 -0
  190. biotite/sequence/align/tracetable.cpython-314-x86_64-linux-gnu.so +0 -0
  191. biotite/sequence/align/tracetable.pxd +64 -0
  192. biotite/sequence/align/tracetable.pyx +370 -0
  193. biotite/sequence/alphabet.py +555 -0
  194. biotite/sequence/annotation.py +836 -0
  195. biotite/sequence/codec.cpython-314-x86_64-linux-gnu.so +0 -0
  196. biotite/sequence/codec.pyx +155 -0
  197. biotite/sequence/codon.py +476 -0
  198. biotite/sequence/codon_tables.txt +202 -0
  199. biotite/sequence/graphics/__init__.py +33 -0
  200. biotite/sequence/graphics/alignment.py +1101 -0
  201. biotite/sequence/graphics/color_schemes/3di_flower.json +48 -0
  202. biotite/sequence/graphics/color_schemes/autumn.json +51 -0
  203. biotite/sequence/graphics/color_schemes/blossom.json +51 -0
  204. biotite/sequence/graphics/color_schemes/clustalx_dna.json +11 -0
  205. biotite/sequence/graphics/color_schemes/clustalx_protein.json +28 -0
  206. biotite/sequence/graphics/color_schemes/flower.json +51 -0
  207. biotite/sequence/graphics/color_schemes/jalview_buried.json +31 -0
  208. biotite/sequence/graphics/color_schemes/jalview_hydrophobicity.json +31 -0
  209. biotite/sequence/graphics/color_schemes/jalview_prop_helix.json +31 -0
  210. biotite/sequence/graphics/color_schemes/jalview_prop_strand.json +31 -0
  211. biotite/sequence/graphics/color_schemes/jalview_prop_turn.json +31 -0
  212. biotite/sequence/graphics/color_schemes/jalview_taylor.json +28 -0
  213. biotite/sequence/graphics/color_schemes/jalview_zappo.json +28 -0
  214. biotite/sequence/graphics/color_schemes/ocean.json +51 -0
  215. biotite/sequence/graphics/color_schemes/pb_flower.json +40 -0
  216. biotite/sequence/graphics/color_schemes/rainbow_dna.json +11 -0
  217. biotite/sequence/graphics/color_schemes/rainbow_protein.json +30 -0
  218. biotite/sequence/graphics/color_schemes/spring.json +51 -0
  219. biotite/sequence/graphics/color_schemes/sunset.json +51 -0
  220. biotite/sequence/graphics/color_schemes/wither.json +51 -0
  221. biotite/sequence/graphics/colorschemes.py +170 -0
  222. biotite/sequence/graphics/dendrogram.py +231 -0
  223. biotite/sequence/graphics/features.py +544 -0
  224. biotite/sequence/graphics/logo.py +102 -0
  225. biotite/sequence/graphics/plasmid.py +712 -0
  226. biotite/sequence/io/__init__.py +12 -0
  227. biotite/sequence/io/fasta/__init__.py +22 -0
  228. biotite/sequence/io/fasta/convert.py +283 -0
  229. biotite/sequence/io/fasta/file.py +265 -0
  230. biotite/sequence/io/fastq/__init__.py +19 -0
  231. biotite/sequence/io/fastq/convert.py +117 -0
  232. biotite/sequence/io/fastq/file.py +507 -0
  233. biotite/sequence/io/genbank/__init__.py +17 -0
  234. biotite/sequence/io/genbank/annotation.py +269 -0
  235. biotite/sequence/io/genbank/file.py +573 -0
  236. biotite/sequence/io/genbank/metadata.py +336 -0
  237. biotite/sequence/io/genbank/sequence.py +173 -0
  238. biotite/sequence/io/general.py +201 -0
  239. biotite/sequence/io/gff/__init__.py +26 -0
  240. biotite/sequence/io/gff/convert.py +128 -0
  241. biotite/sequence/io/gff/file.py +449 -0
  242. biotite/sequence/phylo/__init__.py +36 -0
  243. biotite/sequence/phylo/nj.cpython-314-x86_64-linux-gnu.so +0 -0
  244. biotite/sequence/phylo/nj.pyx +221 -0
  245. biotite/sequence/phylo/tree.cpython-314-x86_64-linux-gnu.so +0 -0
  246. biotite/sequence/phylo/tree.pyx +1169 -0
  247. biotite/sequence/phylo/upgma.cpython-314-x86_64-linux-gnu.so +0 -0
  248. biotite/sequence/phylo/upgma.pyx +164 -0
  249. biotite/sequence/profile.py +561 -0
  250. biotite/sequence/search.py +117 -0
  251. biotite/sequence/seqtypes.py +720 -0
  252. biotite/sequence/sequence.py +373 -0
  253. biotite/setup_ccd.py +197 -0
  254. biotite/structure/__init__.py +135 -0
  255. biotite/structure/alphabet/__init__.py +25 -0
  256. biotite/structure/alphabet/encoder.py +332 -0
  257. biotite/structure/alphabet/encoder_weights_3di.kerasify +0 -0
  258. biotite/structure/alphabet/i3d.py +109 -0
  259. biotite/structure/alphabet/layers.py +86 -0
  260. biotite/structure/alphabet/pb.license +21 -0
  261. biotite/structure/alphabet/pb.py +170 -0
  262. biotite/structure/alphabet/unkerasify.py +128 -0
  263. biotite/structure/atoms.py +1562 -0
  264. biotite/structure/basepairs.py +1403 -0
  265. biotite/structure/bonds.cpython-314-x86_64-linux-gnu.so +0 -0
  266. biotite/structure/bonds.pyx +2036 -0
  267. biotite/structure/box.py +724 -0
  268. biotite/structure/celllist.cpython-314-x86_64-linux-gnu.so +0 -0
  269. biotite/structure/celllist.pyx +864 -0
  270. biotite/structure/chains.py +310 -0
  271. biotite/structure/charges.cpython-314-x86_64-linux-gnu.so +0 -0
  272. biotite/structure/charges.pyx +520 -0
  273. biotite/structure/compare.py +683 -0
  274. biotite/structure/density.py +109 -0
  275. biotite/structure/dotbracket.py +213 -0
  276. biotite/structure/error.py +39 -0
  277. biotite/structure/filter.py +591 -0
  278. biotite/structure/geometry.py +817 -0
  279. biotite/structure/graphics/__init__.py +13 -0
  280. biotite/structure/graphics/atoms.py +243 -0
  281. biotite/structure/graphics/rna.py +298 -0
  282. biotite/structure/hbond.py +425 -0
  283. biotite/structure/info/__init__.py +24 -0
  284. biotite/structure/info/atom_masses.json +121 -0
  285. biotite/structure/info/atoms.py +98 -0
  286. biotite/structure/info/bonds.py +149 -0
  287. biotite/structure/info/ccd.py +200 -0
  288. biotite/structure/info/components.bcif +0 -0
  289. biotite/structure/info/groups.py +128 -0
  290. biotite/structure/info/masses.py +121 -0
  291. biotite/structure/info/misc.py +137 -0
  292. biotite/structure/info/radii.py +267 -0
  293. biotite/structure/info/standardize.py +185 -0
  294. biotite/structure/integrity.py +213 -0
  295. biotite/structure/io/__init__.py +29 -0
  296. biotite/structure/io/dcd/__init__.py +13 -0
  297. biotite/structure/io/dcd/file.py +67 -0
  298. biotite/structure/io/general.py +243 -0
  299. biotite/structure/io/gro/__init__.py +14 -0
  300. biotite/structure/io/gro/file.py +343 -0
  301. biotite/structure/io/mol/__init__.py +20 -0
  302. biotite/structure/io/mol/convert.py +112 -0
  303. biotite/structure/io/mol/ctab.py +420 -0
  304. biotite/structure/io/mol/header.py +120 -0
  305. biotite/structure/io/mol/mol.py +149 -0
  306. biotite/structure/io/mol/sdf.py +940 -0
  307. biotite/structure/io/netcdf/__init__.py +13 -0
  308. biotite/structure/io/netcdf/file.py +64 -0
  309. biotite/structure/io/pdb/__init__.py +20 -0
  310. biotite/structure/io/pdb/convert.py +389 -0
  311. biotite/structure/io/pdb/file.py +1380 -0
  312. biotite/structure/io/pdb/hybrid36.cpython-314-x86_64-linux-gnu.so +0 -0
  313. biotite/structure/io/pdb/hybrid36.pyx +242 -0
  314. biotite/structure/io/pdbqt/__init__.py +15 -0
  315. biotite/structure/io/pdbqt/convert.py +113 -0
  316. biotite/structure/io/pdbqt/file.py +688 -0
  317. biotite/structure/io/pdbx/__init__.py +23 -0
  318. biotite/structure/io/pdbx/bcif.py +674 -0
  319. biotite/structure/io/pdbx/cif.py +1091 -0
  320. biotite/structure/io/pdbx/component.py +251 -0
  321. biotite/structure/io/pdbx/compress.py +362 -0
  322. biotite/structure/io/pdbx/convert.py +2113 -0
  323. biotite/structure/io/pdbx/encoding.cpython-314-x86_64-linux-gnu.so +0 -0
  324. biotite/structure/io/pdbx/encoding.pyx +1078 -0
  325. biotite/structure/io/trajfile.py +696 -0
  326. biotite/structure/io/trr/__init__.py +13 -0
  327. biotite/structure/io/trr/file.py +43 -0
  328. biotite/structure/io/util.py +38 -0
  329. biotite/structure/io/xtc/__init__.py +13 -0
  330. biotite/structure/io/xtc/file.py +43 -0
  331. biotite/structure/mechanics.py +72 -0
  332. biotite/structure/molecules.py +337 -0
  333. biotite/structure/pseudoknots.py +622 -0
  334. biotite/structure/rdf.py +245 -0
  335. biotite/structure/repair.py +302 -0
  336. biotite/structure/residues.py +716 -0
  337. biotite/structure/rings.py +451 -0
  338. biotite/structure/sasa.cpython-314-x86_64-linux-gnu.so +0 -0
  339. biotite/structure/sasa.pyx +322 -0
  340. biotite/structure/segments.py +328 -0
  341. biotite/structure/sequence.py +110 -0
  342. biotite/structure/spacegroups.json +1567 -0
  343. biotite/structure/spacegroups.license +26 -0
  344. biotite/structure/sse.py +306 -0
  345. biotite/structure/superimpose.py +511 -0
  346. biotite/structure/tm.py +581 -0
  347. biotite/structure/transform.py +736 -0
  348. biotite/structure/util.py +160 -0
  349. biotite/version.py +34 -0
  350. biotite/visualize.py +375 -0
  351. biotite-1.5.0.dist-info/METADATA +162 -0
  352. biotite-1.5.0.dist-info/RECORD +354 -0
  353. biotite-1.5.0.dist-info/WHEEL +6 -0
  354. biotite-1.5.0.dist-info/licenses/LICENSE.rst +30 -0
@@ -0,0 +1,43 @@
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.trr"
6
+ __author__ = "Patrick Kunzmann"
7
+ __all__ = ["TRRFile"]
8
+
9
+ import biotraj
10
+ import numpy as np
11
+ from biotite.structure.io.trajfile import TrajectoryFile
12
+
13
+
14
+ class TRRFile(TrajectoryFile):
15
+ """
16
+ This file class represents a TRR trajectory file.
17
+ """
18
+
19
+ @classmethod
20
+ def traj_type(cls):
21
+ return biotraj.TRRTrajectoryFile
22
+
23
+ @classmethod
24
+ def process_read_values(cls, read_values):
25
+ # nm to Angstrom
26
+ coord = read_values[0] * 10
27
+ box = read_values[3]
28
+ if box is not None:
29
+ box *= 10
30
+ time = read_values[1]
31
+ return coord, box, time
32
+
33
+ @classmethod
34
+ def prepare_write_values(cls, coord, box, time):
35
+ # Angstrom to nm
36
+ xyz = np.divide(coord, 10, dtype=np.float32) if coord is not None else None
37
+ time = time.astype(np.float32, copy=False) if time is not None else None
38
+ box = np.divide(box, 10, dtype=np.float32) if box is not None else None
39
+ return {
40
+ "xyz": xyz,
41
+ "box": box,
42
+ "time": time,
43
+ }
@@ -0,0 +1,38 @@
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
+ Common functions used by a number of subpackages.
7
+ """
8
+
9
+ __name__ = "biotite.structure.io"
10
+ __author__ = "Patrick Kunzmann"
11
+ __all__ = ["number_of_integer_digits"]
12
+
13
+ import numpy as np
14
+
15
+
16
+ def number_of_integer_digits(values):
17
+ """
18
+ Get the maximum number of characters needed to represent the
19
+ pre-decimal positions of the given numeric values.
20
+
21
+ Parameters
22
+ ----------
23
+ values : ndarray, dtype=float
24
+ The values to be checked.
25
+
26
+ Returns
27
+ -------
28
+ n_digits : int
29
+ The maximum number of characters needed to represent the
30
+ pre-decimal positions of the given numeric values.
31
+ """
32
+ if len(values) == 0:
33
+ return 0
34
+ values = values.astype(int, copy=False)
35
+ n_digits = 0
36
+ n_digits = max(n_digits, len(str(np.min(values))))
37
+ n_digits = max(n_digits, len(str(np.max(values))))
38
+ return n_digits
@@ -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
+ compressed *Gromacs* XTC format.
8
+ """
9
+
10
+ __name__ = "biotite.structure.io.xtc"
11
+ __author__ = "Patrick Kunzmann"
12
+
13
+ from .file import *
@@ -0,0 +1,43 @@
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.xtc"
6
+ __author__ = "Patrick Kunzmann"
7
+ __all__ = ["XTCFile"]
8
+
9
+ import biotraj
10
+ import numpy as np
11
+ from biotite.structure.io.trajfile import TrajectoryFile
12
+
13
+
14
+ class XTCFile(TrajectoryFile):
15
+ """
16
+ This file class represents a XTC trajectory file.
17
+ """
18
+
19
+ @classmethod
20
+ def traj_type(cls):
21
+ return biotraj.XTCTrajectoryFile
22
+
23
+ @classmethod
24
+ def process_read_values(cls, read_values):
25
+ # nm to Angstrom
26
+ coord = read_values[0] * 10
27
+ box = read_values[3]
28
+ if box is not None:
29
+ box *= 10
30
+ time = read_values[1]
31
+ return coord, box, time
32
+
33
+ @classmethod
34
+ def prepare_write_values(cls, coord, box, time):
35
+ # Angstrom to nm
36
+ xyz = np.divide(coord, 10, dtype=np.float32) if coord is not None else None
37
+ time = time.astype(np.float32, copy=False) if time is not None else None
38
+ box = np.divide(box, 10, dtype=np.float32) if box is not None else None
39
+ return {
40
+ "xyz": xyz,
41
+ "box": box,
42
+ "time": time,
43
+ }
@@ -0,0 +1,72 @@
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 module provides functions for calculation of mechanical or
7
+ mass-related properties of a molecular structure.
8
+ """
9
+
10
+ __name__ = "biotite.structure"
11
+ __author__ = "Patrick Kunzmann"
12
+ __all__ = ["mass_center", "gyration_radius"]
13
+
14
+ import numpy as np
15
+ from biotite.structure.geometry import distance
16
+ from biotite.structure.info.masses import mass
17
+
18
+
19
+ def gyration_radius(array, masses=None):
20
+ """
21
+ Compute the radius/radii of gyration of an atom array or stack.
22
+
23
+ Parameters
24
+ ----------
25
+ array : AtomArray or AtomArrayStack
26
+ The array or stack to calculate the radius/radii of gyration
27
+ for.
28
+ masses : ndarray, optional
29
+ The masses to use for each atom in the input `array`.
30
+ Must have the same length as `array`. By default, the standard
31
+ atomic mass for each element is taken.
32
+
33
+ Returns
34
+ -------
35
+ masses : float or ndarray, dtype=float
36
+ If `array` is an :class:`AtomArray`, the radius of gyration is
37
+ returned as single float.
38
+ If `array` is an :class:`AtomArrayStack`, a :class:`ndarray`
39
+ containing the radii of gyration for every model is returned.
40
+ """
41
+ if masses is None:
42
+ masses = np.array([mass(element) for element in array.element])
43
+ center = mass_center(array, masses)
44
+ radii = distance(array, center[..., np.newaxis, :])
45
+ inertia_moment = np.sum(masses * radii * radii, axis=-1)
46
+ return np.sqrt(inertia_moment / np.sum(masses))
47
+
48
+
49
+ def mass_center(array, masses=None):
50
+ """
51
+ Calculate the center(s) of mass of an atom array or stack.
52
+
53
+ Parameters
54
+ ----------
55
+ array : AtomArray or AtomArrayStack
56
+ The array or stack to calculate the center(s) of mass for.
57
+ masses : ndarray, optional
58
+ The masses to use for each atom in the input `array`.
59
+ Must have the same length as `array`. By default, the standard
60
+ atomic mass for each element is taken.
61
+
62
+ Returns
63
+ -------
64
+ radius : ndarray, ndarray, dtype=float
65
+ Array containing the the coordinates of the center of mass.
66
+ If `array` is an :class:`AtomArray`, this will be an length 3
67
+ :class:`ndarray`; if it is an :class:`AtomArrayStack` with *n* models,
68
+ a (*n x 3*) :class:`ndarray` is returned.
69
+ """
70
+ if masses is None:
71
+ masses = np.array([mass(element) for element in array.element])
72
+ return np.sum(masses[:, np.newaxis] * array.coord, axis=-2) / np.sum(masses)
@@ -0,0 +1,337 @@
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 module provides utility for separating structures into single
7
+ molecules.
8
+ """
9
+
10
+ __name__ = "biotite.structure"
11
+ __author__ = "Patrick Kunzmann"
12
+ __all__ = ["get_molecule_indices", "get_molecule_masks", "molecule_iter"]
13
+
14
+ import numpy as np
15
+ from biotite.structure.atoms import AtomArray, AtomArrayStack
16
+ from biotite.structure.bonds import BondList, find_connected
17
+
18
+
19
+ def get_molecule_indices(array):
20
+ """
21
+ Get an index array for each molecule in the given structure.
22
+
23
+ A molecule is defined as a group of atoms that are directly or
24
+ indirectly connected via covalent bonds.
25
+ In this function a single atom, that has no connection to any other
26
+ atom (e.g. an ion), also qualifies as a molecule.
27
+
28
+ Parameters
29
+ ----------
30
+ array : AtomArray or AtomArrayStack or BondList
31
+ The input structure with an associated :class:`BondList`.
32
+ Alternatively, the :class:`BondList` can be directly supplied.
33
+
34
+ Returns
35
+ -------
36
+ indices : list of ndarray, dtype=int
37
+ Each element in the list is an index array referring to the
38
+ atoms of a single molecule.
39
+ Consequently, the length of this list is equal to the number of
40
+ molecules in the input `array`.
41
+
42
+ Examples
43
+ --------
44
+ Get an :class:`AtomArray` for ATP and show that it is a single
45
+ molecule:
46
+
47
+ >>> atp = residue("ATP")
48
+ >>> indices = get_molecule_indices(atp)
49
+ >>> print(len(indices))
50
+ 1
51
+
52
+ Separate ATP into two molecules by breaking the glycosidic bond
53
+ to the triphosphate:
54
+
55
+ >>> i, j = np.where(np.isin(atp.atom_name, ("O5'", "PA")))[0]
56
+ >>> atp.bonds.remove_bond(i, j)
57
+ >>> indices = get_molecule_indices(atp)
58
+ >>> print(len(indices))
59
+ 2
60
+ >>> print(atp[indices[0]])
61
+ HET 0 ATP PG P 1.200 -0.226 -6.850
62
+ HET 0 ATP O1G O 1.740 1.140 -6.672
63
+ HET 0 ATP O2G O 2.123 -1.036 -7.891
64
+ HET 0 ATP O3G O -0.302 -0.139 -7.421
65
+ HET 0 ATP PB P 0.255 -0.130 -4.446
66
+ HET 0 ATP O1B O 0.810 1.234 -4.304
67
+ HET 0 ATP O2B O -1.231 -0.044 -5.057
68
+ HET 0 ATP O3B O 1.192 -0.990 -5.433
69
+ HET 0 ATP PA P -0.745 0.068 -2.071
70
+ HET 0 ATP O1A O -2.097 0.143 -2.669
71
+ HET 0 ATP O2A O -0.125 1.549 -1.957
72
+ HET 0 ATP O3A O 0.203 -0.840 -3.002
73
+ HET 0 ATP HOG2 H 2.100 -0.546 -8.725
74
+ HET 0 ATP HOG3 H -0.616 -1.048 -7.522
75
+ HET 0 ATP HOB2 H -1.554 -0.952 -5.132
76
+ HET 0 ATP HOA2 H 0.752 1.455 -1.563
77
+ >>> print(atp[indices[1]])
78
+ HET 0 ATP O5' O -0.844 -0.587 -0.604
79
+ HET 0 ATP C5' C -1.694 0.260 0.170
80
+ HET 0 ATP C4' C -1.831 -0.309 1.584
81
+ HET 0 ATP O4' O -0.542 -0.355 2.234
82
+ HET 0 ATP C3' C -2.683 0.630 2.465
83
+ HET 0 ATP O3' O -4.033 0.165 2.534
84
+ HET 0 ATP C2' C -2.011 0.555 3.856
85
+ HET 0 ATP O2' O -2.926 0.043 4.827
86
+ HET 0 ATP C1' C -0.830 -0.418 3.647
87
+ HET 0 ATP N9 N 0.332 0.015 4.425
88
+ HET 0 ATP C8 C 1.302 0.879 4.012
89
+ HET 0 ATP N7 N 2.184 1.042 4.955
90
+ HET 0 ATP C5 C 1.833 0.300 6.033
91
+ HET 0 ATP C6 C 2.391 0.077 7.303
92
+ HET 0 ATP N6 N 3.564 0.706 7.681
93
+ HET 0 ATP N1 N 1.763 -0.747 8.135
94
+ HET 0 ATP C2 C 0.644 -1.352 7.783
95
+ HET 0 ATP N3 N 0.088 -1.178 6.602
96
+ HET 0 ATP C4 C 0.644 -0.371 5.704
97
+ HET 0 ATP H5'1 H -2.678 0.312 -0.296
98
+ HET 0 ATP H5'2 H -1.263 1.259 0.221
99
+ HET 0 ATP H4' H -2.275 -1.304 1.550
100
+ HET 0 ATP H3' H -2.651 1.649 2.078
101
+ HET 0 ATP HO3' H -4.515 0.788 3.094
102
+ HET 0 ATP H2' H -1.646 1.537 4.157
103
+ HET 0 ATP HO2' H -3.667 0.662 4.867
104
+ HET 0 ATP H1' H -1.119 -1.430 3.931
105
+ HET 0 ATP H8 H 1.334 1.357 3.044
106
+ HET 0 ATP HN61 H 3.938 0.548 8.562
107
+ HET 0 ATP HN62 H 4.015 1.303 7.064
108
+ HET 0 ATP H2 H 0.166 -2.014 8.490
109
+ """
110
+ if isinstance(array, BondList):
111
+ bonds = array
112
+ elif isinstance(array, (AtomArray, AtomArrayStack)):
113
+ if array.bonds is None:
114
+ raise ValueError("An associated BondList is required")
115
+ bonds = array.bonds
116
+ else:
117
+ raise TypeError(
118
+ f"Expected a 'BondList', 'AtomArray' or 'AtomArrayStack', "
119
+ f"not '{type(array).__name__}'"
120
+ )
121
+
122
+ molecule_indices = []
123
+ visited_mask = np.zeros(bonds.get_atom_count(), dtype=bool)
124
+ while not visited_mask.all():
125
+ root = np.argmin(visited_mask)
126
+ connected = find_connected(bonds, root)
127
+ visited_mask[connected] = True
128
+ molecule_indices.append(connected)
129
+ return molecule_indices
130
+
131
+
132
+ def get_molecule_masks(array):
133
+ """
134
+ Get a boolean mask for each molecule in the given structure.
135
+
136
+ A molecule is defined as a group of atoms that are directly or
137
+ indirectly connected via covalent bonds.
138
+ In this function a single atom, that has no connection to any other
139
+ atom (e.g. an ion), also qualifies as a molecule.
140
+
141
+ Parameters
142
+ ----------
143
+ array : AtomArray, shape=(n,) or AtomArrayStack, shape=(m,n) or BondList
144
+ The input structure with an associated :class:`BondList`.
145
+ Alternatively, the :class:`BondList` can be directly supplied.
146
+
147
+ Returns
148
+ -------
149
+ masks : ndarray, shape=(k,n), dtype=bool,
150
+ Each element in the array is a boolean mask referring to the
151
+ atoms of a single molecule.
152
+ Consequently, the length of this list is equal to the number of
153
+ molecules in the input `array`.
154
+
155
+ Examples
156
+ --------
157
+ Get an :class:`AtomArray` for ATP and show that it is a single
158
+ molecule:
159
+
160
+ >>> atp = residue("ATP")
161
+ >>> masks = get_molecule_masks(atp)
162
+ >>> print(len(masks))
163
+ 1
164
+
165
+ Separate ATP into two molecules by breaking the glycosidic bond
166
+ to the triphosphate:
167
+
168
+ >>> i, j = np.where(np.isin(atp.atom_name, ("O5'", "PA")))[0]
169
+ >>> atp.bonds.remove_bond(i, j)
170
+ >>> masks = get_molecule_masks(atp)
171
+ >>> print(len(masks))
172
+ 2
173
+ >>> print(atp[masks[0]])
174
+ HET 0 ATP PG P 1.200 -0.226 -6.850
175
+ HET 0 ATP O1G O 1.740 1.140 -6.672
176
+ HET 0 ATP O2G O 2.123 -1.036 -7.891
177
+ HET 0 ATP O3G O -0.302 -0.139 -7.421
178
+ HET 0 ATP PB P 0.255 -0.130 -4.446
179
+ HET 0 ATP O1B O 0.810 1.234 -4.304
180
+ HET 0 ATP O2B O -1.231 -0.044 -5.057
181
+ HET 0 ATP O3B O 1.192 -0.990 -5.433
182
+ HET 0 ATP PA P -0.745 0.068 -2.071
183
+ HET 0 ATP O1A O -2.097 0.143 -2.669
184
+ HET 0 ATP O2A O -0.125 1.549 -1.957
185
+ HET 0 ATP O3A O 0.203 -0.840 -3.002
186
+ HET 0 ATP HOG2 H 2.100 -0.546 -8.725
187
+ HET 0 ATP HOG3 H -0.616 -1.048 -7.522
188
+ HET 0 ATP HOB2 H -1.554 -0.952 -5.132
189
+ HET 0 ATP HOA2 H 0.752 1.455 -1.563
190
+ >>> print(atp[masks[1]])
191
+ HET 0 ATP O5' O -0.844 -0.587 -0.604
192
+ HET 0 ATP C5' C -1.694 0.260 0.170
193
+ HET 0 ATP C4' C -1.831 -0.309 1.584
194
+ HET 0 ATP O4' O -0.542 -0.355 2.234
195
+ HET 0 ATP C3' C -2.683 0.630 2.465
196
+ HET 0 ATP O3' O -4.033 0.165 2.534
197
+ HET 0 ATP C2' C -2.011 0.555 3.856
198
+ HET 0 ATP O2' O -2.926 0.043 4.827
199
+ HET 0 ATP C1' C -0.830 -0.418 3.647
200
+ HET 0 ATP N9 N 0.332 0.015 4.425
201
+ HET 0 ATP C8 C 1.302 0.879 4.012
202
+ HET 0 ATP N7 N 2.184 1.042 4.955
203
+ HET 0 ATP C5 C 1.833 0.300 6.033
204
+ HET 0 ATP C6 C 2.391 0.077 7.303
205
+ HET 0 ATP N6 N 3.564 0.706 7.681
206
+ HET 0 ATP N1 N 1.763 -0.747 8.135
207
+ HET 0 ATP C2 C 0.644 -1.352 7.783
208
+ HET 0 ATP N3 N 0.088 -1.178 6.602
209
+ HET 0 ATP C4 C 0.644 -0.371 5.704
210
+ HET 0 ATP H5'1 H -2.678 0.312 -0.296
211
+ HET 0 ATP H5'2 H -1.263 1.259 0.221
212
+ HET 0 ATP H4' H -2.275 -1.304 1.550
213
+ HET 0 ATP H3' H -2.651 1.649 2.078
214
+ HET 0 ATP HO3' H -4.515 0.788 3.094
215
+ HET 0 ATP H2' H -1.646 1.537 4.157
216
+ HET 0 ATP HO2' H -3.667 0.662 4.867
217
+ HET 0 ATP H1' H -1.119 -1.430 3.931
218
+ HET 0 ATP H8 H 1.334 1.357 3.044
219
+ HET 0 ATP HN61 H 3.938 0.548 8.562
220
+ HET 0 ATP HN62 H 4.015 1.303 7.064
221
+ HET 0 ATP H2 H 0.166 -2.014 8.490
222
+ """
223
+ if isinstance(array, BondList):
224
+ bonds = array
225
+ elif isinstance(array, (AtomArray, AtomArrayStack)):
226
+ if array.bonds is None:
227
+ raise ValueError("An associated BondList is required")
228
+ bonds = array.bonds
229
+ else:
230
+ raise TypeError(
231
+ f"Expected a 'BondList', 'AtomArray' or 'AtomArrayStack', "
232
+ f"not '{type(array).__name__}'"
233
+ )
234
+
235
+ molecule_indices = get_molecule_indices(bonds)
236
+ molecule_masks = np.zeros(
237
+ (len(molecule_indices), bonds.get_atom_count()), dtype=bool
238
+ )
239
+ for i in range(len(molecule_indices)):
240
+ molecule_masks[i, molecule_indices[i]] = True
241
+ return molecule_masks
242
+
243
+
244
+ def molecule_iter(array):
245
+ """
246
+ Iterate over each molecule in a input structure.
247
+
248
+ A molecule is defined as a group of atoms that are directly or
249
+ indirectly connected via covalent bonds.
250
+ In this function a single atom, that has no connection to any other
251
+ atom (e.g. an ion), also qualifies as a molecule.
252
+
253
+ Parameters
254
+ ----------
255
+ array : AtomArray or AtomArrayStack
256
+ The input structure with an associated :class:`BondList`.
257
+
258
+ Yields
259
+ ------
260
+ molecule : AtomArray or AtomArrayStack
261
+ A single molecule of the input `array`.
262
+
263
+ Examples
264
+ --------
265
+ Get an :class:`AtomArray` for ATP and break it into two molecules
266
+ at the glycosidic bond to the triphosphate:
267
+
268
+ >>> atp = residue("ATP")
269
+ >>> i, j = np.where(np.isin(atp.atom_name, ("O5'", "PA")))[0]
270
+ >>> atp.bonds.remove_bond(i, j)
271
+ >>> for molecule in molecule_iter(atp):
272
+ ... print("New molecule")
273
+ ... print(molecule)
274
+ ... print()
275
+ New molecule
276
+ HET 0 ATP PG P 1.200 -0.226 -6.850
277
+ HET 0 ATP O1G O 1.740 1.140 -6.672
278
+ HET 0 ATP O2G O 2.123 -1.036 -7.891
279
+ HET 0 ATP O3G O -0.302 -0.139 -7.421
280
+ HET 0 ATP PB P 0.255 -0.130 -4.446
281
+ HET 0 ATP O1B O 0.810 1.234 -4.304
282
+ HET 0 ATP O2B O -1.231 -0.044 -5.057
283
+ HET 0 ATP O3B O 1.192 -0.990 -5.433
284
+ HET 0 ATP PA P -0.745 0.068 -2.071
285
+ HET 0 ATP O1A O -2.097 0.143 -2.669
286
+ HET 0 ATP O2A O -0.125 1.549 -1.957
287
+ HET 0 ATP O3A O 0.203 -0.840 -3.002
288
+ HET 0 ATP HOG2 H 2.100 -0.546 -8.725
289
+ HET 0 ATP HOG3 H -0.616 -1.048 -7.522
290
+ HET 0 ATP HOB2 H -1.554 -0.952 -5.132
291
+ HET 0 ATP HOA2 H 0.752 1.455 -1.563
292
+ <BLANKLINE>
293
+ New molecule
294
+ HET 0 ATP O5' O -0.844 -0.587 -0.604
295
+ HET 0 ATP C5' C -1.694 0.260 0.170
296
+ HET 0 ATP C4' C -1.831 -0.309 1.584
297
+ HET 0 ATP O4' O -0.542 -0.355 2.234
298
+ HET 0 ATP C3' C -2.683 0.630 2.465
299
+ HET 0 ATP O3' O -4.033 0.165 2.534
300
+ HET 0 ATP C2' C -2.011 0.555 3.856
301
+ HET 0 ATP O2' O -2.926 0.043 4.827
302
+ HET 0 ATP C1' C -0.830 -0.418 3.647
303
+ HET 0 ATP N9 N 0.332 0.015 4.425
304
+ HET 0 ATP C8 C 1.302 0.879 4.012
305
+ HET 0 ATP N7 N 2.184 1.042 4.955
306
+ HET 0 ATP C5 C 1.833 0.300 6.033
307
+ HET 0 ATP C6 C 2.391 0.077 7.303
308
+ HET 0 ATP N6 N 3.564 0.706 7.681
309
+ HET 0 ATP N1 N 1.763 -0.747 8.135
310
+ HET 0 ATP C2 C 0.644 -1.352 7.783
311
+ HET 0 ATP N3 N 0.088 -1.178 6.602
312
+ HET 0 ATP C4 C 0.644 -0.371 5.704
313
+ HET 0 ATP H5'1 H -2.678 0.312 -0.296
314
+ HET 0 ATP H5'2 H -1.263 1.259 0.221
315
+ HET 0 ATP H4' H -2.275 -1.304 1.550
316
+ HET 0 ATP H3' H -2.651 1.649 2.078
317
+ HET 0 ATP HO3' H -4.515 0.788 3.094
318
+ HET 0 ATP H2' H -1.646 1.537 4.157
319
+ HET 0 ATP HO2' H -3.667 0.662 4.867
320
+ HET 0 ATP H1' H -1.119 -1.430 3.931
321
+ HET 0 ATP H8 H 1.334 1.357 3.044
322
+ HET 0 ATP HN61 H 3.938 0.548 8.562
323
+ HET 0 ATP HN62 H 4.015 1.303 7.064
324
+ HET 0 ATP H2 H 0.166 -2.014 8.490
325
+ <BLANKLINE>
326
+ """
327
+ if array.bonds is None:
328
+ raise ValueError("An associated BondList is required")
329
+ bonds = array.bonds
330
+
331
+ visited_mask = np.zeros(bonds.get_atom_count(), dtype=bool)
332
+ while not visited_mask.all():
333
+ # Take the first atom that has not been considered yet as root
334
+ root = np.argmin(visited_mask)
335
+ connected = find_connected(bonds, root)
336
+ visited_mask[connected] = True
337
+ yield array[..., connected]