Skip to content
Snippets Groups Projects
Commit 1d48d088 authored by Marco Biasini's avatar Marco Biasini
Browse files

some more property exports for atom/bond

parent b1298f48
No related branches found
No related tags found
No related merge requests found
...@@ -50,7 +50,6 @@ void export_Atom() ...@@ -50,7 +50,6 @@ void export_Atom()
return_value_policy<copy_const_reference>()), return_value_policy<copy_const_reference>()),
&AtomBase::SetName) &AtomBase::SetName)
.add_property("index", &AtomBase::GetIndex) .add_property("index", &AtomBase::GetIndex)
.def("GetRadius", &AtomBase::GetRadius) .def("GetRadius", &AtomBase::GetRadius)
.def("GetElement", &AtomBase::GetElement, .def("GetElement", &AtomBase::GetElement,
return_value_policy<copy_const_reference>()) return_value_policy<copy_const_reference>())
...@@ -85,6 +84,7 @@ void export_Atom() ...@@ -85,6 +84,7 @@ void export_Atom()
.def("GetBondList", &AtomHandle::GetBondList) .def("GetBondList", &AtomHandle::GetBondList)
.def("GetBondCount", &AtomHandle::GetBondCount) .def("GetBondCount", &AtomHandle::GetBondCount)
.def("GetEntity", &AtomHandle::GetEntity) .def("GetEntity", &AtomHandle::GetEntity)
.add_property("bonds", &AtomHandle::GetBondList)
.def("GetHandle", &AtomHandle::GetHandle) .def("GetHandle", &AtomHandle::GetHandle)
.add_property("handle", &AtomHandle::GetHandle) .add_property("handle", &AtomHandle::GetHandle)
.add_property("entity", &AtomHandle::GetEntity) .add_property("entity", &AtomHandle::GetEntity)
......
...@@ -26,7 +26,9 @@ using namespace boost::python; ...@@ -26,7 +26,9 @@ using namespace boost::python;
using namespace ost; using namespace ost;
using namespace ost::mol; using namespace ost::mol;
#include <ost/export_helper/generic_property_def.hh> #include <ost/export_helper/generic_property_def.hh>
#include <ost/export_helper/vector.hh>
void export_Bond() void export_Bond()
{ {
...@@ -38,8 +40,6 @@ void export_Bond() ...@@ -38,8 +40,6 @@ void export_Bond()
make_function(&BondHandle::GetFirst)) make_function(&BondHandle::GetFirst))
.add_property("second", .add_property("second",
make_function(&BondHandle::GetSecond)) make_function(&BondHandle::GetSecond))
.add_property("other",
make_function(&BondHandle::GetOther))
.add_property("length", .add_property("length",
&BondHandle::GetLength) &BondHandle::GetLength)
.add_property("bond_order", .add_property("bond_order",
...@@ -59,6 +59,7 @@ void export_Bond() ...@@ -59,6 +59,7 @@ void export_Bond()
generic_prop_def<BondHandle>(bond_handle); generic_prop_def<BondHandle>(bond_handle);
class_<BondHandleList>("BondHandleList", no_init) class_<BondHandleList>("BondHandleList", no_init)
.def(vector_indexing_suite<BondHandleList>()) .def(vector_indexing_suite<BondHandleList>())
.def(ost::VectorAdditions<BondHandleList>())
; ;
def("BondExists", &BondExists); def("BondExists", &BondExists);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment