pdb-tools 2.5.0__py3-none-any.whl → 2.5.1__py3-none-any.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.
Files changed (58) hide show
  1. {pdb_tools-2.5.0.dist-info → pdb_tools-2.5.1.dist-info}/METADATA +19 -11
  2. pdb_tools-2.5.1.dist-info/RECORD +55 -0
  3. {pdb_tools-2.5.0.dist-info → pdb_tools-2.5.1.dist-info}/WHEEL +1 -1
  4. {pdb_tools-2.5.0.dist-info → pdb_tools-2.5.1.dist-info}/entry_points.txt +0 -1
  5. {pdb_tools-2.5.0.dist-info → pdb_tools-2.5.1.dist-info}/top_level.txt +0 -1
  6. pdbtools/pdb_tidy.py +17 -9
  7. pdb_tools-2.5.0.dist-info/RECORD +0 -105
  8. tests/__init__.py +0 -38
  9. tests/config.py +0 -25
  10. tests/test_pdb_b.py +0 -161
  11. tests/test_pdb_chain.py +0 -160
  12. tests/test_pdb_chainbows.py +0 -140
  13. tests/test_pdb_chainxseg.py +0 -156
  14. tests/test_pdb_chkensemble.py +0 -191
  15. tests/test_pdb_delchain.py +0 -165
  16. tests/test_pdb_delelem.py +0 -165
  17. tests/test_pdb_delhetatm.py +0 -115
  18. tests/test_pdb_delinsertion.py +0 -226
  19. tests/test_pdb_delres.py +0 -241
  20. tests/test_pdb_delresname.py +0 -171
  21. tests/test_pdb_element.py +0 -151
  22. tests/test_pdb_fixinsert.py +0 -223
  23. tests/test_pdb_fromcif.py +0 -124
  24. tests/test_pdb_gap.py +0 -125
  25. tests/test_pdb_head.py +0 -142
  26. tests/test_pdb_intersect.py +0 -139
  27. tests/test_pdb_keepcoord.py +0 -115
  28. tests/test_pdb_merge.py +0 -106
  29. tests/test_pdb_mkensemble.py +0 -132
  30. tests/test_pdb_occ.py +0 -161
  31. tests/test_pdb_reatom.py +0 -243
  32. tests/test_pdb_reres.py +0 -281
  33. tests/test_pdb_rplchain.py +0 -172
  34. tests/test_pdb_rplresname.py +0 -172
  35. tests/test_pdb_seg.py +0 -160
  36. tests/test_pdb_segxchain.py +0 -146
  37. tests/test_pdb_selaltloc.py +0 -943
  38. tests/test_pdb_selatom.py +0 -165
  39. tests/test_pdb_selchain.py +0 -210
  40. tests/test_pdb_selelem.py +0 -165
  41. tests/test_pdb_selhetatm.py +0 -116
  42. tests/test_pdb_selmodel.py +0 -165
  43. tests/test_pdb_selres.py +0 -257
  44. tests/test_pdb_selresname.py +0 -171
  45. tests/test_pdb_selseg.py +0 -165
  46. tests/test_pdb_shiftres.py +0 -241
  47. tests/test_pdb_sort.py +0 -254
  48. tests/test_pdb_splitchain.py +0 -242
  49. tests/test_pdb_splitmodel.py +0 -235
  50. tests/test_pdb_splitseg.py +0 -251
  51. tests/test_pdb_tidy.py +0 -312
  52. tests/test_pdb_tocif.py +0 -238
  53. tests/test_pdb_tofasta.py +0 -158
  54. tests/test_pdb_uniqname.py +0 -156
  55. tests/test_pdb_validate.py +0 -142
  56. tests/test_pdb_wc.py +0 -161
  57. tests/utils.py +0 -56
  58. {pdb_tools-2.5.0.dist-info → pdb_tools-2.5.1.dist-info/licenses}/LICENSE +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: pdb-tools
3
- Version: 2.5.0
3
+ Version: 2.5.1
4
4
  Summary: A swiss army knife for PDB files.
5
5
  Home-page: http://bonvinlab.org/pdb-tools
6
6
  Author: Joao Rodrigues
@@ -9,20 +9,30 @@ License: Apache Software License, version 2
9
9
  Project-URL: Bug Reports, https://github.com/haddocking/pdb-tools/issues
10
10
  Project-URL: Source, https://github.com/haddocking/pdb-tools
11
11
  Keywords: bioinformatics protein structural-biology pdb
12
- Platform: UNKNOWN
13
12
  Classifier: Development Status :: 5 - Production/Stable
14
13
  Classifier: Intended Audience :: Science/Research
15
14
  Classifier: Topic :: Scientific/Engineering
16
15
  Classifier: Topic :: Scientific/Engineering :: Chemistry
17
16
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
18
- Classifier: License :: OSI Approved :: Apache Software License
19
- Classifier: Programming Language :: Python :: 2
20
- Classifier: Programming Language :: Python :: 2.7
21
- Classifier: Programming Language :: Python :: 3
22
- Classifier: Programming Language :: Python :: 3.6
23
- Classifier: Programming Language :: Python :: 3.7
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
24
23
  Description-Content-Type: text/markdown
25
24
  License-File: LICENSE
