From 4a0169e69fe7b16276d1632b733e1233517eacd9 Mon Sep 17 00:00:00 2001 From: B13nch3n <stefan.bienert@me.com> Date: Tue, 21 Jul 2020 15:32:27 +0200 Subject: [PATCH] SCHWED-4848: Gather ChainHandles of branched entities, Python export --- modules/io/pymod/export_mmcif_io.cc | 1 + modules/io/tests/test_io_mmcif.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/modules/io/pymod/export_mmcif_io.cc b/modules/io/pymod/export_mmcif_io.cc index f64403548..ea953160f 100644 --- a/modules/io/pymod/export_mmcif_io.cc +++ b/modules/io/pymod/export_mmcif_io.cc @@ -415,6 +415,7 @@ void export_mmcif_io() .def("GetEntityBranchLinks", &MMCifInfo::GetEntityBranchLinks) .def("ConnectBranchLinks", &MMCifInfo::ConnectBranchLinks) .def("GetEntityBranchChainNames", &WrapGetNames) + .def("GetEntityBranchChains", &MMCifInfo::GetEntityBranchChains) .add_property("citations", make_function(&MMCifInfo::GetCitations, return_value_policy<copy_const_reference>())) .add_property("biounits", make_function(&MMCifInfo::GetBioUnits, diff --git a/modules/io/tests/test_io_mmcif.py b/modules/io/tests/test_io_mmcif.py index ad16f55e1..0da0a4c2e 100644 --- a/modules/io/tests/test_io_mmcif.py +++ b/modules/io/tests/test_io_mmcif.py @@ -302,6 +302,9 @@ class TestMMCifInfo(unittest.TestCase): chain_names = info.GetEntityBranchChainNames() self.assertEqual(chain_names, ['A', 'B']) + chains = info.GetEntityBranchChains() + self.assertEqual(chains[0].name, 'A') + self.assertEqual(chains[1].name, 'B') if __name__== '__main__': from ost import testutils -- GitLab