Skip to content

Commit

Permalink
feat: allow setting the label_entity_id in the cif from the atom ar…
Browse files Browse the repository at this point in the history
…ray, if it is annotated. This is a standard category that comes with CIF files (https://mmcif.wwpdb.org/dictionaries/mmcif_pdbx_v50.dic/Items/_atom_site.label_entity_id.html)
  • Loading branch information
Croydon-Brixton committed Jan 5, 2025
1 parent e76eb24 commit 68e593a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/biotite/structure/io/pdbx/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,11 @@ def set_structure(
)
atom_site["label_comp_id"] = np.copy(array.res_name)
atom_site["label_asym_id"] = np.copy(array.chain_id)
atom_site["label_entity_id"] = _determine_entity_id(array.chain_id)
atom_site["label_entity_id"] = (
np.copy(array.label_entity_id)
if "label_entity_id" in array.get_annotation_categories()
else _determine_entity_id(array.chain_id)
)
atom_site["label_seq_id"] = np.copy(array.res_id)
atom_site["pdbx_PDB_ins_code"] = Column(
np.copy(array.ins_code),
Expand Down

0 comments on commit 68e593a

Please sign in to comment.