biobb-structure-checking 3.16.2__tar.gz → 3.16.4__tar.gz

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 (67) hide show
  1. {biobb_structure_checking-3.16.2/biobb_structure_checking.egg-info → biobb_structure_checking-3.16.4}/PKG-INFO +9 -8
  2. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/README.md +7 -6
  3. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/check_structure.py +1 -1
  4. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/add_hydrogen.py +8 -4
  5. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/altloc.py +36 -31
  6. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/backbone.py +10 -4
  7. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/chains.py +3 -5
  8. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/getss.py +3 -2
  9. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/sequences.py +12 -0
  10. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/constants.py +17 -7
  11. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/dat/commands.hlp +2 -0
  12. biobb_structure_checking-3.16.4/biobb_structure_checking/modeller_manager.py +250 -0
  13. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/modelling/modelsdata.py +7 -4
  14. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/modelling/residue_set.py +5 -7
  15. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/modelling/sequencedata.py +43 -6
  16. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/modelling/structuredata.py +30 -19
  17. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/modelling/utils.py +22 -10
  18. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/mutation_manager.py +2 -3
  19. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/pdbio/mmb_server.py +4 -41
  20. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/pdbio/param_input.py +4 -3
  21. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/structure_checking.py +18 -21
  22. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/structure_manager.py +134 -44
  23. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4/biobb_structure_checking.egg-info}/PKG-INFO +9 -8
  24. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking.egg-info/SOURCES.txt +0 -5
  25. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/setup.py +3 -3
  26. biobb_structure_checking-3.16.2/biobb_structure_checking/dat/modRes/modSER.json +0 -361
  27. biobb_structure_checking-3.16.2/biobb_structure_checking/dat/modRes/modTHR.json +0 -135
  28. biobb_structure_checking-3.16.2/biobb_structure_checking/dat/modRes/modTYR.json +0 -366
  29. biobb_structure_checking-3.16.2/biobb_structure_checking/dat/modRes/modres.json +0 -7705
  30. biobb_structure_checking-3.16.2/biobb_structure_checking/dat/modRes/modres_phospho.json +0 -7705
  31. biobb_structure_checking-3.16.2/biobb_structure_checking/modeller_manager.py +0 -176
  32. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/LICENSE +0 -0
  33. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/MANIFEST.in +0 -0
  34. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/__init__.py +0 -0
  35. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/__init__.py +0 -0
  36. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/amide.py +0 -0
  37. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/chiral.py +0 -0
  38. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/chiral_bck.py +0 -0
  39. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/cistransbck.py +0 -0
  40. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/clashes.py +0 -0
  41. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/fixside.py +0 -0
  42. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/inscodes.py +0 -0
  43. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/ligands.py +0 -0
  44. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/metals.py +0 -0
  45. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/models.py +0 -0
  46. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/mutateside.py +0 -0
  47. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/rem_hydrogen.py +0 -0
  48. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/commands/water.py +0 -0
  49. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/dat/ADT_prm.json +0 -0
  50. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/dat/CMIP_prm.json +0 -0
  51. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/dat/all_residues.in +0 -0
  52. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/dat/data_lib.json +0 -0
  53. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/libs/__init__.py +0 -0
  54. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/libs/data_lib_manager.py +0 -0
  55. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/libs/residue_lib_manager.py +0 -0
  56. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/modelling/__init__.py +0 -0
  57. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/modelling/chainsdata.py +0 -0
  58. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/pdbio/PDBIO_extended.py +0 -0
  59. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/pdbio/__init__.py +0 -0
  60. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/pdbio/bare_builder.py +0 -0
  61. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/pdbio/json_writer.py +0 -0
  62. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking/py.typed +0 -0
  63. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking.egg-info/dependency_links.txt +0 -0
  64. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking.egg-info/entry_points.txt +0 -0
  65. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking.egg-info/requires.txt +0 -0
  66. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/biobb_structure_checking.egg-info/top_level.txt +0 -0
  67. {biobb_structure_checking-3.16.2 → biobb_structure_checking-3.16.4}/setup.cfg +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: biobb_structure_checking
