Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
formatting
Browse files Browse the repository at this point in the history
SamCox822 committed Aug 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent b1ed791 commit 4d52dd5
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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]:
"""
@@ -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)
2 changes: 2 additions & 0 deletions tests/test_analysis/test_secondary_structure.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4d52dd5

Please sign in to comment.