Skip to content

Commit

Permalink
ResidueContacts: bugfix for residues without any in-chain contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
avivrosenberg committed Jun 15, 2024
1 parent 2712b59 commit d11aed5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/pp5/contacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,13 +570,12 @@ def _format(_contacts: Sequence[ResidueContact]) -> Sequence[str]:
for _contact in _contacts
)

contact_smax = max(
[
c.seq_dist
for c in contacts
if (c.seq_dist is not None and c.type == CONTACT_TYPE_AAA)
]
)
seq_dists = [
c.seq_dist
for c in contacts
if (c.seq_dist is not None and c.type == CONTACT_TYPE_AAA)
]
contact_smax = max(seq_dists) if seq_dists else 0
contact_ooc = _format([c for c in contacts if c.type == CONTACT_TYPE_OOC])
contact_non_aa = _format([c for c in contacts if c.type == CONTACT_TYPE_LIG])
contact_aas = _format([c for c in contacts if c.type == CONTACT_TYPE_AAA])
Expand Down

0 comments on commit d11aed5

Please sign in to comment.