From 6a8f4a3a2614243015c26b9dd8c497d55753c242 Mon Sep 17 00:00:00 2001
From: B13nch3n <stefan.bienert@me.com>
Date: Fri, 17 Jul 2020 14:56:50 +0200
Subject: [PATCH] SCHWED-4850: Essential documentation

---
 modules/io/doc/mmcif.rst         | 74 ++++++++++++++++++++++++++++++--
 modules/io/src/mol/mmcif_info.hh |  2 +-
 2 files changed, 72 insertions(+), 4 deletions(-)

diff --git a/modules/io/doc/mmcif.rst b/modules/io/doc/mmcif.rst
index 33aa310fe..a2111f546 100644
--- a/modules/io/doc/mmcif.rst
+++ b/modules/io/doc/mmcif.rst
@@ -1203,15 +1203,83 @@ of the annotation available.
 
     See :attr:`first_release`
 
+.. class:: MMCifInfoEntityBranchLink
+
+  Data from ``pdbx_entity_branch``, most specifically
+  ``pdbx_entity_branch_link``. That is connectivity information for branched
+  entities, e.g. carbohydrates/ oligosaccharides.
+  :class:`Conop Processors <ost.conop.Processor>` can not easily connect them so
+  we use this information in :meth:`LoadMMCIF` to do that.
+
+  .. attribute:: atom1
+
+    The first atom of the bond. Corresponds to ``entity_branch_link.atom_id_1``,
+    ``entity_branch_link.comp_id_1`` and
+    ``entity_branch_link.entity_branch_list_num_1``. Also available via
+    :meth:`GetAtom1` and :meth:`SetAtom1`.
+
+    :type: :class:`~ost.mol.AtomHandle`
+
+  .. attribute:: atom2
+
+    The second atom of the bond. Corresponds to ``entity_branch_link.atom_id_2``,
+    ``entity_branch_link.comp_id_2`` and
+    ``entity_branch_link.entity_branch_list_num_2``. Also available via
+    :meth:`GetAtom2` and :meth:`SetAtom2`.
+
+    :type: :class:`~ost.mol.AtomHandle`
+
+  .. attribute:: bond_order
+
+    Order of a bond (e.g. 1=single, 2=double, 3=triple). Corresponds to
+    ``entity_branch_link.value_order``. Also available via :meth:`GetBondOrder`
+    and :meth:`SetBondOrder`.
+
+    :type: :class:`int`
+
+  .. method:: ConnectBranchLink(editor)
+
+    Establish a bond between :attr:`atom1` and :attr:`atom2` of a
+    :class:`MMCifInfoEntityBranchLink`.
+
+    :param editor: The editor instance to call for connecting the atoms.
+    :type editor: :class:`~ost.mol.XCSEditor`
+    :returns: Nothing
+
+  .. method:: GetAtom1
+
+    See :attr:`atom1`
+
+  .. method:: GetAtom2
+
+    See :attr:`atom2`
+
+  .. method:: GetBondOrder
+
+    See :attr:`bond_order`
+
+  .. method:: SetAtom1
+
+    See :attr:`atom1`
+
+  .. method:: SetAtom2
+
+    See :attr:`atom2`
+
+  .. method:: SetBondOrder
+
+    See :attr:`bond_order`
+
 ..  LocalWords:  cas isbn pubmed asu seqres conop ConnectAll casp COMPND OBSLTE
 ..  LocalWords:  SPRSDE pdb func autofunction exptl attr pdbx oper conf spr dif
 ..  LocalWords:  biounits biounit uniprot UNP seqs AddMMCifPDBChainTr cif asym
 ..  LocalWords:  auth GetMMCifPDBChainTr AddPDBCMMCifhainTr GetPDBMMCifChainTr
 ..  LocalWords:  GetRevisions AddRevision SetRevisionsDateOriginal GetSize
 ..  LocalWords:  GetNum num GetStatus GetLastDate GetFirstRelease storable
-..  LocalWords:  cas isbn pubmed asu seqres conop casp COMPND OBSLTE
+..  LocalWords:  cas isbn pubmed asu seqres conop casp COMPND OBSLTE LoadMMCIF
 ..  LocalWords:  SetChainList MMCifInfoTransOp ChainTypes MMCifInfoStructRef
 ..  LocalWords:  MMCifInfoRevisions bool difs MMCifInfoStructRefSeqDif rnum
 ..  LocalWords:  SetDateOriginal GetDateOriginal yyyy operationsintervalls
-..  LocalWords:  chainintervalls GetChainIntervalList GetMethodDetails
-..  LocalWords:  GetOperationsIntervalList SetMethodDetails
+..  LocalWords:  chainintervalls GetChainIntervalList GetMethodDetails GetAtom
+..  LocalWords:  GetOperationsIntervalList SetMethodDetails oligosaccharides
+..  LocalWords:  SetAtom GetBondOrder SetBondOrder MMCifInfoEntityBranchLink
diff --git a/modules/io/src/mol/mmcif_info.hh b/modules/io/src/mol/mmcif_info.hh
index 152371885..76d418147 100644
--- a/modules/io/src/mol/mmcif_info.hh
+++ b/modules/io/src/mol/mmcif_info.hh
@@ -919,7 +919,7 @@ private:
 	String details_;
 };
 
-/// \brief Store information on brnached structures (oligosaccharides)
+/// \brief Store information on branched structures (oligosaccharides)
 ///
 class DLLEXPORT_OST_IO MMCifInfoEntityBranchLink {
 public:
-- 
GitLab