From e8f65d2825357907797089fed9ee10d04e6b30fc Mon Sep 17 00:00:00 2001
From: Xavier Robin <xavier.robin@unibas.ch>
Date: Wed, 18 Jan 2023 10:40:20 +0100
Subject: [PATCH] doc: IsLigand and IsProtein

---
 modules/mol/base/doc/entity.rst          | 26 ++++++++++++++++++++++++
 modules/mol/base/pymod/export_residue.cc |  4 ++--
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/modules/mol/base/doc/entity.rst b/modules/mol/base/doc/entity.rst
index a0946b7f4..1415337f3 100644
--- a/modules/mol/base/doc/entity.rst
+++ b/modules/mol/base/doc/entity.rst
@@ -691,6 +691,8 @@ The Handle Classes
     pdb.org. When loading MMCIF structures, this property is set based on
     `seqres` information and differs from PDB structures.
     Also available as :meth:`IsLigand`, :meth:`SetIsLigand`.
+
+    :type: bool
   
   .. attribute:: is_protein
   
@@ -701,6 +703,8 @@ The Handle Classes
     :meth:`IsPeptideLinking` this excludes residues which are not connected to
     neighbouring residues such as CA-only residues or badly positioned ones.
 
+    :type: bool
+
   .. attribute:: peptide_linking
   
     Whether residue can form peptide bonds. This is determined based on
@@ -857,6 +861,28 @@ The Handle Classes
   
     See :attr:`valid`
 
+  .. method:: IsLigand()
+
+    See :attr:`is_ligand`
+
+  .. method:: SetIsLigand()
+
+    Set the :meth:`IsLigand` flag explicitly.
+
+    :param ligand: Whether this residue is a ligand or not
+    :type  ligand: bool
+
+  .. method:: IsProtein()
+
+    See :attr:`is_protein`
+
+  .. method:: SetIsProtein()
+
+    Set the :meth:`IsProtein` flag explicitly.
+
+    :param protein: Whether this residue is a protein or not
+    :type  protein: bool
+
 
 .. class:: AtomHandle
 
diff --git a/modules/mol/base/pymod/export_residue.cc b/modules/mol/base/pymod/export_residue.cc
index d4b741d3b..8a6fbe99e 100644
--- a/modules/mol/base/pymod/export_residue.cc
+++ b/modules/mol/base/pymod/export_residue.cc
@@ -214,10 +214,10 @@ void export_Residue()
     .add_property("chem_type", &ResidueBase::GetChemType)
     .add_property("is_ligand", &ResidueBase::IsLigand, &ResidueBase::SetIsLigand)
     .def("IsLigand", &ResidueBase::IsLigand)
-    .def("SetIsLigand", &ResidueBase::SetIsLigand)
+    .def("SetIsLigand", &ResidueBase::SetIsLigand, arg("ligand"))
     .add_property("is_protein", &ResidueBase::IsProtein,
                                 &ResidueBase::SetIsProtein)
-    .def("IsProtein", &ResidueBase::IsProtein)
+    .def("IsProtein", &ResidueBase::IsProtein, arg("protein"))
     .def("SetIsProtein", &ResidueBase::SetIsProtein)
     .add_property("number",
                    make_function(&ResidueBase::GetNumber,
-- 
GitLab