From 79ccf5b5f991a475a3d72e56a4d0fc82b9daa3a0 Mon Sep 17 00:00:00 2001
From: B13nch3n <b13nch3n_01@theb-si.de>
Date: Wed, 13 Apr 2022 14:52:06 +0200
Subject: [PATCH] Add proper struct.pdbx_description

---
 translate2modelcif.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/translate2modelcif.py b/translate2modelcif.py
index 8920779..cb28182 100644
--- a/translate2modelcif.py
+++ b/translate2modelcif.py
@@ -445,6 +445,7 @@ def _get_entities(pdb_file, up_acs):
         upkb = _get_upkb_for_sequence(sqe, up_acs[i])
         cif_ent["pdb_sequence"] = sqe
         cif_ent["pdb_chain_id"] = chn.name
+        cif_ent["description"] = f"Model of {upkb['up_gn']} ({upkb['up_ac']})"
         cif_ent.update(upkb)
         entities.append(cif_ent)
 
@@ -463,10 +464,9 @@ def _get_scores(data, prfx):
 def _get_modelcif_entities(target_ents, source, asym_units, system):
     """Create ModelCIF entities and asymmetric units."""
     for cif_ent in target_ents:
-        # ToDo [input]: Get entity description
         mdlcif_ent = modelcif.Entity(
             cif_ent["pdb_sequence"],
-            description="entity.pdbx_description",
+            description=cif_ent["description"],
             source=source,
             references=[
                 modelcif.reference.UniProt(
-- 
GitLab