Skip to content
Snippets Groups Projects
Commit 273def3e authored by Studer Gabriel's avatar Studer Gabriel
Browse files

export GetAltAtomGroupNames function for ResidueHandle

parent 47d03b83
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,16 @@ namespace {
return String(1, char(s));
}
boost::python::list get_alt_group_names(const ost::mol::ResidueHandle& res) {
std::vector<String> v_alt_group_names = res.GetAltAtomGroupNames();
boost::python::list alt_group_names;
for(std::vector<String>::iterator it = v_alt_group_names.begin();
it != v_alt_group_names.end(); ++it) {
alt_group_names.append(*it);
}
return alt_group_names;
}
typedef EntityView (ResidueHandle::*QueryMethod)(const Query&, uint) const;
typedef EntityView (ResidueHandle::*StringMethod)(const String&, uint) const;
QueryMethod select_query=&ResidueHandle::Select;
......@@ -239,6 +249,7 @@ void export_Residue()
.def("GetHandle", &ResidueHandle::GetHandle)
.add_property("handle", &ResidueHandle::GetHandle)
.def("HasAltAtomGroup", &ResidueHandle::HasAltAtomGroup)
.def("GetAltAtomGroupNames", &get_alt_group_names)
.def("GetCurrentAltGroupName", &ResidueHandle::GetCurrentAltGroupName,
return_value_policy<copy_const_reference>())
.def("SwitchAtomPos", &ResidueHandle::SwitchAtomPos)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment