diff --git a/modules/mol/base/doc/entity.rst b/modules/mol/base/doc/entity.rst
index 6d036a70bf3e287cad950c7b55734d6e915f75fb..7d5bfd7f749b6b17c4341751bcdb3c9ec7aa759f 100644
--- a/modules/mol/base/doc/entity.rst
+++ b/modules/mol/base/doc/entity.rst
@@ -520,16 +520,16 @@ The Handle Classes
   
   .. attribute:: chem_class
   
-    The chemical class of a residue is used to broadly categorize residues based
-    on their chemical properties. For example, peptides belong to the
-    `L_PEPTIDE_LINKING` or `D_PEPTIDE_LINKING` classes.
+    The chemical class of the residue.
+
+    :type: :class:`ChemClass`
 
   .. attribute:: chem_type
 
-    The chemical type of a residue is a classification of all compounds
-    obtained from the PDB component dictionary. For example, ions belong to the
-    class `ChemType::IONS`, amino acids to `ChemType::AMINOACIDS`. The type is
-    only properly set if a compund library is used.
+    The chemical type of the residue. The type is only properly set if a
+    compound library is used.
+
+    :type: :class:`ChemType`
   
   .. attribute:: sec_structure
   
@@ -1835,11 +1835,116 @@ SecStructure
   .. hlist::
     :columns: 2
 
-    * ALPHA_HELIX     = 'H'
-    * PI_HELIX        = 'I'
-    * THREE_TEN_HELIX = 'G'
-    * EXTENDED        = 'E'
-    * BETA_BRIDGE     = 'B'
-    * TURN            = 'T'
-    * BEND            = 'S'
-    * COIL            = 'C'
+    * ``ALPHA_HELIX``     = 'H'
+    * ``PI_HELIX``        = 'I'
+    * ``THREE_TEN_HELIX`` = 'G'
+    * ``EXTENDED``        = 'E'
+    * ``BETA_BRIDGE``     = 'B'
+    * ``TURN``            = 'T'
+    * ``BEND``            = 'S'
+    * ``COIL``            = 'C'
+
+
+ChemClass
+--------------------------------------------------------------------------------
+
+.. class:: ChemClass(chem_class)
+
+  The chemical class is used to broadly categorize residues based on their
+  chemical properties. For example, peptides belong to some PEPTIDE_LINKING
+  class. Possible values as constant variable names and as characters:
+
+  .. hlist::
+    :columns: 2
+
+    * ``PEPTIDE_LINKING``   = 'P'
+    * ``D_PEPTIDE_LINKING`` = 'D'
+    * ``L_PEPTIDE_LINKING`` = 'L'
+    * ``RNA_LINKING``       = 'R'
+    * ``DNA_LINKING``       = 'S'
+    * ``NON_POLYMER``       = 'N'
+    * ``L_SACCHARIDE``      = 'X'
+    * ``D_SACCHARIDE``      = 'Y'
+    * ``SACCHARIDE``        = 'Z'
+    * ``WATER``             = 'W'
+    * ``UNKNOWN``           = 'U'
+
+  Python can implicitly convert characters to objects of this type.
+
+  :param chem_class: Chemical class to set.
+  :type chem_class:  :class:`str`
+
+  .. method:: IsPeptideLinking
+
+    :return: True, if set class is PEPTIDE_LINKING, D_PEPTIDE_LINKING or
+             L_PEPTIDE_LINKING
+
+  .. method:: IsNucleotideLinking
+
+    :return: True, if set class is RNA_LINKING or DNA_LINKING
+  
+
+ChemType
+--------------------------------------------------------------------------------
+
+.. class:: ChemType
+
+  The chemical type of a residue is a classification of all compounds obtained
+  from the PDB component dictionary. For example, ions belong to the class IONS,
+  amino acids to AMINOACIDS. Possible values as constant variable names and as
+  characters:
+
+  .. hlist::
+    :columns: 2
+
+    * ``IONS``             = 'I'
+    * ``NONCANONICALMOLS`` = 'M'
+    * ``SACCHARIDES``      = 'S'
+    * ``NUCLEOTIDES``      = 'N'
+    * ``AMINOACIDS``       = 'A'
+    * ``COENZYMES``        = 'E'
+    * ``WATERCOORDIONS``   = 'C'
+    * ``DRUGS``            = 'D'
+    * ``WATERS``           = 'W'
+    * ``UNKNOWN``          = 'U'
+
+  Python can implicitly convert characters to objects of this type.
+
+  :param chem_type: Chemical type to set.
+  :type chem_type:  :class:`str`
+
+  .. method:: IsIon
+
+    :return: True, if set type is IONS or WATERCOORDIONS
+
+  .. method:: IsNucleotide
+
+    :return: True, if set type is NUCLEOTIDES
+
+  .. method:: IsSaccharide
+
+    :return: True, if set type is SACCHARIDES
+
+  .. method:: IsAminoAcid
+
+    :return: True, if set type is AMINOACIDS
+
+  .. method:: IsCoenzyme
+
+    :return: True, if set type is COENZYMES
+
+  .. method:: IsDrug
+
+    :return: True, if set type is DRUGS
+
+  .. method:: IsNonCanonical
+
+    :return: True, if set type is NONCANONICALMOLS
+
+  .. method:: IsWater
+
+    :return: True, if set type is WATERS
+
+  .. method:: IsKnown
+
+    :return: True, if set type is not UNKNOWN
diff --git a/modules/mol/base/doc/query.rst b/modules/mol/base/doc/query.rst
index 8d5a6328658829756c9d227e76061c3efd043d55..54380f93f0f8b952934e31ef8aea865b1b89cbd8 100644
--- a/modules/mol/base/doc/query.rst
+++ b/modules/mol/base/doc/query.rst
@@ -273,3 +273,13 @@ In the following, the interface of the query class is described. In general, you
   .. method:: IsResidueSelected(residue)
   
     Returns true, when at least one atom of the residue matches the predicates.
+
+.. class:: QueryFlag
+
+  Defines flags to change default behaviour of Select queries. Possible values:
+
+  * ``EXCLUSIVE_BONDS`` - adds bonds to the :class:`EntityView` when at least
+    one of the two bonded atoms was selected (by default both must be selected)
+  * ``NO_BONDS`` - do not include any bonds (by default bonds are included)
+  * ``MATCH_RESIDUES`` - include all atoms of a residue if any of its atoms is
+    selected (by default only selected atoms are included)
diff --git a/modules/mol/base/src/chem_class.hh b/modules/mol/base/src/chem_class.hh
index 73ff48698baf5997d86284f0863be6d2358b8324..97f80f23e393d04c86cd377966b6bc7bb46e41a5 100644
--- a/modules/mol/base/src/chem_class.hh
+++ b/modules/mol/base/src/chem_class.hh
@@ -29,11 +29,11 @@ struct DLLEXPORT ChemClass {
   const static char PEPTIDE_LINKING   ='P';
   const static char D_PEPTIDE_LINKING ='D';
   const static char L_PEPTIDE_LINKING ='L';
-  const static char RNA_LINKING       ='R';  
-  const static char DNA_LINKING       ='S';    
+  const static char RNA_LINKING       ='R';
+  const static char DNA_LINKING       ='S';
   const static char NON_POLYMER       ='N';
   const static char L_SACCHARIDE      ='X';
-  const static char D_SACCHARIDE      ='Y';    
+  const static char D_SACCHARIDE      ='Y';
   const static char SACCHARIDE        ='Z';
   const static char WATER             ='W';
   const static char UNKNOWN           ='U';
diff --git a/modules/mol/base/src/sec_structure.hh b/modules/mol/base/src/sec_structure.hh
index 22779ed8118bdd9743e2f602b9a30d96c3ef1d72..f76b0e5f9c4508d76ed52f2efd41bc2f7c5a3aec 100644
--- a/modules/mol/base/src/sec_structure.hh
+++ b/modules/mol/base/src/sec_structure.hh
@@ -28,10 +28,10 @@ namespace ost { namespace mol {
 /// format.
 struct DLLEXPORT_OST_MOL SecStructure {
   typedef enum {
-    ALPHA_HELIX     ='H', 
-    PI_HELIX        ='I', 
+    ALPHA_HELIX     ='H',
+    PI_HELIX        ='I',
     THREE_TEN_HELIX ='G',
-    TURN            ='T',  
+    TURN            ='T',
     EXTENDED        ='E',
     BETA_BRIDGE     ='B',
     BEND            ='S',