Skip to content

Commit

Permalink
fixup! Support metal coordination as bond type
Browse files Browse the repository at this point in the history
  • Loading branch information
padix-key committed Aug 29, 2024
1 parent eed6b48 commit 6e61017
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/biotite/structure/bonds.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,13 @@ class BondList(Copyable):
0 1 SINGLE
1 2 DOUBLE
"""
bonds = self._bonds
difference = BondType.AROMATIC_SINGLE - BondType.SINGLE
bonds[bonds[:, 2] >= BondType.AROMATIC_SINGLE, 2] -= difference
bond_types = self._bonds[:,2]
for aromatic_type, non_aromatic_type in [
(BondType.AROMATIC_SINGLE, BondType.SINGLE),
(BondType.AROMATIC_DOUBLE, BondType.DOUBLE),
(BondType.AROMATIC_TRIPLE, BondType.TRIPLE)
]:
bond_types[bond_types == aromatic_type] = non_aromatic_type

def remove_bond_order(self):
"""
Expand Down

0 comments on commit 6e61017

Please sign in to comment.