diff --git a/modules/mol/base/doc/entity.rst b/modules/mol/base/doc/entity.rst index 3098c265c90b20e78897a9f193ccc5300883dded..8aa95e6a8c5bc44a7136067351017305157f6a62 100644 --- a/modules/mol/base/doc/entity.rst +++ b/modules/mol/base/doc/entity.rst @@ -247,12 +247,6 @@ The Handle Classes See :attr:`mass` - .. method:: Apply(visitor) - - Apply EntityVisitor to the entity. In Python, you usually don't need this - function bother using. EntityVisitors are mainly used in C++ to implement - algorithms that are able to operate on :class:`EntityViews <EntityView>` - and :class:`entity handles<EntityHandle>` at the same time. .. method:: FindWithin(pos, radius) @@ -605,15 +599,6 @@ The Handle Classes :type: list of :class:`bond handles<BondHandle>` - .. method:: Apply(visitor) - - Apply an entity visitor to the atom. In Python, you usually don't have to - use this method. It is mainly used in C++ to write algorithms that work on - both :class:`EntityHandle` and :class:`EntityView` at the same time. - - :param visitor: The entity visitor - :type visitor: :class:`EntityVisitor` - .. method:: FindBondToAtom(other_atom) Finds and returns the bond formed between this atom and `other_atom`. If no @@ -804,14 +789,14 @@ The View Classes .. method:: CreateFullView() - Returns a copy of this entity. Provided for duck-typing purposes. + Returns a copy of this entity. Provided for `duck-typing <http://en.wikipedia.org/wiki/Duck_typing>` purposes. :rtype: EntityView .. method:: AddChain(chain_handle[, view_add_flags]) Add chain to view. By default, only the chain is added to the view, but not - its residues and atoms. This behaviour can be changed by passing in an + its residues and atoms. This behavior can be changed by passing in an appropriate set of `view_add_flags` :param chain_handle: @@ -876,7 +861,6 @@ The View Classes :type residue: ResidueView - .. method:: RemoveAtom(atom) Remove atom from view @@ -959,6 +943,7 @@ The View Classes .. method:: GetMass() Get total mass of view. + :rtype: float .. method:: GetCenterOfMass() @@ -970,8 +955,8 @@ The View Classes .. method:: GetGeometricCenter() - Get the geometric center, that is the centerof the axis-aligned - bounding box. + Get the geometric center (the center of the axis-aligned + bounding box). :rtype: :class:`~ost.geom.Vec3` @@ -979,7 +964,6 @@ The View Classes :rtype: :class:`~ost.geom.Vec3` - .. attribute:: chain_count Number of chains. Read-only. See :meth:`GetChainCount`. @@ -1022,14 +1006,6 @@ The View Classes :rtype: int - .. method:: Apply(visitor) - - Apply entity visitor to view. In Python, you usually don't have to use this - method. See :meth:`EntityHandle.Apply` - - :param visitor: - :type visitor: class:`EntityVisitor` - .. method:: GetResidueCount() See :attr:`residue_count` @@ -1052,7 +1028,6 @@ The View Classes :rtype: class:`ResidueViewList` - .. method:: GetGeometricEnd() :rtype: :class:`~ost.geom.Vec3` @@ -1070,7 +1045,6 @@ The View Classes .. class:: ChainView - .. attribute:: name The chain name. The name uniquely identifies the chain in the entity. In @@ -1161,7 +1135,6 @@ The View Classes :type: bool - .. method:: AddAtom(atom_handle[, view_add_flags]) Add atom to the view. If the residue of the atom is not already part of the @@ -1178,7 +1151,7 @@ The View Classes Add residue to the view. If the atom does not belong to chain, the result is undefined. By default, only the residue, but no atoms are added to the view. - To change the behaviour, pass in a suitable combination of `view_add_flags`. + To change the behavior, pass in a suitable combination of `view_add_flags`. :param residue_handle: :type residue_handle: :class:`ResidueHandle` @@ -1208,7 +1181,6 @@ The View Classes :rtype: :class:`ResidueView` :returns: The residue view, or an invalid residue view if no residue with the given residue number is in the view. - .. method:: GetCenterOfAtoms() @@ -1222,11 +1194,9 @@ The View Classes See :attr:`entity` - .. method:: GetGeometricCenter() See :attr:`geometric_center` - .. method:: GetHandle() @@ -1258,7 +1228,6 @@ The View Classes .. method:: InSequence() See :attr:`in_sequence` - .. method:: IsValid() @@ -1297,7 +1266,6 @@ The View Classes :param visitor: The visitor :type visitor: :class:`EntityVisitor` - .. class:: ResidueView .. attribute:: name diff --git a/modules/mol/base/pymod/export_atom.cc b/modules/mol/base/pymod/export_atom.cc index 90449eda7c904fb671339a83af66929fa375b672..13fc2ee554980d1941bb074db842f2364653bac4 100644 --- a/modules/mol/base/pymod/export_atom.cc +++ b/modules/mol/base/pymod/export_atom.cc @@ -76,7 +76,6 @@ void export_Atom() class_<AtomHandle, bases<AtomBase> >("AtomHandle", init<>()) .def("GetResidue",&AtomHandle::GetResidue) .add_property("residue",&AtomHandle::GetResidue) - .def("Apply", &AtomHandle::Apply, args("visitor")) .def("GetBondList", &AtomHandle::GetBondList) .def("GetBondCount", &AtomHandle::GetBondCount) .add_property("valid", &AtomHandle::IsValid) diff --git a/modules/mol/base/pymod/export_atom_view.cc b/modules/mol/base/pymod/export_atom_view.cc index 3b468326437cef638ccada5e24a831f1fb621256..d8bc4a0eeb9e4aaf72a7d083d2b03d3e375767f2 100644 --- a/modules/mol/base/pymod/export_atom_view.cc +++ b/modules/mol/base/pymod/export_atom_view.cc @@ -28,14 +28,10 @@ using namespace ost::mol; void export_AtomView() { - void (AtomView::* apply1)(EntityVisitor&) = &AtomView::Apply; - void (AtomView::* apply2)(EntityViewVisitor&) = &AtomView::Apply; class_<AtomView, bases<AtomBase> >("AtomView", init<>()) .def("GetResidue",&AtomView::GetResidue) .add_property("residue",&AtomView::GetResidue) - .def("Apply", apply1, args("visitor")) - .def("Apply", apply2, args("visitor")) .def(self==self) .def(self!=self) .add_property("handle", &AtomView::GetHandle) diff --git a/modules/mol/base/pymod/export_bond.cc b/modules/mol/base/pymod/export_bond.cc index ddfde472156fe0bdaaed309d93182cf42ff9963d..e409f0a86d6412447cff85ceb83612124398c73a 100644 --- a/modules/mol/base/pymod/export_bond.cc +++ b/modules/mol/base/pymod/export_bond.cc @@ -30,9 +30,6 @@ using namespace ost::mol; void export_Bond() { - void (BondHandle::* apply1)(EntityVisitor&) = &BondHandle::Apply; - void (BondHandle::* apply2)(EntityViewVisitor&) = &BondHandle::Apply; - class_<BondHandle> bond_handle("BondHandle", init<>()); bond_handle .def("GetPos", &BondHandle::GetPos) @@ -55,8 +52,6 @@ void export_Bond() .def("GetBondOrder",&BondHandle::GetBondOrder) .def("SetBondOrder",&BondHandle::SetBondOrder) .def("IsValid", &BondHandle::IsValid) - .def("Apply",apply1) - .def("Apply",apply2) .def(self == self) .def(self != self) .def(self_ns::str(self)) diff --git a/modules/mol/base/pymod/export_chain.cc b/modules/mol/base/pymod/export_chain.cc index 35c6b7acc1fe2677dfa5bfcd1ce65e3958b19986..a0c603fd799f3aea911aab9bba8bc661e405cb6d 100644 --- a/modules/mol/base/pymod/export_chain.cc +++ b/modules/mol/base/pymod/export_chain.cc @@ -65,7 +65,6 @@ void export_Chain() //.def("AppendResidue", append_one_arg, args("residue_key")) //.def("AppendResidue", append_two_arg, args("residue_key", // "residue_number")) - .def("Apply", &ChainHandle::Apply, args("visitor")) .def("GetNext", &ChainHandle::GetNext) .def("GetPrev", &ChainHandle::GetPrev) //.def("InsertResidueBefore", &ChainHandle::InsertResidueBefore, diff --git a/modules/mol/base/pymod/export_chain_view.cc b/modules/mol/base/pymod/export_chain_view.cc index c0c1e732468c37897ee40d9325d2bbc26d74fa41..ee6753b52d420cf3ae5ef360425a5390132cd464 100644 --- a/modules/mol/base/pymod/export_chain_view.cc +++ b/modules/mol/base/pymod/export_chain_view.cc @@ -61,9 +61,6 @@ void export_ChainView() .def(ost::VectorAdditions<ChainViewList>()) ; - void (ChainView::* apply1)(EntityVisitor&) = &ChainView::Apply; - void (ChainView::* apply2)(EntityViewVisitor&) = &ChainView::Apply; - class_<ChainView, bases<ChainBase> >("ChainView", init<>()) .def("GetResidueList", &ChainView::GetResidueList, return_value_policy<copy_const_reference>()) @@ -81,8 +78,6 @@ void export_ChainView() X_add_residue_overloads(args("residue_handle", "view_add_flags"))) .def("AddResidue", vm, X_add_residue_overloads(args("residue_view", "view_add_flags"))) - .def("Apply", apply1, args("visitor")) - .def("Apply", apply2, args("visitor")) .def("RemoveResidue", &ChainView::RemoveResidue) .def("RemoveResidues", &ChainView::RemoveResidues) .def("InSequence", &ChainView::InSequence) diff --git a/modules/mol/base/pymod/export_entity_view.cc b/modules/mol/base/pymod/export_entity_view.cc index 0d1da4f85572818b8fa205221fa58a49875db159..aaa75efb730ad624934bb3d1c1cf510bf6fa915e 100644 --- a/modules/mol/base/pymod/export_entity_view.cc +++ b/modules/mol/base/pymod/export_entity_view.cc @@ -80,15 +80,10 @@ void export_EntityView() .export_values() ; - void (EntityView::* apply1)(EntityVisitor&) = &EntityView::Apply; - void (EntityView::* apply2)(EntityViewVisitor&) = &EntityView::Apply; - Real (EntityView::*get_angle1)(const AtomHandle&, const AtomHandle&, const AtomHandle&) const = &EntityView::GetAngle; Real (EntityView::*get_angle2)(const AtomView&, const AtomView&, const AtomView&) const = &EntityView::GetAngle; class_<EntityView, bases<EntityBase> >("EntityView", init<>()) - .def("Apply",apply1) - .def("Apply",apply2) .def("Copy", &EntityView::Copy) .def("FindChain", find_chain_str) .def("FindResidue", &EntityView::FindResidue) diff --git a/modules/mol/base/pymod/export_residue.cc b/modules/mol/base/pymod/export_residue.cc index 5334fb2baba3f277d0664357894d7e84c03ebadb..532f4b0a2b2d3e23a79ea73f8c59d130ab15685a 100644 --- a/modules/mol/base/pymod/export_residue.cc +++ b/modules/mol/base/pymod/export_residue.cc @@ -156,7 +156,6 @@ void export_Residue() .add_property("atoms", &ResidueHandle::GetAtomList) .def("FindAtom", &ResidueHandle::FindAtom, args("atom_name")) .def("FindTorsion", &ResidueHandle::FindTorsion) - .def("Apply", &ResidueHandle::Apply, args("visitor")) .def("GetAtomCount", &ResidueHandle::GetAtomCount) .def("GetBondCount", &ResidueHandle::GetBondCount) .add_property("atom_count", &ResidueHandle::GetAtomCount) diff --git a/modules/mol/base/pymod/export_residue_view.cc b/modules/mol/base/pymod/export_residue_view.cc index 13695ba9c5cf11a392ad17853050e18f452a409c..63bd1c746a19ad3135852649cc25eebf6c7f9725 100644 --- a/modules/mol/base/pymod/export_residue_view.cc +++ b/modules/mol/base/pymod/export_residue_view.cc @@ -51,9 +51,6 @@ void export_ResidueView() .def(ost::VectorAdditions<ResidueViewList>()) ; - void (ResidueView::* apply1)(EntityVisitor&) = &ResidueView::Apply; - void (ResidueView::* apply2)(EntityViewVisitor&) = &ResidueView::Apply; - class_<ResidueView, bases<ResidueBase> >("ResidueView", init<>()) .def("GetChain",&ResidueView::GetChain) .def("GetAtomList", &ResidueView::GetAtomList, @@ -67,8 +64,6 @@ void export_ResidueView() .def("AddAtom", add_atom_view, X_add_atom_overloads(args("atom_view", "flags"))) .def("FindAtom", handle_find_atom, args("atom_handle")) .def("IsAtomIncluded", &ResidueView::IsAtomIncluded, args("atom_handle")) - .def("Apply", apply1, args("visitor")) - .def("Apply", apply2, args("visitor")) .def("GetIndex", &ResidueView::GetIndex) .add_property("chain", &ResidueView::GetChain) .add_property("entity", &ResidueView::GetEntity)