gemmi-protools 0.1.11__py3-none-any.whl → 0.1.13__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.
- gemmi_protools/io/reader.py +1 -9
- gemmi_protools/utils/fixer.py +14 -21
- {gemmi_protools-0.1.11.dist-info → gemmi_protools-0.1.13.dist-info}/METADATA +1 -1
- {gemmi_protools-0.1.11.dist-info → gemmi_protools-0.1.13.dist-info}/RECORD +7 -7
- {gemmi_protools-0.1.11.dist-info → gemmi_protools-0.1.13.dist-info}/WHEEL +0 -0
- {gemmi_protools-0.1.11.dist-info → gemmi_protools-0.1.13.dist-info}/licenses/LICENSE +0 -0
- {gemmi_protools-0.1.11.dist-info → gemmi_protools-0.1.13.dist-info}/top_level.txt +0 -0
gemmi_protools/io/reader.py
CHANGED
|
@@ -88,15 +88,7 @@ class StructureParser(object):
|
|
|
88
88
|
resolution_remarks = ["%-80s" % "REMARK 2",
|
|
89
89
|
"%-80s" % rs]
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
for line in struct.raw_remarks:
|
|
93
|
-
if "REMARK 2 RESOLUTION" in line:
|
|
94
|
-
resolution_remark_exist = True
|
|
95
|
-
|
|
96
|
-
if not resolution_remark_exist:
|
|
97
|
-
struct.raw_remarks = resolution_remarks + struct.raw_remarks
|
|
98
|
-
|
|
99
|
-
struct.raw_remarks = compound_source + struct.raw_remarks
|
|
91
|
+
struct.raw_remarks = compound_source + resolution_remarks
|
|
100
92
|
if write_minimal_pdb:
|
|
101
93
|
struct.write_minimal_pdb(outfile)
|
|
102
94
|
else:
|
gemmi_protools/utils/fixer.py
CHANGED
|
@@ -196,21 +196,17 @@ def repair_structure(input_file: str,
|
|
|
196
196
|
############################################################
|
|
197
197
|
# Check and convert input_file to .pdb if not
|
|
198
198
|
############################################################
|
|
199
|
+
input_file = str(pathlib.Path(input_file).expanduser().resolve())
|
|
200
|
+
output_file = str(pathlib.Path(output_file).expanduser().resolve())
|
|
201
|
+
# input_file and output_file can't be the same path
|
|
202
|
+
assert input_file != output_file, "input_file and output_file can't be the same path"
|
|
203
|
+
|
|
199
204
|
assert os.path.splitext(output_file)[1] == ".pdb", "output_file Not .pdb: %s" % output_file
|
|
200
205
|
assert _is_cif(input_file) or _is_pdb(input_file), "Not .pdb or .cif or .pdb.gz or .cif.gz: %s" % input_file
|
|
201
206
|
|
|
202
|
-
# input_file and output_file can't be the same path
|
|
203
|
-
p_in = pathlib.Path(input_file).expanduser().resolve()
|
|
204
|
-
p_out = pathlib.Path(output_file).expanduser().resolve()
|
|
205
|
-
|
|
206
|
-
assert str(p_in) != str(p_out), "input_file and output_file can't be the same path"
|
|
207
207
|
############################################################
|
|
208
208
|
# Config Path
|
|
209
209
|
############################################################
|
|
210
|
-
file_name = os.path.basename(input_file)
|
|
211
|
-
stem_name = os.path.splitext(file_name)[0]
|
|
212
|
-
|
|
213
|
-
in_dir = os.path.dirname(input_file)
|
|
214
210
|
out_dir = os.path.dirname(output_file)
|
|
215
211
|
if not os.path.isdir(out_dir):
|
|
216
212
|
os.makedirs(out_dir)
|
|
@@ -220,16 +216,14 @@ def repair_structure(input_file: str,
|
|
|
220
216
|
shutil.rmtree(temp_dir)
|
|
221
217
|
os.makedirs(temp_dir)
|
|
222
218
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
file_name_r = file_name
|
|
232
|
-
in_dir_r = in_dir
|
|
219
|
+
# for fix the filename bug of foldx
|
|
220
|
+
# rename the input always and save to .pdb
|
|
221
|
+
# convert to .pdb
|
|
222
|
+
st = StructureParser()
|
|
223
|
+
st.load_from_file(input_file)
|
|
224
|
+
file_name_r = "in.pdb"
|
|
225
|
+
in_dir_r = temp_dir
|
|
226
|
+
st.to_pdb(os.path.join(in_dir_r, file_name_r))
|
|
233
227
|
|
|
234
228
|
foldx_path = shutil.which("foldx")
|
|
235
229
|
if foldx_path is None:
|
|
@@ -250,7 +244,6 @@ def repair_structure(input_file: str,
|
|
|
250
244
|
repair_cmd.append("--complexWithRNA true")
|
|
251
245
|
|
|
252
246
|
command_settings = ["cd %s &&" % temp_dir] + repair_cmd + ["&& cd %s" % cwd_dir]
|
|
253
|
-
|
|
254
247
|
start = time.time()
|
|
255
248
|
try:
|
|
256
249
|
result = subprocess.run(" ".join(command_settings), shell=True, check=True,
|
|
@@ -266,7 +259,7 @@ def repair_structure(input_file: str,
|
|
|
266
259
|
else:
|
|
267
260
|
if msg_str == "Finished":
|
|
268
261
|
# just keep .pdb, ignore .fxout
|
|
269
|
-
result_file = os.path.join(temp_dir, "
|
|
262
|
+
result_file = os.path.join(temp_dir, "in_Repair.pdb")
|
|
270
263
|
if os.path.exists(result_file):
|
|
271
264
|
shutil.move(result_file, output_file)
|
|
272
265
|
else:
|
|
@@ -6,15 +6,15 @@ gemmi_protools/io/parse_pdb_header.py,sha256=UOGMsE3-d3APhO7zaAEE0NT31n-iqt55VpD
|
|
|
6
6
|
gemmi_protools/io/parser.py,sha256=HFc4Kovr6rxEpLAEDUtF_e-RnA5OsWMeMFjuVNm7UYY,9507
|
|
7
7
|
gemmi_protools/io/pdb_opts.py,sha256=laUqxlecOe6goax12q8EJGZuZbHyIGsXVucMV3gVrgg,5741
|
|
8
8
|
gemmi_protools/io/peptide.py,sha256=a2wiEutJmvhl6gDCIzzqRCbmyknk2mwgy2FZ53lXclU,750
|
|
9
|
-
gemmi_protools/io/reader.py,sha256=
|
|
9
|
+
gemmi_protools/io/reader.py,sha256=2AXg1JdYT2LxL6jWVsJkLHQREwAoYR7V-g-hQVgSgGg,16237
|
|
10
10
|
gemmi_protools/io/struct_info.py,sha256=9nBj1Zer03S8_Wks7L7uRlc9PlbfCKzoaT32pKR58X8,2769
|
|
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=
|
|
14
|
+
gemmi_protools/utils/fixer.py,sha256=WCk2BztM4tSKWp0EGoBFK4Rge330_7LPXNe2kmk-9f0,10046
|
|
15
15
|
gemmi_protools/utils/ppi.py,sha256=VWYsdxWwQoS1xwEYj5KB96Zz3F8r5Eyuw6NT3ReD-wc,2330
|
|
16
|
-
gemmi_protools-0.1.
|
|
17
|
-
gemmi_protools-0.1.
|
|
18
|
-
gemmi_protools-0.1.
|
|
19
|
-
gemmi_protools-0.1.
|
|
20
|
-
gemmi_protools-0.1.
|
|
16
|
+
gemmi_protools-0.1.13.dist-info/licenses/LICENSE,sha256=JuQvKcgj6n11y5y6nXr9rABv3gJSswc4eTCd5WZBtSY,1062
|
|
17
|
+
gemmi_protools-0.1.13.dist-info/METADATA,sha256=pfbi9HsUmoRy6ABRoqTu5IrmaAs2ACc81On-37f1VuI,568
|
|
18
|
+
gemmi_protools-0.1.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
gemmi_protools-0.1.13.dist-info/top_level.txt,sha256=P12mYJi5O5EKIn5u-RFaWxuix431CgLacSRD7rBid_U,15
|
|
20
|
+
gemmi_protools-0.1.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|