Skip to content

Commit 3716dff

Browse files
fix: fixed handling of chains without helices
1 parent 9e93d0a commit 3716dff

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ursina-proteins"
3-
version = "1.5.2"
3+
version = "1.5.3"
44
description = "A Python package for rendering protein structures of PDB format in 3D using Ursina"
55
authors = [{ name = "HarrisonTCodes" }]
66
requires-python = ">=3.12"

src/ursina_proteins/protein.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,9 @@ def compute_helices_and_coils_meshes(
298298

299299
# Chain info
300300
chain_id = chain.get_id()
301+
chain_helices = self.helices.get(chain_id) or []
301302
chain_segments = parse_segments(
302-
self.helices[chain_id], len(carbon_alpha_coords), "helices", "coils"
303+
chain_helices, len(carbon_alpha_coords), "helices", "coils"
303304
)
304305

305306
# Render each segment (helices and coils)

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)