From fe4da76ed458a0e3c9a5d6cf2c751f90ec989648 Mon Sep 17 00:00:00 2001
From: Tobias Schmidt <tobias.schmidt@unibas.ch>
Date: Fri, 22 Jul 2011 20:20:08 +0200
Subject: [PATCH] add pyton export for residue

---
 modules/mol/base/pymod/export_residue.cc      | 1 +
 modules/mol/base/pymod/export_residue_view.cc | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/mol/base/pymod/export_residue.cc b/modules/mol/base/pymod/export_residue.cc
index 127de00e2..c4c43e5d8 100644
--- a/modules/mol/base/pymod/export_residue.cc
+++ b/modules/mol/base/pymod/export_residue.cc
@@ -157,6 +157,7 @@ void export_Residue()
   class_<ResidueHandle, bases<ResidueBase> >("ResidueHandle", init<>())
     .def("GetChain",&ResidueHandle::GetChain)
     .add_property("chain", &ResidueHandle::GetChain)
+    .def("GetEntity",&ResidueHandle::GetEntity)
     .add_property("entity", &ResidueHandle::GetEntity)
     .def("GetAtomList", &ResidueHandle::GetAtomList)
     .def("GetIndex", &ResidueHandle::GetIndex)
diff --git a/modules/mol/base/pymod/export_residue_view.cc b/modules/mol/base/pymod/export_residue_view.cc
index 699dbe34e..89c6eddc4 100644
--- a/modules/mol/base/pymod/export_residue_view.cc
+++ b/modules/mol/base/pymod/export_residue_view.cc
@@ -54,6 +54,9 @@ void export_ResidueView()
 
   class_<ResidueView, bases<ResidueBase> >("ResidueView", init<>())
     .def("GetChain",&ResidueView::GetChain)
+    .add_property("chain", &ResidueView::GetChain)
+    .def("GetEntity", &ResidueView::GetEntity)
+    .add_property("entity", &ResidueView::GetEntity)
     .def("GetAtomList", &ResidueView::GetAtomList,
          return_value_policy<copy_const_reference>())
     .def("GetAtomCount", &ResidueView::GetAtomCount)
@@ -66,8 +69,6 @@ void export_ResidueView()
     .def("FindAtom", handle_find_atom, args("atom_handle"))
     .def("IsAtomIncluded", &ResidueView::IsAtomIncluded, args("atom_handle"))
     .def("GetIndex", &ResidueView::GetIndex)  
-    .add_property("chain", &ResidueView::GetChain)
-    .add_property("entity", &ResidueView::GetEntity)
     .add_property("index", &ResidueView::GetIndex)
     .def("RemoveAtoms", &ResidueView::RemoveAtom)
     .def("IsValid", &ResidueView::IsValid)
-- 
GitLab