Skip to content
Snippets Groups Projects
Commit cc919347 authored by Niklaus Johner's avatar Niklaus Johner
Browse files

CoordGroupHandle::GetFramePositions

This function allows to extract the list of positions
of all the atoms in a given frame
I also added the export for it and for CoordGroupHandle::AddFrame
parent b12ef172
Branches
Tags
No related merge requests found
......@@ -47,7 +47,9 @@ void export_CoordGroup()
.def("GetEntity",&CoordGroupHandle::GetEntity)
.def("GetAtomCount",&CoordGroupHandle::GetAtomCount)
.def("AddFrames", &CoordGroupHandle::AddFrames)
.def("AddFrame", &CoordGroupHandle::AddFrame)
.def("GetFrameCount",&CoordGroupHandle::GetFrameCount)
.def("GetFramePositions",&CoordGroupHandle::GetFramePositions)
.def("SetFramePositions",&CoordGroupHandle::SetFramePositions)
.def("SetAtomPos",&CoordGroupHandle::SetAtomPos)
.def("GetAtomPos",&CoordGroupHandle::GetAtomPos)
......
......@@ -73,6 +73,14 @@ void CoordGroupHandle::SetFramePositions(uint frame,
//source_->SetFramePositions(frame, clist);
}
geom::Vec3List CoordGroupHandle::GetFramePositions(uint frame)
{
this->CheckValidity();
return *(this->GetFrame(frame));
}
void CoordGroupHandle::CopyFrame(uint frame)
{
this->CheckValidity();
......
......@@ -52,6 +52,9 @@ public:
/// initial atomlist
void SetFramePositions(uint frame, const std::vector<geom::Vec3>& clist);
/// \brief get the positions of all the atoms in the given frame
geom::Vec3List GetFramePositions(uint frame);
/// \brief copy atom positions of given frame to stored atoms in entity
void CopyFrame(uint frame);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment