Skip to content

Commit 3755c35

Browse files
committed
pdb fix
1 parent 745091a commit 3755c35

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/boltz/data/write/pdb.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,11 @@ def to_pdb(
151151
atom_index += 1
152152

153153
# Dump CONECT records.
154-
for bonds in [structure.bonds, structure.connections]:
154+
all_bonds = structure.bonds
155+
if hasattr(structure, "connections"):
156+
all_bonds = all_bonds + structure.connections
157+
158+
for bonds in all_bonds:
155159
for bond in bonds:
156160
atom1 = structure.atoms[bond["atom_1"]]
157161
atom2 = structure.atoms[bond["atom_2"]]

0 commit comments

Comments
 (0)