gemmi-protools 0.1.6__py3-none-any.whl → 0.1.7__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.

Potentially problematic release.


This version of gemmi-protools might be problematic. Click here for more details.

@@ -50,7 +50,9 @@ def clean_structure(input_file: Union[str, pathlib.Path],
50
50
  add_missing_atoms: str = "heavy",
51
51
  keep_heterogens: str = "all",
52
52
  replace_nonstandard: bool = True,
53
- ph: Union[float, int] = 7.0
53
+ ph: Union[float, int] = 7.0,
54
+ check_mode: bool = True,
55
+ threshold: float = 0.3,
54
56
  ):
55
57
  """
56
58
 
@@ -69,6 +71,9 @@ def clean_structure(input_file: Union[str, pathlib.Path],
69
71
  none: remove all heterogens
70
72
  :param replace_nonstandard: default True, replace all non-standard residues to standard ones
71
73
  :param ph: default 7.0, ph values to add missing hydrogen atoms
74
+ :param check_mode: default True to check the ratio of residues with missing atoms
75
+ :param threshold: float, default 0.3, only use when check_mode=True
76
+
72
77
  :return:
73
78
  str, status message of fixing
74
79
  if successful, return Finish, otherwise message of error
@@ -82,6 +87,15 @@ def clean_structure(input_file: Union[str, pathlib.Path],
82
87
  ######################################################
83
88
  fixer = _load_by_pbdfixer(input_file)
84
89
 
90
+ ######################################################
91
+ # check
92
+ ######################################################
93
+ fixer.findMissingResidues()
94
+ fixer.findMissingAtoms()
95
+ ratio = len(fixer.missingAtoms) / fixer.topology.getNumResidues()
96
+ if ratio > threshold:
97
+ return dict(input=input_file, msg="Too many residues with missing atoms: %.2f" % ratio)
98
+
85
99
  ######################################################
86
100
  # replace non-standard residues
87
101
  ######################################################
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gemmi_protools
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: An Enhanced tool to process PDB structures based on Gemmi
5
5
  Author-email: Luo Jiejian <luojiejian12@mails.ucas.ac.cn>
6
6
  License-Expression: MIT
@@ -11,10 +11,10 @@ gemmi_protools/io/struct_info.py,sha256=9nBj1Zer03S8_Wks7L7uRlc9PlbfCKzoaT32pKR5
11
11
  gemmi_protools/utils/__init__.py,sha256=F6e1xNT_7lZAWQgNIneH06o2qtWYrHNr_xPUPTwwx5E,29
12
12
  gemmi_protools/utils/align.py,sha256=CZcrvjy-ZbX2u7OAn-YGblbxaj9YFUDX4CFZcpbpnB8,6959
13
13
  gemmi_protools/utils/dockq.py,sha256=XmMwVEy-H4p6sH_HPcDWA3TP77OWdih0fE_BQJDr4pU,4189
14
- gemmi_protools/utils/fixer.py,sha256=f1MAeYkFukijaBwTdINO0733Qbe5B9xSgRCE69nHkN4,8396
14
+ gemmi_protools/utils/fixer.py,sha256=WUiIoK8dFPGUkXlK-wiiWyorYD8T71rN7WDE2psGSiE,9061
15
15
  gemmi_protools/utils/ppi.py,sha256=VWYsdxWwQoS1xwEYj5KB96Zz3F8r5Eyuw6NT3ReD-wc,2330
16
- gemmi_protools-0.1.6.dist-info/licenses/LICENSE,sha256=JuQvKcgj6n11y5y6nXr9rABv3gJSswc4eTCd5WZBtSY,1062
17
- gemmi_protools-0.1.6.dist-info/METADATA,sha256=N8Os-XHbUKuRDyQw0Z3MjtYy5Z5fqLFpP1sxEZnoEbU,567
18
- gemmi_protools-0.1.6.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
19
- gemmi_protools-0.1.6.dist-info/top_level.txt,sha256=P12mYJi5O5EKIn5u-RFaWxuix431CgLacSRD7rBid_U,15
20
- gemmi_protools-0.1.6.dist-info/RECORD,,
16
+ gemmi_protools-0.1.7.dist-info/licenses/LICENSE,sha256=JuQvKcgj6n11y5y6nXr9rABv3gJSswc4eTCd5WZBtSY,1062
17
+ gemmi_protools-0.1.7.dist-info/METADATA,sha256=tsp4fzE0T7lTsmPaRYK5UzgqS4OjrvOSfESFMqbkk0Y,567
18
+ gemmi_protools-0.1.7.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
19
+ gemmi_protools-0.1.7.dist-info/top_level.txt,sha256=P12mYJi5O5EKIn5u-RFaWxuix431CgLacSRD7rBid_U,15
20
+ gemmi_protools-0.1.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.7.1)
2
+ Generator: setuptools (80.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5