Changeset 5a479d for src/Python/PythonScripting_impl.hpp
- Timestamp:
- Jan 24, 2024, 4:53:03 PM (21 months ago)
- Branches:
- Candidate_v1.7.0, stable
- Children:
- d203d1e
- Parents:
- d083cc
- git-author:
- Frederik Heber <frederik.heber@…> (01/22/24 22:21:29)
- git-committer:
- Frederik Heber <frederik.heber@…> (01/24/24 16:53:03)
- File:
-
- 1 edited
-
src/Python/PythonScripting_impl.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Python/PythonScripting_impl.hpp
rd083cc r5a479d 110 110 "returns list of elements over the nodes of the graph of the current selected set of atoms." 111 111 ); 112 boost::python::def< MoleCuilder::detail::stringVec() >( 113 "getAllGraph6Strings", 114 MoleCuilder::detail::module_getAllGraph6Strings, 115 "returns chemical graphs of the current selected set of atoms as graph6 representation with all non-hydrogen atom permutations." 116 ); 117 boost::python::def< MoleCuilder::detail::stringVec() >( 118 "getAllElementListAsStrings", 119 MoleCuilder::detail::module_getAllElementListAsStrings, 120 "returns lists of elements over the nodes of the graph of the current selected set of atoms with all non-hydrogen atom permutations." 121 ); 112 122 boost::python::def< MoleCuilder::detail::doubleVec() >( 113 123 "getBoundingBox", … … 183 193 .def("__iter__", boost::python::iterator< std::vector< std::vector< double > > >()) 184 194 .def("__repr__", &MoleCuilder::PythonTypes::vec_item< std::vector< std::vector< double > > >::toStringRepr) 195 ; 196 // positions 197 boost::python::class_< std::vector< std::string > >("PythonType_stringVec") 198 .def("__len__", &std::vector< std::string >::size) 199 .def("clear", &std::vector< std::string >::clear) 200 .def("append", &MoleCuilder::PythonTypes::vec_item< std::vector< std::string > >::add, 201 boost::python::with_custodian_and_ward<1, 2>()) // let container keep value 202 .def("__getitem__", &MoleCuilder::PythonTypes::vec_item< std::vector< std::string > >::get, 203 boost::python::return_value_policy<boost::python::copy_non_const_reference>()) 204 .def("__setitem__", &MoleCuilder::PythonTypes::vec_item< std::vector< std::string > >::set, 205 boost::python::with_custodian_and_ward<1,2>()) // to let container keep value 206 .def("__delitem__", &MoleCuilder::PythonTypes::vec_item< std::vector< std::string > >::del) 207 .def("__iter__", boost::python::iterator< std::vector< std::string > >()) 208 .def("__repr__", &MoleCuilder::PythonTypes::vec_item< std::vector< std::string > >::toStringRepr) 185 209 ; 186 210
Note:
See TracChangeset
for help on using the changeset viewer.
