Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
SamCox822 committed Aug 6, 2024
1 parent b1ed791 commit 4d52dd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ class ComputeDSSP(BaseTool):
simplified: bool = True
last_only: bool = True

def __init__(self, path_registry: PathRegistry, simplified: bool = True, last_only=True):
def __init__(
self, path_registry: PathRegistry, simplified: bool = True, last_only=True
):
super().__init__()
self.path_registry = path_registry
self.simplified = simplified
self.last_only=last_only
self.last_only = last_only

def _dssp_codes(self) -> list[str]:
"""
Expand Down Expand Up @@ -162,7 +164,7 @@ def _run(self, traj_file: str, top_file: Optional[str] = None) -> str:
)
if not traj:
raise Exception("Trajectory could not be loaded.")
if self.last_only and len(traj)>1:
if self.last_only and len(traj) > 1:
traj = traj[-1]
except Exception as e:
print("Error loading trajectory: ", e)
Expand Down
2 changes: 2 additions & 0 deletions tests/test_analysis/test_secondary_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ def compute_dssp_simple(get_registry):
registry = get_registry("raw", True)
return ComputeDSSP(path_registry=registry, simplified=True)


@pytest.fixture
def compute_dssp(get_registry):
registry = get_registry("raw", True)
return ComputeDSSP(path_registry=registry, simplified=False)


def test_compute_dssp(loaded_cif_traj, compute_dssp_simple, compute_dssp):
dssp_simple = compute_dssp_simple._compute_dssp(loaded_cif_traj)
assert dssp_simple.shape[1] == 374
Expand Down

0 comments on commit 4d52dd5

Please sign in to comment.