Skip to content

Commit

Permalink
fix for lint
Browse files Browse the repository at this point in the history
  • Loading branch information
4eta committed Feb 26, 2024
1 parent 9751449 commit cf4f4da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions pacs/utils/fit.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import multiprocessing as mp
import subprocess
from pathlib import Path

from pacs.models.settings import MDsettings
Expand Down Expand Up @@ -55,7 +54,7 @@ def fit_mdtraj(settings: MDsettings, trj_file: str, out_file: str) -> None:
parent = Path(trj_file).parent
stem = Path(trj_file).stem
fit_trj_file = (
f"{parent}/{stem}_fit{ext}" if out_file == None else f"{parent}/{out_file}"
f"{parent}/{stem}_fit{ext}" if out_file is None else f"{parent}/{out_file}"
)

ref_structure = settings.reference
Expand Down
4 changes: 2 additions & 2 deletions pacs/utils/genfeature/genfeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def save(self, cycle: int, replica: int, features: np.ndarray) -> None:
features,
)
LOGGER.info(
f"feature of trial{self.trial:03}cycle{cycle:03}replica{replica:03} was saved at {self.output_directory}/"
f"feature of trial{self.trial:03}cycle{cycle:03}replica{replica:03} was saved at {self.output_directory}/" # noqa B950
)

def prepare(self) -> None:
Expand All @@ -43,7 +43,7 @@ def cal_parallel(self, calc_feature, *args, **kwargs) -> None:
exit(1)
cycle = re.findall(r"(\d+)", str(path))[1]
replica = re.findall(r"(\d+)", str(path))[2]
trj_path = f"./trial{self.trial:03}/cycle{cycle:03}/replica{replica:03}/{self.trj_filename}"
trj_path = f"./trial{self.trial:03}/cycle{cycle:03}/replica{replica:03}/{self.trj_filename}" # noqa B950

future = executor.submit(calc_feature, trj_path, *args, **kwargs)
job_dict_list.append(
Expand Down
2 changes: 1 addition & 1 deletion pacs/utils/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def parse(self) -> MDsettings:
"--keep_selection",
type=str,
required=True,
help='selection of molecules to be retained in trajectory files. (e.g. "not water")',
help='selection to be retained in trajectory files. (e.g. "not water")',
)
parser_rmmol_mdtraj.add_argument(
"-e",
Expand Down

0 comments on commit cf4f4da

Please sign in to comment.