From 0dfc86836474b9bbcf98d4308dc18aa3a3236dfe Mon Sep 17 00:00:00 2001
From: Gerardo Tauriello <gerardo.tauriello@unibas.ch>
Date: Wed, 26 Jul 2017 14:10:55 +0200
Subject: [PATCH] Added doc for SecStructure.

---
 modules/mol/base/doc/entity.rst | 50 ++++++++++++++++++++++++++++++++-
 modules/mol/base/doc/query.rst  |  2 +-
 2 files changed, 50 insertions(+), 2 deletions(-)

diff --git a/modules/mol/base/doc/entity.rst b/modules/mol/base/doc/entity.rst
index 192d3e27a..6d036a70b 100644
--- a/modules/mol/base/doc/entity.rst
+++ b/modules/mol/base/doc/entity.rst
@@ -534,6 +534,8 @@ The Handle Classes
   .. attribute:: sec_structure
   
     The secondary structure of the residue.
+
+    :type: :class:`SecStructure`
   
   .. attribute:: is_ligand
   
@@ -1755,7 +1757,7 @@ here.
     ``CHAINTYPE_POLY_PEPTIDE_D``, ``CHAINTYPE_POLY_PEPTIDE_L``,
     ``CHAINTYPE_POLY_DN``, ``CHAINTYPE_POLY_RN``, ``CHAINTYPE_POLY_SAC_D``,
     ``CHAINTYPE_POLY_SAC_L``, ``CHAINTYPE_POLY_DN_RN``,
-    ``CHAINTYPE_UNKNOWN``, ``CHAINTYPE_N_CHAINTYPES``  
+    ``CHAINTYPE_UNKNOWN``, ``CHAINTYPE_N_CHAINTYPES``
 
   Where ``CHAINTYPE_N_CHAINTYPES`` holds the number of different types available.
 
@@ -1795,3 +1797,49 @@ ViewAddFlags
   * ``CHECK_DUPLICATES`` - If set, it will be checked that no duplicates are
     created when adding a new handle
 
+
+SecStructure
+--------------------------------------------------------------------------------
+
+.. class:: SecStructure(type)
+
+  Defines a secondary structure type following the types defined by DSSP.
+
+  :param type: Type to be set for this object.
+  :type type:  :class:`SecStructure.Type` / :class:`str`
+
+  .. method:: IsHelical
+
+    :return: True, if the set type is any type of helix (i.e. ALPHA_HELIX,
+             PI_HELIX or THREE_TEN_HELIX)
+  
+  .. method:: IsExtended
+
+    :return: True, if the set type is any type of beta sheet (i.e. EXTENDED,
+             BETA_BRIDGE)
+
+  .. method:: IsCoil
+
+    :return: True, if the set type is any type of coil (i.e. TURN, BEND or COIL)
+
+  .. method:: __str__
+
+    :return: The character corresponding to the set type (see
+             :class:`SecStructure.Type`)
+
+.. class:: SecStructure.Type
+
+  Enumerates all popssible secondary structure types distinguished by DSSP.
+  Their values with the corresponding character code are listed here:
+
+  .. hlist::
+    :columns: 2
+
+    * ALPHA_HELIX     = 'H'
+    * PI_HELIX        = 'I'
+    * THREE_TEN_HELIX = 'G'
+    * EXTENDED        = 'E'
+    * BETA_BRIDGE     = 'B'
+    * TURN            = 'T'
+    * BEND            = 'S'
+    * COIL            = 'C'
diff --git a/modules/mol/base/doc/query.rst b/modules/mol/base/doc/query.rst
index d187296d4..8d5a63286 100644
--- a/modules/mol/base/doc/query.rst
+++ b/modules/mol/base/doc/query.rst
@@ -187,7 +187,7 @@ numeric part is honored.
  
 **rtype** (str): Residue type as given by the DSSP code (e.g. "H" for alpha
 helix, "E" for extended), "helix" for all helix types, "ext" or "strand" for
-all beta sheets or "coil" for any type of coil.
+all beta sheets or "coil" for any type of coil (see :class:`SecStructure`).
   
 **rindex** (int): :attr:`Index<ResidueHandle.index>` of residue handle in chain.
 This index is the same for views and handles.
-- 
GitLab