Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/chilife/Topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,8 @@ def bonds_from_ccd_data(molsys, ccd_data):

if "chem_comp" in ccd_data[res.resname]:
res_ccd_data = ccd_data[res.resname]["chem_comp"]
if (
pres := res.previous_residue()
) is not None and "link type" in res_ccd_data:
link_type = res_ccd_data["link type"]
if (pres := res.previous_residue()) is not None and "type" in res_ccd_data:
link_type = res_ccd_data["type"].lower()
if link_type in POLYMER_LINKAGE_TYPES:
a1, a2, btype, bchiral = POLYMER_LINKAGE_TYPES[link_type]
i1 = pres.ix[pres.names == a1].flat[0]
Expand Down Expand Up @@ -477,4 +475,8 @@ def numpyify_ccd(ccd_data):


# Linkage data is atom name of the previous residue followed by atom name of the current residue followed by bond type
POLYMER_LINKAGE_TYPES = {"L-peptide linking": ["C", "N", BondType.SINGLE, "N"]}
POLYMER_LINKAGE_TYPES = {
"l-peptide linking": ["C", "N", BondType.SINGLE, "N"],
"peptide linking": ["C", "N", BondType.SINGLE, "N"],
"d-peptide linking": ["C", "N", BondType.SINGLE, "N"],
}
2 changes: 1 addition & 1 deletion src/chilife/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
# SpinLabel = SpinLabel.SpinLabel
# dSpinLabel = dSpinLabel.dSpinLabel

__version__ = "1.2.1"
__version__ = "1.2.2"
2 changes: 1 addition & 1 deletion tests/test_MolSys.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,5 +707,5 @@ def test_write_sdf():

def test_use_ccd():
mol = MolSys.from_pdb("test_data/7o1o.pdb", use_ccd=chilife.bio_ccd)
assert len(mol.bonds) == 5508
assert len(mol.bonds) == 5863
assert chilife.BondType.DOUBLE in mol.bond_types
Loading