25
+ Dynamic: author
26
+ Dynamic: author-email
27
+ Dynamic: classifier
28
+ Dynamic: description
29
+ Dynamic: description-content-type
30
+ Dynamic: home-page
31
+ Dynamic: keywords
32
+ Dynamic: license
33
+ Dynamic: license-file
34
+ Dynamic: project-url
35
+ Dynamic: summary
26
36
 
27
37
  # pdb-tools
28
38
 
@@ -176,5 +186,3 @@ or a new tools, read our `CONTRIBUTING` instructions [here](https://github.com/h
176
186
  ## License
177
187
  `pdb-tools` are open-source and licensed under the Apache License, version 2.0.
178
188
  For details, see the LICENSE file.
179
-
180
-
@@ -0,0 +1,55 @@
1
+ pdb_tools-2.5.1.dist-info/licenses/LICENSE,sha256=cT2RbiAZ-YA-Vr_FpRv5cgvS3zh_KjQlBnvoewjElNQ,11350
2
+ pdbtools/__init__.py,sha256=FN83ZHvtgK83OaOvhaKBJXqvn44ikqLt1pXloqS03O8,3320
3
+ pdbtools/pdb_b.py,sha256=stTb1z6uzpUl564wfcU6SqR5f8eLGP5B-l5TuyKQBfs,5026
4
+ pdbtools/pdb_chain.py,sha256=pA4k_Qc25eYEu7Cuq0T9uiKcPckpG-ZisOiKyE16Ako,4955
5
+ pdbtools/pdb_chainbows.py,sha256=L91PjEINGsD5dioND5spVbQ31MzJRFRP8pwfa_mp9Ts,4486
6
+ pdbtools/pdb_chainxseg.py,sha256=tVTNwSdCJ-k3B98UbEMhVXGTO6mjM5IImWfhVBBYfYE,3812
7
+ pdbtools/pdb_chkensemble.py,sha256=w64kSWqWDxLnpCNu-HxZTQq1sNTKtD4xWfS7koyObMA,5282
8
+ pdbtools/pdb_delchain.py,sha256=MFEHI2oRenKPhMZeRnoXLW9dETHN7GTdDR2Rw-mhnzI,5201
9
+ pdbtools/pdb_delelem.py,sha256=9QBYgh7mIBf4Bvj2mVPe6Wr73QUcKz8JH9PcUxBoqJo,5258
10
+ pdbtools/pdb_delhetatm.py,sha256=9R4NLqSvFOX9Na6_HVMhT5hy1rT_2Rj2w4_XrdW1IBY,3740
11
+ pdbtools/pdb_delinsertion.py,sha256=hKTnjwfMPJ2QOPmwd1wMyScfPrGEEz-CcJk45ZB8wX4,2243
12
+ pdbtools/pdb_delres.py,sha256=ZrCQbPkMHye3FpxyvMuc5FYj1KWh5xwrEoMW0OzHehU,7907
13
+ pdbtools/pdb_delresname.py,sha256=aNOyr_LcYO4UakaPuJxC64s6pd1ZnZTx2wJ3up_Mvow,5209
14
+ pdbtools/pdb_element.py,sha256=dnij6pHjzRCrVQ-CerlQBe3QqZ_FRpajV1l-7jYvDQY,5321
15
+ pdbtools/pdb_fetch.py,sha256=QU6hRsyDeY9xZJMk5mv8_QaoMQVJCyIB4Pvp2Hs6tc4,4800
16
+ pdbtools/pdb_fixinsert.py,sha256=vKK7ucVh8Ipx3kHpYN-KetQg7Rr0lC1O_E71FBHZ3jE,7092
17
+ pdbtools/pdb_fromcif.py,sha256=OSMaRdUn6pQmiikVfX4jLztsE68jN_l167tQW1QtvkY,8197
18
+ pdbtools/pdb_gap.py,sha256=SHQp7W_Lc4z7Pr1_xdjy67IYHYMboMgXF1JaQ5pdIn0,4326
19
+ pdbtools/pdb_head.py,sha256=0GPzlYIQZIugMZLLXtHwPGvvY4ukNJIg3gNgSkjocDg,5082
20
+ pdbtools/pdb_intersect.py,sha256=JFo8_7kqJGHSjZjEPsCjeTBj2L3pUxtUB3rH8leK7rg,3890
21
+ pdbtools/pdb_keepcoord.py,sha256=Y-2B-4RLsuCdoGPd7AQ94SDm7Qt4LCjaxEsytEDSRrc,3444
22
+ pdbtools/pdb_merge.py,sha256=ZGfiKOrakzzC_EI5I4IPujCVrmW5tnpDLBWFWxLe7o0,3096
23
+ pdbtools/pdb_mkensemble.py,sha256=MMldN9gWgaLk5HaeKpiE4eNXRaGOsALNbr4NE4MPzCU,4145
24
+ pdbtools/pdb_occ.py,sha256=_lpq2oHXx1h7hTXA276sGxgMlgDQ2eqGQuWtp9Kl4d8,4745
25
+ pdbtools/pdb_reatom.py,sha256=0y9Dt70_3gwnLWmc1PJeWTU1lPF4IRxGGrVxo2JIUR4,6043
26
+ pdbtools/pdb_reres.py,sha256=s0gAIIKz6zFTKxMn5OsgXrOsIfi7gFcLeFIpjRl3k-o,5770
27
+ pdbtools/pdb_rplchain.py,sha256=0fE8wpb1X_aDX-RVhB9VbYcQSqDIqVLCWm_TcoUZB_s,5184
28
+ pdbtools/pdb_rplresname.py,sha256=IR89pvG3kdAa1GrNYCaj1XU67AJRwL3Uy2zOkp5QEJ8,5106
29
+ pdbtools/pdb_seg.py,sha256=SCKZzQKXJxF2W1yYo3-w9SsA3w1C0dFhYqRrN6G9a5U,4958
30
+ pdbtools/pdb_segxchain.py,sha256=2ZakxyOsPxrY3KcwJ1bVKwtHGDWIbVOWSbxGjK2U_3Y,4407
31
+ pdbtools/pdb_selaltloc.py,sha256=GLNgCXO7-TQ3yiclM9VGuzH7Cmv_4IA5rtkCN3ggdng,15351
32
+ pdbtools/pdb_selatom.py,sha256=x60cAFLYU4JOgaQ-uRXvQtVt3W9vEWShMiGxbqkKXx8,5267
33
+ pdbtools/pdb_selchain.py,sha256=EsEz4DNjNsWLPDSgpDdVpw2uEBLIuVowAfcRvrp4Y-k,5136
34
+ pdbtools/pdb_selelem.py,sha256=jQ4zVfHincDyW1jbqJRR4H-gvkmgb9gqo3X3qlD5zMs,5298
35
+ pdbtools/pdb_selhetatm.py,sha256=rTlNaD8lZQwfW0-51KdRsCBn0rnDNMXisAvq9t9EeRg,3711
36
+ pdbtools/pdb_selmodel.py,sha256=s-HzuWrAlBP0qGJpboa5ccZECUQ1t95CqL2NH1D54PM,5538
37
+ pdbtools/pdb_selres.py,sha256=2ru7kmerulQel2qNz3EhgevQ0v2dRe3m6NlDG08sP14,8753
38
+ pdbtools/pdb_selresname.py,sha256=i2wo7EgXPHVy8rlbD-iB8ynw0umYFEop9YCUUQdCsSk,5281
39
+ pdbtools/pdb_selseg.py,sha256=xFRfcVrqbWv_9HhLQbKvPOedhbmdU-s4GoVupAvxWzs,5089
40
+ pdbtools/pdb_shiftres.py,sha256=LrZufworF1xF0u_uY0_QYjIfU7Uk7AftWJAwnN5BXL4,5079
41
+ pdbtools/pdb_sort.py,sha256=szYyd5NhpVjfNSEO07LBuFtHHM3eZXRfZ-T7YNORs60,8280
42
+ pdbtools/pdb_splitchain.py,sha256=TepAD4vlUD7kc3oqJQ49WOM7xr8hdvisP6BgZfkGbNc,3765
43
+ pdbtools/pdb_splitmodel.py,sha256=oXUiZn_TY8q2jl5_KEVI1ydE7P3W5kp7X8cM7nQO-Co,3577
44
+ pdbtools/pdb_splitseg.py,sha256=g5pQ9rye9q3cgY866ZwDaCNEAzevKOr_ePX84L0tdUw,3868
45
+ pdbtools/pdb_tidy.py,sha256=fJWDyU5wdJvxwz3BTi88k75K1Zu2-qmsJW-EJ52xC2Q,8644
46
+ pdbtools/pdb_tocif.py,sha256=8xS8eROua71uzxB8kR9WOKmnaJAdr11XKPVFwhLUZOY,6768
47
+ pdbtools/pdb_tofasta.py,sha256=n9RxmiVcSo1sX-oWMly4-Xi4YwNviLCk0uuGQYt1gFE,6336
48
+ pdbtools/pdb_uniqname.py,sha256=uucIbHShFdHl6nskcrALNf_jzHgFA8zCyx0dXtONRVM,3890
49
+ pdbtools/pdb_validate.py,sha256=yTjlgexYoB52oLr3kFlSBqhPh-WeZWSAEuBPaORiCyY,6286
50
+ pdbtools/pdb_wc.py,sha256=0aOGwNG66A4tUJANt-r1z_Pp3LoCOadHXGpmSoabNGU,8477
51
+ pdb_tools-2.5.1.dist-info/METADATA,sha256=ay9s_BABr4O2KRIFNXQecjZL-nf0fMSvCSTYjA66hj4,6780
52
+ pdb_tools-2.5.1.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
53
+ pdb_tools-2.5.1.dist-info/entry_points.txt,sha256=ZwR1wuBJ03mYzXiYYToZqtHlw1CV4OQxAUgJ2iR_AXk,1986
54
+ pdb_tools-2.5.1.dist-info/top_level.txt,sha256=VJ80Sd0ldoM5Fb0EG_JRbs2GmslbFIKBL8Y0Rok8q-U,9
55
+ pdb_tools-2.5.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.37.1)
2
+ Generator: setuptools (80.10.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -48,4 +48,3 @@ pdb_tofasta = pdbtools.pdb_tofasta:main
48
48
  pdb_uniqname = pdbtools.pdb_uniqname:main
49
49
  pdb_validate = pdbtools.pdb_validate:main
50
50
  pdb_wc = pdbtools.pdb_wc:main
51
-
pdbtools/pdb_tidy.py CHANGED
@@ -44,6 +44,8 @@ effort to maintain and compile. RIP.
44
44
 
45
45
  import os
46
46
  import sys
47
+ import re
48
+ import textwrap
47
49
 
48
50
  __author__ = "Joao Rodrigues"
49
51
  __email__ = "j.p.g.l.m.rodrigues@gmail.com"
@@ -108,7 +110,7 @@ def check_input(args):
108
110
 
109
111
  def run(fhandle, strict=False):
110
112
  """
111
- Add TER/END statements and pads all lines to 80 characters.
113
+ Add TER/END statements and truncates/pads all lines to 80 characters.
112
114
 
113
115
  This function is a generator.
114
116
 
@@ -161,8 +163,14 @@ def run(fhandle, strict=False):
161
163
  if line.startswith(ignored): # to avoid matching END _and_ ENDMDL
162
164
  continue
163
165
 
164
- # Check line length
165
- line = "{:<80}\n".format(line)
166
+ # Check line length, wrapping and padding as necessary
167
+ # preserve the line prefix for wrapping
168
+ prefix = re.match(r"\S+\s*", line).group(0)
169
+ content = line[len(prefix):].lstrip()
170
+
171
+ line = "".join(
172
+ f"{prefix}{part:<{80 - len(prefix)}}\n"
173
+ for part in textwrap.wrap(content, width=80 - len(prefix)))
166
174
 
167
175
  yield line
168
176
 
@@ -214,9 +222,9 @@ def run(fhandle, strict=False):
214
222
  if atom_section:
215
223
  atom_section = False
216
224
  yield make_TER(prev_line)
217
- if in_model:
218
- yield "{:<80}\n".format("ENDMDL")
219
- in_model = False
225
+ if in_model:
226
+ yield "{:<80}\n".format("ENDMDL")
227
+ in_model = False
220
228
 
221
229
  if line.startswith('MODEL'):
222
230
  line = "MODEL " + " " + str(num_models).rjust(4)
@@ -240,9 +248,9 @@ def run(fhandle, strict=False):
240
248
  # Add last TER statement
241
249
  atom_section = False
242
250
  yield make_TER(prev_line)
243
- if in_model:
244
- yield "{:<80}\n".format("ENDMDL")
245
- in_model = False
251
+ if in_model:
252
+ yield "{:<80}\n".format("ENDMDL")
253
+ in_model = False
246
254
 
247
255
  # Add END statement
248
256
  yield "{:<80}\n".format("END")
@@ -1,105 +0,0 @@
1
- pdbtools/__init__.py,sha256=FN83ZHvtgK83OaOvhaKBJXqvn44ikqLt1pXloqS03O8,3320
2
- pdbtools/pdb_b.py,sha256=stTb1z6uzpUl564wfcU6SqR5f8eLGP5B-l5TuyKQBfs,5026
3
- pdbtools/pdb_chain.py,sha256=pA4k_Qc25eYEu7Cuq0T9uiKcPckpG-ZisOiKyE16Ako,4955
4
- pdbtools/pdb_chainbows.py,sha256=L91PjEINGsD5dioND5spVbQ31MzJRFRP8pwfa_mp9Ts,4486
5
- pdbtools/pdb_chainxseg.py,sha256=tVTNwSdCJ-k3B98UbEMhVXGTO6mjM5IImWfhVBBYfYE,3812
6
- pdbtools/pdb_chkensemble.py,sha256=w64kSWqWDxLnpCNu-HxZTQq1sNTKtD4xWfS7koyObMA,5282
7
- pdbtools/pdb_delchain.py,sha256=MFEHI2oRenKPhMZeRnoXLW9dETHN7GTdDR2Rw-mhnzI,5201
8
- pdbtools/pdb_delelem.py,sha256=9QBYgh7mIBf4Bvj2mVPe6Wr73QUcKz8JH9PcUxBoqJo,5258
9
- pdbtools/pdb_delhetatm.py,sha256=9R4NLqSvFOX9Na6_HVMhT5hy1rT_2Rj2w4_XrdW1IBY,3740
10
- pdbtools/pdb_delinsertion.py,sha256=hKTnjwfMPJ2QOPmwd1wMyScfPrGEEz-CcJk45ZB8wX4,2243
11
- pdbtools/pdb_delres.py,sha256=ZrCQbPkMHye3FpxyvMuc5FYj1KWh5xwrEoMW0OzHehU,7907
12
- pdbtools/pdb_delresname.py,sha256=aNOyr_LcYO4UakaPuJxC64s6pd1ZnZTx2wJ3up_Mvow,5209
13
- pdbtools/pdb_element.py,sha256=dnij6pHjzRCrVQ-CerlQBe3QqZ_FRpajV1l-7jYvDQY,5321
14
- pdbtools/pdb_fetch.py,sha256=QU6hRsyDeY9xZJMk5mv8_QaoMQVJCyIB4Pvp2Hs6tc4,4800
15
- pdbtools/pdb_fixinsert.py,sha256=vKK7ucVh8Ipx3kHpYN-KetQg7Rr0lC1O_E71FBHZ3jE,7092
16
- pdbtools/pdb_fromcif.py,sha256=OSMaRdUn6pQmiikVfX4jLztsE68jN_l167tQW1QtvkY,8197
17
- pdbtools/pdb_gap.py,sha256=SHQp7W_Lc4z7Pr1_xdjy67IYHYMboMgXF1JaQ5pdIn0,4326
18
- pdbtools/pdb_head.py,sha256=0GPzlYIQZIugMZLLXtHwPGvvY4ukNJIg3gNgSkjocDg,5082
19
- pdbtools/pdb_intersect.py,sha256=JFo8_7kqJGHSjZjEPsCjeTBj2L3pUxtUB3rH8leK7rg,3890
20
- pdbtools/pdb_keepcoord.py,sha256=Y-2B-4RLsuCdoGPd7AQ94SDm7Qt4LCjaxEsytEDSRrc,3444
21
- pdbtools/pdb_merge.py,sha256=ZGfiKOrakzzC_EI5I4IPujCVrmW5tnpDLBWFWxLe7o0,3096
22
- pdbtools/pdb_mkensemble.py,sha256=MMldN9gWgaLk5HaeKpiE4eNXRaGOsALNbr4NE4MPzCU,4145
23
- pdbtools/pdb_occ.py,sha256=_lpq2oHXx1h7hTXA276sGxgMlgDQ2eqGQuWtp9Kl4d8,4745
24
- pdbtools/pdb_reatom.py,sha256=0y9Dt70_3gwnLWmc1PJeWTU1lPF4IRxGGrVxo2JIUR4,6043
25
- pdbtools/pdb_reres.py,sha256=s0gAIIKz6zFTKxMn5OsgXrOsIfi7gFcLeFIpjRl3k-o,5770
26
- pdbtools/pdb_rplchain.py,sha256=0fE8wpb1X_aDX-RVhB9VbYcQSqDIqVLCWm_TcoUZB_s,5184
27
- pdbtools/pdb_rplresname.py,sha256=IR89pvG3kdAa1GrNYCaj1XU67AJRwL3Uy2zOkp5QEJ8,5106
28
- pdbtools/pdb_seg.py,sha256=SCKZzQKXJxF2W1yYo3-w9SsA3w1C0dFhYqRrN6G9a5U,4958
29
- pdbtools/pdb_segxchain.py,sha256=2ZakxyOsPxrY3KcwJ1bVKwtHGDWIbVOWSbxGjK2U_3Y,4407
30
- pdbtools/pdb_selaltloc.py,sha256=GLNgCXO7-TQ3yiclM9VGuzH7Cmv_4IA5rtkCN3ggdng,15351
31
- pdbtools/pdb_selatom.py,sha256=x60cAFLYU4JOgaQ-uRXvQtVt3W9vEWShMiGxbqkKXx8,5267
32
- pdbtools/pdb_selchain.py,sha256=EsEz4DNjNsWLPDSgpDdVpw2uEBLIuVowAfcRvrp4Y-k,5136
33
- pdbtools/pdb_selelem.py,sha256=jQ4zVfHincDyW1jbqJRR4H-gvkmgb9gqo3X3qlD5zMs,5298
34
- pdbtools/pdb_selhetatm.py,sha256=rTlNaD8lZQwfW0-51KdRsCBn0rnDNMXisAvq9t9EeRg,3711
35
- pdbtools/pdb_selmodel.py,sha256=s-HzuWrAlBP0qGJpboa5ccZECUQ1t95CqL2NH1D54PM,5538
36
- pdbtools/pdb_selres.py,sha256=2ru7kmerulQel2qNz3EhgevQ0v2dRe3m6NlDG08sP14,8753
37
- pdbtools/pdb_selresname.py,sha256=i2wo7EgXPHVy8rlbD-iB8ynw0umYFEop9YCUUQdCsSk,5281
38
- pdbtools/pdb_selseg.py,sha256=xFRfcVrqbWv_9HhLQbKvPOedhbmdU-s4GoVupAvxWzs,5089
39
- pdbtools/pdb_shiftres.py,sha256=LrZufworF1xF0u_uY0_QYjIfU7Uk7AftWJAwnN5BXL4,5079
40
- pdbtools/pdb_sort.py,sha256=szYyd5NhpVjfNSEO07LBuFtHHM3eZXRfZ-T7YNORs60,8280
41
- pdbtools/pdb_splitchain.py,sha256=TepAD4vlUD7kc3oqJQ49WOM7xr8hdvisP6BgZfkGbNc,3765
42
- pdbtools/pdb_splitmodel.py,sha256=oXUiZn_TY8q2jl5_KEVI1ydE7P3W5kp7X8cM7nQO-Co,3577
43
- pdbtools/pdb_splitseg.py,sha256=g5pQ9rye9q3cgY866ZwDaCNEAzevKOr_ePX84L0tdUw,3868
44
- pdbtools/pdb_tidy.py,sha256=BcZupUIej9rT3f8ViL7OT4hk0TOTxT2uJmMItUVTL84,8341
45
- pdbtools/pdb_tocif.py,sha256=8xS8eROua71uzxB8kR9WOKmnaJAdr11XKPVFwhLUZOY,6768
46
- pdbtools/pdb_tofasta.py,sha256=n9RxmiVcSo1sX-oWMly4-Xi4YwNviLCk0uuGQYt1gFE,6336
47
- pdbtools/pdb_uniqname.py,sha256=uucIbHShFdHl6nskcrALNf_jzHgFA8zCyx0dXtONRVM,3890
48
- pdbtools/pdb_validate.py,sha256=yTjlgexYoB52oLr3kFlSBqhPh-WeZWSAEuBPaORiCyY,6286
49
- pdbtools/pdb_wc.py,sha256=0aOGwNG66A4tUJANt-r1z_Pp3LoCOadHXGpmSoabNGU,8477
50
- tests/__init__.py,sha256=tX1BX4HhGdTL_quFu6wMoLMUWqo-yrPSE987UqsmOjs,1037
51
- tests/config.py,sha256=g0bQxEEnAjeiI9N7CFVXrZJdEZHYn-LSYAwPTMpCjpw,787
52
- tests/test_pdb_b.py,sha256=Ofyqxfqpue0pjAyuCbN80hcZ3vMzbzKuaY2lOlysJP0,4808
53
- tests/test_pdb_chain.py,sha256=cXd7LZ5pZ4Edot4DjSAiL9hGYqgmcN5TVKRui4JpItQ,4771
54
- tests/test_pdb_chainbows.py,sha256=Jim35bTRFdYvwqoPoh0GCz0OlT0pj7zi4H_LayjtFuA,4005
55
- tests/test_pdb_chainxseg.py,sha256=-tinx2JdZQTMN8Ccm3-QcXuFb0xU_l9h9jbNSfxYdyI,5806
56
- tests/test_pdb_chkensemble.py,sha256=U7fwsaDMu5QXIZiGFc19cONQpFIaaMF9RBILPowXykY,5562
57
- tests/test_pdb_delchain.py,sha256=wLxBTnwdAd5pb3iqzcKFRX5uWYAKofTBHyhmT8Uj2Kk,4894
58
- tests/test_pdb_delelem.py,sha256=UG_zoVuBGyn6bknmHhT1JXhdq3u6VqXWrFa5tkE0U84,4869
59
- tests/test_pdb_delhetatm.py,sha256=g0ivYCBUQFCmp-lwNz8xwIM94byRMyv4UXPGKoLG9EU,3314
60
- tests/test_pdb_delinsertion.py,sha256=KZt9Y4ZmEp8yxb033DAYK13QIwrPv97ECofx96OflHM,8244
61
- tests/test_pdb_delres.py,sha256=6JHoOxFVvMfTSCLDuV9UaykMdlGdST0UBydZHB78ZB8,6972
62
- tests/test_pdb_delresname.py,sha256=21K_MPGaWEMH6TDDhyHMGhiOLpTeix3ydMWj7VeWzYU,4934
63
- tests/test_pdb_element.py,sha256=ytCJpJAJP6UrZJBR374TMXYfYzESNUMJj-_cBGa1noY,5420
64
- tests/test_pdb_fixinsert.py,sha256=kg0P7geMe-6lt8v5Zt1fsPfZpdW4PghPlwxNpeqgkjE,8105
65
- tests/test_pdb_fromcif.py,sha256=Sa5nN_sTn-hkl4lXkUgORTTXoDY_T1RhunUR6bBBw1Q,3443
66
- tests/test_pdb_gap.py,sha256=k-cuHV_YFOJwcNVnX4Se1Z8lavmDLs-YZoog7pbzc74,3677
67
- tests/test_pdb_head.py,sha256=BMQBWmqBTh5D58WxL3D8IcmeA1cBtzvGmhWZSZalAns,4032
68
- tests/test_pdb_intersect.py,sha256=VVXh21L-vphqkPz4ntpmkVQwdgeLlvITIkWD9M0C7HA,5290
69
- tests/test_pdb_keepcoord.py,sha256=ZeI13lB3XV9wNfstp3aNkYYd-stq84sYm0DnmteOn5A,3304
70
- tests/test_pdb_merge.py,sha256=C7z8edrkuk0SIfyGVzgJ43edSNFluCDXLP3KM73c-ls,2976
71
- tests/test_pdb_mkensemble.py,sha256=f6j6-y9tW5s_lsPxhJ6bgYrNFMTP6IYuOdy5S1-8dVk,3710
72
- tests/test_pdb_occ.py,sha256=-r2GyyBahDNR-KJo6ONosC1bHAAJH6hoKQDBeva06ks,4817
73
- tests/test_pdb_reatom.py,sha256=Gd7RHtDb4r_oeV_sAR9HpeNpeuN5pWNyvLHSgoYmJ-U,9227
74
- tests/test_pdb_reres.py,sha256=x385SrxVrwshmVQXot2ga-6IiUKRBuNzhZgANLA8U7M,10218
75
- tests/test_pdb_rplchain.py,sha256=rvxA-CG2UIRXrRYFOJxkSaUPiQgWTQ7VnT2wxL4nRnE,5186
76
- tests/test_pdb_rplresname.py,sha256=JxvclM4XyuU-nHHSQC-nzRqa-G1AMUMQobmC0pRAqTM,5254
77
- tests/test_pdb_seg.py,sha256=_8bDwg3exa7prKL5Hr1A-ZnNjeaceSkTYdOsyauPQM8,4755
78
- tests/test_pdb_segxchain.py,sha256=h6V9opAnelMjHnfDpOsiLdRibelMjfSIxSVKJJ0qL6g,5007
79
- tests/test_pdb_selaltloc.py,sha256=q-CwaCjIKmsL5Hag8ghvzqUq1qQJLr_uJaj0Hps_6mo,42644
80
- tests/test_pdb_selatom.py,sha256=WR0D9rA6UZbCInnNYzBE9zwekh3pBrIM8Uh7Nvll47I,4802
81
- tests/test_pdb_selchain.py,sha256=XRd4034GJtmotTN_mFUr9q0ysmGffnEBpxuU8PYlYCQ,6355
82
- tests/test_pdb_selelem.py,sha256=eJX1pUINl4NB7zLGFwc9Jg6QOBE0Frfzs4Q87LSbXME,4777
83
- tests/test_pdb_selhetatm.py,sha256=ZOQBZ-Ca7TXM0luTfdzH-8x02YGsbHLDh-pT3LmDNDc,3314
84
- tests/test_pdb_selmodel.py,sha256=UdfHrv82oqwqLvkoY6SxHzD_tpm7g1xTHU2q2pXiZqE,4876
85
- tests/test_pdb_selres.py,sha256=Eri1qaYqEZKji9f3DXqiXMqWChShy-7Cc_TQGv_oIcY,7357
86
- tests/test_pdb_selresname.py,sha256=tciwLpTeWm_FkaFv5XOj23GU2Y5p-I9E74c5BG9jTRw,4932
87
- tests/test_pdb_selseg.py,sha256=ixLjfhKvp9Qu8q6qqlCCvghRyyrONXBcE0_XsudMb4A,4817
88
- tests/test_pdb_shiftres.py,sha256=NWGo9Yxc53M3GAJafCVMEkzQ_byphZx2MWSHYq5EpLA,8914
89
- tests/test_pdb_sort.py,sha256=W8SrZPMF-3Ag14J9Ya0zfeJnbo-Rc1h1wfwPjhXb3yE,11213
90
- tests/test_pdb_splitchain.py,sha256=-PvCmvTgjTPIEpQuFh3LcyAvDDMJRW1Y9S6kzTOye0o,7885
91
- tests/test_pdb_splitmodel.py,sha256=d0O0YlKy_CMeoa8Xv6M-5lCTGtd9d5tyhM-BOw3kO7g,7200
92
- tests/test_pdb_splitseg.py,sha256=P5gGE1Xg1koCG5jg87mu3hWchTj5IeUjnXgCllkiw8c,8171
93
- tests/test_pdb_tidy.py,sha256=7Q4vL68TfgAs7JIciVON6AyzI8tnNwSzaRE7l_R1nLo,10143
94
- tests/test_pdb_tocif.py,sha256=m-AO2QfhOq746WtorqZiUn5EQhhSd0iZGlAxvbu69c8,7392
95
- tests/test_pdb_tofasta.py,sha256=ppqQ_F9MoVoq20BtMMmRNnskLQ6Csr-eFLiSaMaGz3w,4648
96
- tests/test_pdb_uniqname.py,sha256=Z5hrdpk7vaZ8q_bGk5hm53Ba4Ud0DRvG7SCmLaV5-3E,4530
97
- tests/test_pdb_validate.py,sha256=clS1l45-hmY52xNb2GGFMxzMYM7fRDojdmew71T_ax0,3962
98
- tests/test_pdb_wc.py,sha256=4o-sL4ZwtiJomteSDzoyhl-LwEZIgJ_n1dC_PMbY99U,4647
99
- tests/utils.py,sha256=D-raZvngkZqof2kMtK3gaX_GMIbhADudMUN4Xw2MKgs,1630
100
- pdb_tools-2.5.0.dist-info/LICENSE,sha256=cT2RbiAZ-YA-Vr_FpRv5cgvS3zh_KjQlBnvoewjElNQ,11350
101
- pdb_tools-2.5.0.dist-info/METADATA,sha256=JZOrcNa3Yt4FK3qqeiY8ZYnDcJzrloVe4g02IYtbAq0,6577
102
- pdb_tools-2.5.0.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
103
- pdb_tools-2.5.0.dist-info/entry_points.txt,sha256=TXI494dHf3VZCxhI6yC7XNXmvdwIjyb4k4FisJKYCPE,1987
104
- pdb_tools-2.5.0.dist-info/top_level.txt,sha256=e3EvPU8V_2ksmkPdq4YIuGWVUuEMvyuWUzgdhxefGqI,15
105
- pdb_tools-2.5.0.dist-info/RECORD,,
tests/__init__.py DELETED
@@ -1,38 +0,0 @@
1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
- #
4
- # Copyright 2018 João Pedro Rodrigues
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
-
18
- """
19
- Unit Tests for all pdb-tools scripts
20
- """
21
-
22
- import os
23
- import sys
24
- import unittest
25
-
26
- from .config import test_dir
27
-
28
-
29
- def test_all():
30
- mpath = os.path.abspath(os.path.join(test_dir, '..'))
31
- sys.path.insert(0, mpath) # so we load dev files before any installation
32
-
33
- loader = unittest.defaultTestLoader
34
-
35
- tpath = os.path.join(mpath, 'tests')
36
- suite = loader.discover(tpath)
37
-
38
- return suite
tests/config.py DELETED
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
- #
4
- # Copyright 2018 João Pedro Rodrigues
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
-
18
- """
19
- Configuration settings for the Tests.
20
- """
21
-
22
- import os
23
-
24
- test_dir = os.path.dirname(os.path.abspath(__file__))
25
- data_dir = os.path.join(test_dir, 'data')
tests/test_pdb_b.py DELETED
@@ -1,161 +0,0 @@
1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
- #
4
- # Copyright 2018 João Pedro Rodrigues
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
-
18
- """
19
- Unit Tests for `pdb_b`.
20
- """
21
-
22
- import os
23
- import sys
24
- import unittest
25
-
26
- from config import data_dir
27
- from utils import OutputCapture
28
-
29
-
30
- class TestTool(unittest.TestCase):
31
- """
32
- Generic class for testing tools.
33
- """
34
-
35
- def setUp(self):
36
- # Dynamically import the module
37
- name = 'pdbtools.pdb_b'
38
- self.module = __import__(name, fromlist=[''])
39
-
40
- def exec_module(self):
41
- """
42
- Execs module.
43
- """
44
-
45
- with OutputCapture() as output:
46
- try:
47
- self.module.main()
48
- except SystemExit as e:
49
- self.retcode = e.code
50
-
51
- self.stdout = output.stdout
52
- self.stderr = output.stderr
53
-
54
- return
55
-
56
- def test_default(self):
57
- """$ pdb_b data/dummy.pdb"""
58
-
59
- # Simulate input
60
- # pdb_b -20 dummy.pdb
61
- sys.argv = ['', os.path.join(data_dir, 'dummy.pdb')]
62
-
63
- # Execute the script
64
- self.exec_module()
65
-
66
- # Validate results
67
- self.assertEqual(self.retcode, 0) # ensure the program exited OK.
68
- self.assertEqual(len(self.stdout), 204) # no lines deleted
69
- self.assertEqual(len(self.stderr), 0) # no errors
70
-
71
- records = (('ATOM', 'HETATM'))
72
- bfactors = [l[60:66] for l in self.stdout if l.startswith(records)]
73
- unique_bfac = list(set(map(float, bfactors)))
74
- self.assertEqual(unique_bfac, [10.00]) # all bfactors changed
75
-
76
- def test_two_options(self):
77
- """$ pdb_b -20 data/dummy.pdb"""
78
-
79
- sys.argv = ['', '-20.0', os.path.join(data_dir, 'dummy.pdb')]
80
-
81
- self.exec_module()
82
-
83
- self.assertEqual(self.retcode, 0)
84
- self.assertEqual(len(self.stdout), 204)
85
- self.assertEqual(len(self.stderr), 0)
86
-
87
- records = (('ATOM', 'HETATM'))
88
- bfactors = [l[60:66] for l in self.stdout if l.startswith(records)]
89
- unique_bfac = list(set(map(float, bfactors)))
90
- self.assertEqual(unique_bfac, [20.00])
91
-
92
- def test_file_not_found(self):
93
- """$ pdb_b not_existing.pdb"""
94
-
95
- afile = os.path.join(data_dir, 'not_existing.pdb')
96
- sys.argv = ['', '-10.0', afile]
97
-
98
- self.exec_module()
99
-
100
- self.assertEqual(self.retcode, 1) # exit code is 1 (error)
101
- self.assertEqual(len(self.stdout), 0) # nothing written to stdout
102
- self.assertEqual(self.stderr[0][:22],
103
- "ERROR!! File not found") # proper error message
104
-
105
- @unittest.skipIf(os.getenv('SKIP_TTY_TESTS'), 'skip on GHA - no TTY')
106
- def test_file_missing(self):
107
- """$ pdb_b -10"""
108
-
109
- sys.argv = ['', '-10.0']
110
-
111
- self.exec_module()
112
-
113
- self.assertEqual(self.retcode, 1)
114
- self.assertEqual(len(self.stdout), 0) # no output
115
- self.assertEqual(self.stderr[0],
116
- "ERROR!! No data to process!")
117
-
118
- @unittest.skipIf(os.getenv('SKIP_TTY_TESTS'), 'skip on GHA - no TTY')
119
- def test_helptext(self):
120
- """$ pdb_b"""
121
-
122
- sys.argv = ['']
123
-
124
- self.exec_module()
125
-
126
- self.assertEqual(self.retcode, 1) # ensure the program exited gracefully.
127
- self.assertEqual(len(self.stdout), 0) # no output
128
- self.assertEqual(self.stderr, self.module.__doc__.split("\n")[:-1])
129
-
130
- def test_invalid_option(self):
131
- """$ pdb_b -A data/dummy.pdb"""
132
-
133
- sys.argv = ['', '-A', os.path.join(data_dir, 'dummy.pdb')]
134
-
135
- self.exec_module()
136
-
137
- self.assertEqual(self.retcode, 1)
138
- self.assertEqual(len(self.stdout), 0)
139
- self.assertEqual(self.stderr[0][:47],
140
- "ERROR!! You provided an invalid b-factor value:")
141
-
142
- def test_not_an_option(self):
143
- """$ pdb_b 20 data/dummy.pdb"""
144
-
145
- sys.argv = ['', '20', os.path.join(data_dir, 'dummy.pdb')]
146
-
147
- self.exec_module()
148
-
149
- self.assertEqual(self.retcode, 1)
150
- self.assertEqual(len(self.stdout), 0)
151
- self.assertEqual(self.stderr[0],
152
- "ERROR! First argument is not an option: '20'")
153
-
154
-
155
- if __name__ == '__main__':
156
- from config import test_dir
157
-
158
- mpath = os.path.abspath(os.path.join(test_dir, '..'))
159
- sys.path.insert(0, mpath) # so we load dev files before any installation
160
-
161
- unittest.main()