Skip to content

Commit c68e7fe

Browse files
committed
linting
1 parent c865704 commit c68e7fe

File tree

2 files changed

+37
-22
lines changed

2 files changed

+37
-22
lines changed

.pylintrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,8 @@ disable=raw-checker-failed,
450450
too-many-instance-attributes,
451451
unused-argument,
452452
too-many-locals,
453+
too-many-statements,
454+
consider-using-with,
453455
unspecified-encoding,
454456
wrong-import-order,
455457
multiple-imports,

mdaf3/BoltzOutputParser.py

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
import h5py
77
import gzip
88

9-
class BoltzOutput():
9+
10+
class BoltzOutput:
1011

1112
def __init__(self, directory_path, **kwargs):
1213

@@ -34,54 +35,66 @@ def __init__(self, directory_path, **kwargs):
3435
best_model = dir_path / f"{self.job_name}_model_0.pdb"
3536
fmt = "pdb"
3637
if not best_model.exists():
37-
raise FileExistsError(f"No structure file found for {directory_path}")
38+
raise FileExistsError(
39+
f"No structure file found for {directory_path}"
40+
)
3841

3942
self.fmt = fmt
40-
4143

4244
def has_affinity(self):
43-
return (self.dir_path/ f"affinity_{self.job_name}.json").exists()
44-
45+
return (self.dir_path / f"affinity_{self.job_name}.json").exists()
46+
4547
def get_affinity_metrics(self):
4648
raise NotImplementedError
47-
49+
4850
def get_summary_metrics(self, sample_num=0):
49-
51+
5052
if self.compressed:
5153
raise NotImplementedError
52-
54+
5355
else:
54-
summ_dict = orjson.loads(open(self.dir_path / f"confidence_{self.job_name}_model_{sample_num}.json").read())
56+
summ_dict = orjson.loads(
57+
open(
58+
self.dir_path
59+
/ f"confidence_{self.job_name}_model_{sample_num}.json"
60+
).read()
61+
)
5562
return summ_dict
56-
63+
5764
def get_pae_ndarr(self, sample_num=0):
58-
65+
5966
if self.compressed:
6067
raise NotImplementedError
61-
62-
return np.load(self.dir_path / f"pae_{self.job_name}_model_{sample_num}.npz")["pae"]
68+
69+
return np.load(
70+
self.dir_path / f"pae_{self.job_name}_model_{sample_num}.npz"
71+
)["pae"]
6372

6473
def get_pde_ndarr(self, sample_num=0):
6574
if self.compressed:
6675
raise NotImplementedError
6776

68-
return np.load(self.dir_path / f"pde_{self.job_name}_model_{sample_num}.npz")["pde"]
69-
77+
return np.load(
78+
self.dir_path / f"pde_{self.job_name}_model_{sample_num}.npz"
79+
)["pde"]
80+
7081
def get_plddt_ndarr(self, sample_num=0):
7182
if self.compressed:
7283
raise NotImplementedError
73-
74-
return np.load(self.dir_path / f"plddt_{self.job_name}_model_{sample_num}.npz")["plddt"]
75-
84+
85+
return np.load(
86+
self.dir_path / f"plddt_{self.job_name}_model_{sample_num}.npz"
87+
)["plddt"]
88+
7689
def get_mda_universe(self, sample_num=0, **kwargs):
7790
if self.compressed:
7891
raise NotImplementedError
7992

80-
top_path = (self.dir_path / f"{self.job_name}_model_{sample_num}.{self.fmt}").as_posix()
81-
93+
top_path = (
94+
self.dir_path / f"{self.job_name}_model_{sample_num}.{self.fmt}"
95+
).as_posix()
8296

8397
return mda.Universe(top_path, topology_format=self.fmt, **kwargs)
84-
8598

8699
def compress(self):
87-
raise NotImplementedError
100+
raise NotImplementedError

0 commit comments

Comments
 (0)