diff --git a/modules/mol/base/pymod/export_coord_group.cc b/modules/mol/base/pymod/export_coord_group.cc index 4ada5f884128222afb2ea55057274be43f2df5f9..6bdeb1d6958f797898aea3a2915a3063daf10dea 100644 --- a/modules/mol/base/pymod/export_coord_group.cc +++ b/modules/mol/base/pymod/export_coord_group.cc @@ -48,6 +48,7 @@ void export_CoordGroup() .def("IsValid",&CoordGroupHandle::IsValid) .def("GetEntity",&CoordGroupHandle::GetEntity) .def("GetAtomCount",&CoordGroupHandle::GetAtomCount) + .def("GetFrame",&CoordGroupHandle::GetFrame2) .def("AddFrames", &CoordGroupHandle::AddFrames) .def("AddFrame", add_frame1) .def("AddFrame", add_frame2) diff --git a/modules/mol/base/src/coord_group.cc b/modules/mol/base/src/coord_group.cc index 949199240497fcbee751dce8c85639bf22c246cf..db3fd341ce04a76c6e928ca1e0fd93e869b583c7 100644 --- a/modules/mol/base/src/coord_group.cc +++ b/modules/mol/base/src/coord_group.cc @@ -152,7 +152,13 @@ CoordFramePtr CoordGroupHandle::GetFrame(uint frame) const this->CheckValidity(); return source_->GetFrame(frame); } - + +CoordFrame CoordGroupHandle::GetFrame2(uint frame) +{ + this->CheckValidity(); + return *(source_->GetFrame(frame)); +} + AtomHandleList CoordGroupHandle::GetAtomList() const { this->CheckValidity(); diff --git a/modules/mol/base/src/coord_group.hh b/modules/mol/base/src/coord_group.hh index 8aa907f4fd050411998b7973e4390e563912da9d..652fe34636d3dc11c7fa5168c83c05d906b6524a 100644 --- a/modules/mol/base/src/coord_group.hh +++ b/modules/mol/base/src/coord_group.hh @@ -86,6 +86,7 @@ public: AtomHandleList GetAtomList() const; CoordFramePtr GetFrame(uint frame) const; + CoordFrame GetFrame2(uint frame); /// \brief return a filtered coord group, containing only the atoms in the /// view