3
- Version: 3.16.2
3
+ Version: 3.16.4
4
4
  Summary: BioBB_structure_checking performs MDWeb structure checking tool set as a command line utility.
5
5
  Home-page: https://github.com/bioexcel/biobb_structure_checking
6
6
  Author: Biobb developers
7
7
  Author-email: gelpi@ub.edu
8
- Project-URL: Documentation, http://BioBB_structure_checking.readthedocs.io/en/latest/
8
+ Project-URL: Documentation, http://biobb-structure-checking.readthedocs.io/en/latest/
9
9
  Project-URL: Bioexcel, https://bioexcel.eu/
10
10
  Keywords: Bioinformatics Workflows BioExcel Compatibility
11
11
  Classifier: Development Status :: 3 - Alpha
@@ -54,10 +54,10 @@ Biobb_structure_checking package allows to configure the system (selection of mo
54
54
  The Biobb_structure_checking package provides a command line utility ([check_structure](https://biobb-structure-checking.readthedocs.io/en/latest/command_line_usage.html)) and a python [API](https://biobb-structure-checking.readthedocs.io/en/latest/biobb_structure_checking.html).
55
55
 
56
56
  The latest documentation of this package can be found in our readthedocs site:
57
- [latest package documentation](http://biobb_structure_checking.readthedocs.io/en/latest/).
57
+ [latest package documentation](http://biobb-structure-checking.readthedocs.io/en/latest/).
58
58
 
59
59
  ### Version
60
- v3.16.2 Feb 2026
60
+ v3.16.4 Oct 2026
61
61
 
62
62
  ### Requirements
63
63
 
@@ -76,7 +76,7 @@ Using PIP:
76
76
 
77
77
  pip install "biobb_structure_checking>=3.16.0"
78
78
 
79
- * Usage: [Python API documentation](https://biobb_structure_checking.readthedocs.io/en/latest/modules.html).
79
+ * Usage: [Python API documentation](https://biobb-structure-checking.readthedocs.io/en/latest/modules.html).
80
80
 
81
81
  Using ANACONDA:
82
82
 
@@ -84,14 +84,15 @@ Using ANACONDA:
84
84
 
85
85
  conda install -c bioconda "biobb_structure_checking>=3.16.0"
86
86
 
87
- * Usage: With conda installation BioBBs can be used with the [Python API documentation](https://biobb_structure_checking.readthedocs.io/en/latest/modules.html) and the [Command Line documentation](https://biobb_structure_checking.readthedocs.io/en/latest/command_line.html)
87
+ * Usage: With conda installation BioBBs can be used with the [Python API documentation](https://biobb-structure-checking.readthedocs.io/en/latest/modules.html) and the [Command Line documentation](https://biobb-structure-checking.readthedocs.io/en/latest/command_line.html)
88
88
 
89
89
  ### Copyright & Licensing
90
90
  This software has been developed in the MMB group (http://mmb.irbbarcelona.org) at the
91
91
  BSC (https://www.bsc.es/) & IRB (https://www.irbbarcelona.org/) for the European BioExcel (https://bioexcel.eu/). BioExcel is funded by the European Union Horizon 2020 program under grant agreements 823830, 675728 and by the EuroHPC Joint Undertaking and Sweden, Netherlands, Germany, Spain, Finland and Norway under grant agreement 101093290 funded by the European Commission.
92
92
 
93
- * (c) 2015-2025 [Barcelona Supercomputing Center](https://www.bsc.es/)
94
- * (c) 2015-2025 [Institute for Research in Biomedicine](https://www.irbbarcelona.org/)
93
+ * (c) 2015-2026 [Barcelona Supercomputing Center](https://www.bsc.es/)
94
+ * (c) 2015-2026 [Institute for Research in Biomedicine](https://www.irbbarcelona.org/)
95
+ * (c) 2015-2026 [University of Barcelona](https://www.ub.edu/)
95
96
 
96
97
  Licensed under the
97
98
  [GNU Lesser General Public License v2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html).
@@ -20,10 +20,10 @@ Biobb_structure_checking package allows to configure the system (selection of mo
20
20
  The Biobb_structure_checking package provides a command line utility ([check_structure](https://biobb-structure-checking.readthedocs.io/en/latest/command_line_usage.html)) and a python [API](https://biobb-structure-checking.readthedocs.io/en/latest/biobb_structure_checking.html).
21
21
 
22
22
  The latest documentation of this package can be found in our readthedocs site:
23
- [latest package documentation](http://biobb_structure_checking.readthedocs.io/en/latest/).
23
+ [latest package documentation](http://biobb-structure-checking.readthedocs.io/en/latest/).
24
24
 
25
25
  ### Version
26
- v3.16.2 Feb 2026
26
+ v3.16.4 Oct 2026
27
27
 
28
28
  ### Requirements
29
29
 
@@ -42,7 +42,7 @@ Using PIP:
42
42
 
43
43
  pip install "biobb_structure_checking>=3.16.0"
44
44
 
45
- * Usage: [Python API documentation](https://biobb_structure_checking.readthedocs.io/en/latest/modules.html).
45
+ * Usage: [Python API documentation](https://biobb-structure-checking.readthedocs.io/en/latest/modules.html).
46
46
 
47
47
  Using ANACONDA:
48
48
 
@@ -50,14 +50,15 @@ Using ANACONDA:
50
50
 
51
51
  conda install -c bioconda "biobb_structure_checking>=3.16.0"
52
52
 
53
- * Usage: With conda installation BioBBs can be used with the [Python API documentation](https://biobb_structure_checking.readthedocs.io/en/latest/modules.html) and the [Command Line documentation](https://biobb_structure_checking.readthedocs.io/en/latest/command_line.html)
53
+ * Usage: With conda installation BioBBs can be used with the [Python API documentation](https://biobb-structure-checking.readthedocs.io/en/latest/modules.html) and the [Command Line documentation](https://biobb-structure-checking.readthedocs.io/en/latest/command_line.html)
54
54
 
55
55
  ### Copyright & Licensing
56
56
  This software has been developed in the MMB group (http://mmb.irbbarcelona.org) at the
57
57
  BSC (https://www.bsc.es/) & IRB (https://www.irbbarcelona.org/) for the European BioExcel (https://bioexcel.eu/). BioExcel is funded by the European Union Horizon 2020 program under grant agreements 823830, 675728 and by the EuroHPC Joint Undertaking and Sweden, Netherlands, Germany, Spain, Finland and Norway under grant agreement 101093290 funded by the European Commission.
58
58
 
59
- * (c) 2015-2025 [Barcelona Supercomputing Center](https://www.bsc.es/)
60
- * (c) 2015-2025 [Institute for Research in Biomedicine](https://www.irbbarcelona.org/)
59
+ * (c) 2015-2026 [Barcelona Supercomputing Center](https://www.bsc.es/)
60
+ * (c) 2015-2026 [Institute for Research in Biomedicine](https://www.irbbarcelona.org/)
61
+ * (c) 2015-2026 [University of Barcelona](https://www.ub.edu/)
61
62
 
62
63
  Licensed under the
63
64
  [GNU Lesser General Public License v2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html).
@@ -37,7 +37,7 @@ def main():
37
37
 
38
38
  if args.command == 'commands':
39
39
  help_str = header()
40
- with open(opj(data_dir_path, cts.COMMANDS_HELP_PATH)) as help_file:
40
+ with open(opj(data_dir_path, cts.COMMANDS_HELP_PATH), 'r', encoding='utf-8') as help_file:
41
41
  help_str += help_file.read()
42
42
  pydoc.pager(help_str)
43
43
  sys.exit(0)
@@ -109,7 +109,8 @@ def fix(strcheck, opts, fix_data=None):
109
109
  for r_at in fix_data['ion_res_list']:
110
110
  res = r_at[0]
111
111
  rcode = res.get_resname()
112
- if ph_value <= std_ion[rcode]['pK']:
112
+
113
+ if float(ph_value) <= std_ion[rcode]['pK']:
113
114
  ion_to_fix[res] = std_ion[rcode]['lowpH']
114
115
  else:
115
116
  ion_to_fix[res] = std_ion[rcode]['highpH']
@@ -132,6 +133,7 @@ def fix(strcheck, opts, fix_data=None):
132
133
  for mut_res in mut.mutations:
133
134
  ion_to_fix[mut_res['resobj']] = mut_res['new_id']
134
135
  else:
136
+ strcheck.summary['add_hydrogen']['selection'] = []
135
137
  if add_h_mode == 'int':
136
138
  if not strcheck.args['quiet']:
137
139
  print('Selection: interactive')
@@ -143,13 +145,15 @@ def fix(strcheck, opts, fix_data=None):
143
145
  r_at for r_at in fix_data['ion_res_list']
144
146
  if r_at[0].get_resname() == 'HIS'
145
147
  ]
146
- strcheck.summary['add_hydrogen']['selection'] = []
148
+ else:
149
+ res_list = []
150
+
147
151
  for r_at in res_list:
148
152
  rcode = r_at[0].get_resname()
149
153
  input_line = ParamInput(
150
154
  "Select residue form for " + mu.residue_id(r_at[0]),
151
- strcheck.args['non_interactive']
152
- )
155
+ strcheck.args['non_interactive']
156
+ )
153
157
  input_line.add_option_list('list', r_at[1].keys())
154
158
  input_line.default = std_ion[rcode]['std']
155
159
 
@@ -26,17 +26,21 @@ def check(strcheck):
26
26
  print(rid)
27
27
  strcheck.summary['altloc'][rid] = {}
28
28
  fix_data['altlocs'][res] = sorted(alt_loc_res[res][0].child_dict)
29
+ alts = set()
29
30
  for atm in alt_loc_res[res]:
30
31
  strcheck.summary['altloc'][rid][atm.id] = []
31
32
  alt_str = f" {atm.id:4}"
32
33
  for alt in sorted(atm.child_dict):
34
+ alts.add(alt)
33
35
  alt_str += f" {alt} ({atm.child_dict[alt].occupancy:4.2f})"
34
36
  strcheck.summary['altloc'][rid][atm.id].append({
35
37
  'loc_label': alt,
36
38
  'occupancy': atm.child_dict[alt].occupancy
37
39
  })
38
40
  print(alt_str)
39
-
41
+ if 'A' not in alts:
42
+ print(cts.MSGS['ALTLOC_NO_A'])
43
+ strcheck.summary['altloc'][rid]['no_altA'] = True
40
44
  return fix_data
41
45
 
42
46
 
@@ -60,7 +64,7 @@ def fix(strcheck, opts, fix_data=None):
60
64
  strcheck.args['non_interactive'],
61
65
  set_none='All'
62
66
  )
63
- input_line.add_option_all()
67
+ input_line.add_option_none()
64
68
  input_line.add_option_list('occup', ['occupancy'])
65
69
  input_line.add_option_list('altids', altlocs, case='upper')
66
70
  input_line.add_option_list(
@@ -78,34 +82,35 @@ def fix(strcheck, opts, fix_data=None):
78
82
  if input_option == 'error':
79
83
  return cts.MSGS['UNKNOWN_SELECTION'], select_altloc
80
84
 
81
- if input_option != 'all':
82
- print(f"Selecting location {select_altloc}")
83
- if input_option in ('occup', 'altids'):
84
- select_altloc = select_altloc.upper()
85
- to_fix = {
86
- res: {
87
- 'ats': value,
88
- 'select' : select_altloc
89
- } for res, value in fix_data['alt_loc_res'].items()
90
- }
91
-
92
- elif input_option == 'resnum':
93
- to_fix = {}
94
- selected_rnums = {}
95
- for rsel in select_altloc.split(','):
96
- rnum, alt = rsel.split(':')
97
- selected_rnums[rnum] = alt
98
- to_fix = {
99
- res: {
100
- 'ats': value,
101
- 'select': selected_rnums[mu.residue_num(res)]
102
- }
103
- for res, value in fix_data['alt_loc_res'].items()
104
- if mu.residue_num(res) in selected_rnums
105
- }
106
- for res in to_fix:
107
- strcheck.strucm.select_altloc_residue(res, to_fix[res])
108
-
109
85
  strcheck.summary['altloc']['selected'] = select_altloc
110
-
86
+ if input_option == 'none':
87
+ print(cts.MSGS['ALTLOC_NO_SELECTION'])
88
+ return False
89
+
90
+ print(f"Selecting location {select_altloc}")
91
+ to_fix = {}
92
+ if input_option in ('occup', 'altids'):
93
+ select_altloc = select_altloc.upper()
94
+ to_fix = {
95
+ res: {
96
+ 'ats': value,
97
+ 'select' : select_altloc
98
+ } for res, value in fix_data['alt_loc_res'].items()
99
+ }
100
+ elif input_option == 'resnum':
101
+ to_fix = {}
102
+ selected_rnums = {}
103
+ for rsel in select_altloc.split(','):
104
+ rnum, alt = rsel.split(':')
105
+ selected_rnums[rnum] = alt
106
+ to_fix = {
107
+ res: {
108
+ 'ats': value,
109
+ 'select': selected_rnums[mu.residue_num(res)]
110
+ }
111
+ for res, value in fix_data['alt_loc_res'].items()
112
+ if mu.residue_num(res) in selected_rnums
113
+ }
114
+ for res in to_fix:
115
+ strcheck.strucm.select_altloc_residue(res, to_fix[res])
111
116
  return False
@@ -86,7 +86,12 @@ def check(strcheck):
86
86
  print(cts.MSGS['MODIF_RESIDUES'])
87
87
  strcheck.summary['backbone']['mod_residues'] = []
88
88
  for brk in strcheck.strucm.st_data.modified_residue_list:
89
- print(f" {mu.residue_id(brk):10}")
89
+ if strcheck.strucm.st_data.no_network:
90
+ print(f" {mu.residue_id(brk):10}")
91
+ else:
92
+ print(
93
+ f" {mu.residue_id(brk):10} ({mu.fetch_residue_name_by_id(brk.get_resname())})"
94
+ )
90
95
  strcheck.summary['backbone']['mod_residues'].append(mu.residue_id(brk))
91
96
  # Provisional only missing atoms can be fixed
92
97
  fix_data['modified_residue_list'] = True
@@ -110,7 +115,8 @@ def fix(strcheck, opts, fix_data=None):
110
115
  opts['fix_chain'],
111
116
  fix_data['bck_breaks_list'],
112
117
  strcheck.args['modeller_key'],
113
- opts['extra_gap']
118
+ opts['extra_gap'],
119
+ bool(opts['fix_known'])
114
120
  )
115
121
  if not fixed_main:
116
122
  fix_done = True
@@ -178,7 +184,7 @@ def fix(strcheck, opts, fix_data=None):
178
184
  return False
179
185
 
180
186
 
181
- def _backbone_fix_main_chain(strcheck, fix_main_bck, breaks_list, modeller_key, extra_gap):
187
+ def _backbone_fix_main_chain(strcheck, fix_main_bck, breaks_list, modeller_key, extra_gap, fix_known=False):
182
188
  print("Main chain fixes")
183
189
 
184
190
  brk_rnums = [
@@ -242,7 +248,7 @@ def _backbone_fix_main_chain(strcheck, fix_main_bck, breaks_list, modeller_key,
242
248
  if f"({mu.residue_num(rpair[0])}-{mu.residue_num(rpair[1])})".replace(' ', '')\
243
249
  in fix_main_bck.split(',') or input_option == 'all'
244
250
  ]
245
- return strcheck.strucm.fix_backbone_chain(to_fix, modeller_key, extra_gap)
251
+ return strcheck.strucm.fix_backbone_chain(to_fix, modeller_key, extra_gap, fix_known)
246
252
 
247
253
 
248
254
  def _backbone_add_caps(strcheck, add_caps, bck_breaks_list):
@@ -49,21 +49,19 @@ def check(strcheck):
49
49
 
50
50
 
51
51
  def fix(strcheck, opts, fix_data=None):
52
+ rename_chains = ''
53
+ rebuild_chains = False
54
+ renumber_chains = False
52
55
  if isinstance(opts, str):
53
56
  select_chains = opts
54
- rename_chains = ''
55
57
  else:
56
58
  select_chains = opts['select']
57
59
  if 'rename' in opts:
58
60
  rename_chains = opts['rename']
59
- else:
60
- rename_chains = ''
61
61
  if 'renumber' in opts:
62
62
  renumber_chains = opts['renumber']
63
63
  if 'rebuild' in opts:
64
64
  rebuild_chains = opts['rebuild']
65
- else:
66
- rebuild_chains = False
67
65
 
68
66
  if strcheck.strucm.chains_data.has_chains_to_rename:
69
67
  input_line = ParamInput(
@@ -1,5 +1,6 @@
1
1
  """ Module supporting getss command"""
2
2
 
3
+ from numpy import sqrt
3
4
  import biobb_structure_checking.constants as cts
4
5
  import biobb_structure_checking.modelling.utils as mu
5
6
  from biobb_structure_checking.pdbio.param_input import ParamInput
@@ -21,12 +22,12 @@ def check(strcheck):
21
22
  print(
22
23
  f" {mu.atom_id(ssb[0]):12}"
23
24
  f" {mu.atom_id(ssb[1]):12}"
24
- f" {ssb[2]:8.3f}"
25
+ f" {sqrt(ssb[2]):8.3f}"
25
26
  )
26
27
  strcheck.summary['getss']['found'].append({
27
28
  'at1': mu.atom_id(ssb[0]),
28
29
  'at2': mu.atom_id(ssb[1]),
29
- 'dist': round(float(ssb[2]), 4)
30
+ 'dist': round(sqrt(float(ssb[2])), 4)
30
31
  })
31
32
  return SS_bonds
32
33
 
@@ -21,6 +21,18 @@ def check(strcheck):
21
21
  'canonical': can_seq,
22
22
  'structure': pdb_seq
23
23
  }
24
+ if strcheck.strucm.sequence_data.has_canonical[0]:
25
+ mismatches = strcheck.strucm.sequence_data.compare_sequences(strcheck.strucm)
26
+
27
+ if mismatches:
28
+ print(f"Found {len(mismatches)} mismatch(es)")
29
+ for ch_id, mismatch in mismatches.items():
30
+ print(
31
+ f"Chain {ch_id}\n"
32
+ f"{mismatch['canonical']}\n"
33
+ f"{mismatch['structure']}"
34
+ )
35
+ strcheck.summary['sequence_mismatches'] = mismatches
24
36
  return fasta
25
37
 
26
38
 
@@ -2,14 +2,13 @@
2
2
  Global constants for structure_checking module
3
3
  """
4
4
  import argparse
5
- import os
6
5
  from os.path import dirname
7
6
  from os.path import join as opj
8
7
 
9
8
 
10
9
  from biobb_structure_checking.pdbio.param_input import Dialog
11
10
 
12
- VERSION = '3.16.2'
11
+ VERSION = '3.16.4'
13
12
 
14
13
  # Default locations and settings
15
14
  DATA_DIR_DEFAULT_PATH = 'dat'
@@ -23,7 +22,6 @@ ATOM_LIMIT = 1000000
23
22
  TIME_LIMIT = 3600
24
23
 
25
24
  ALT_SERVERS = {
26
- 'mmb': 'https://mmb.irbbarcelona.org/api/pdb',
27
25
  'bsc': 'http://mdb-login.bsc.es/api/pdb'
28
26
  }
29
27
 
@@ -113,8 +111,8 @@ CMD_LINE.add_argument(
113
111
  '--file_format',
114
112
  dest='file_format',
115
113
  help='Format for retrieving remote structures '
116
- '(mmCif(=cif, default)|pdb|xml)',
117
- choices=['mmCif', 'pdb', 'cif', 'xml']
114
+ '(mmCif(=cif, default)|pdb)',
115
+ choices=['mmCif', 'pdb', 'cif']
118
116
  )
119
117
 
120
118
  CMD_LINE.add_argument(
@@ -412,7 +410,8 @@ DIALOGS.add_option('metals', '--remove', 'remove', 'Remove Metal ions')
412
410
 
413
411
  DIALOGS.add_entry('water', 'Checks and optionally removes water molecules')
414
412
  DIALOGS.add_option('water', '--remove', 'remove', 'Remove All Water molecules')
415
- DIALOGS.add_option('water', '--keep_min_contacts', 'keep', 'Remove All Water molecules with less contacts')
413
+ DIALOGS.add_option('water', '--keep_min_contacts', 'keep',
414
+ 'Remove All Water molecules with less contacts')
416
415
 
417
416
  DIALOGS.add_entry(
418
417
  'ligands',
@@ -519,6 +518,14 @@ DIALOGS.add_option(
519
518
  'Replace extra_gap additional flanking residues',
520
519
  int
521
520
  )
521
+ DIALOGS.add_option(
522
+ 'backbone',
523
+ '--fix_known',
524
+ 'fix_known',
525
+ 'Optimize only the missing residues with Modeller, '
526
+ 'the residues in the structure keep their coordinates',
527
+ 'bool'
528
+ )
522
529
  DIALOGS.add_option(
523
530
  'backbone',
524
531
  '--no_recheck',
@@ -652,6 +659,7 @@ MSGS = {
652
659
  'use --limit to adjust',
653
660
  'TIME_LIMIT': 'Execution time limit ({}s) exceeded, aborting, use --time_limit to adjust',
654
661
  'CA_ONLY_STRUCTURE': 'CA-Only structure, skipping',
662
+ 'NO_NETWORK': 'Network disabled, unable to download {}, and no cached file available',
655
663
  # command line
656
664
  'ERROR_OPEN_FILE': 'Error when opening file',
657
665
  'COMMAND_LIST_COMPLETED': 'Command list completed',
@@ -683,6 +691,8 @@ MSGS = {
683
691
  # altloc
684
692
  'ALTLOC_FOUND': 'Detected {} residues with alternative location labels',
685
693
  'NO_ALTLOC_FOUND': 'Detected no residues with alternative location labels',
694
+ 'ALTLOC_NO_A': 'Possible microheterogeneity: No A altloc found',
695
+ 'ALTLOC_NO_SELECTION': 'No selection made, keeping all alternative locations',
686
696
  # metals
687
697
  'METALS_FOUND': 'Found {} Metal ions',
688
698
  'NO_METALS_FOUND': 'No metal ions found',
@@ -783,7 +793,7 @@ def help(command=None):
783
793
  DATA_DIR_DEFAULT_PATH,
784
794
  COMMANDS_HELP_PATH
785
795
  )
786
- with open(help_path) as help_file:
796
+ with open(help_path, 'r', encoding='utf-8') as help_file:
787
797
  print(help_file.read())
788
798
  else:
789
799
  DIALOGS.get_parameter(command, '', print_help=True)
@@ -70,6 +70,7 @@ backbone [--fix_atoms All|None|Residue List]
70
70
  [--fix_chain All|None|Break list]
71
71
  [--add_caps All|None|Break list]
72
72
  [--extra_gap]
73
+ [--fix_known]
73
74
  [--no_recheck]
74
75
  [--no_check_clashes]
75
76
  Analyze main chain missing atoms and fragments (protein only).
@@ -77,6 +78,7 @@ backbone [--fix_atoms All|None|Residue List]
77
78
  --fix_chain Missing fragments filled using comparative modelling (Modeller License needed)
78
79
  --add_caps Adds ACE and NME residues as necessary, preserving existing atoms
79
80
  --extra_gap Recovers additional residues from model either side of the break, helps to fix loop connections (experimental)
81
+ --fix_known Optimizes only the missing residues with Modeller, the residues in the structure keep their coordinates
80
82
  Rechecks beckbone on each op unless --no_recheck is set.
81
83
  Generated clashes are checked unless --no_check_clashes
82
84