diff --git a/modules/mol/base/pymod/export_editors.cc b/modules/mol/base/pymod/export_editors.cc index aae903f7d276721545a60af51cd1ed0dff227263..e204bbd2e7c190fc42b4d931a4e9a584577a4719 100644 --- a/modules/mol/base/pymod/export_editors.cc +++ b/modules/mol/base/pymod/export_editors.cc @@ -249,6 +249,7 @@ void export_Editors() .def("ReorderResidues",&EditorBase::ReorderResidues) .def("ReorderAllResidues",&EditorBase::ReorderAllResidues) .def("RenumberAllResidues",&EditorBase::RenumberAllResidues) + .def("RenumberChain",&EditorBase::RenumberChain) ; void (XCSEditor::*apply_transform1)(const geom::Mat4&) = &XCSEditor::ApplyTransform; diff --git a/modules/mol/base/src/editor_base.cc b/modules/mol/base/src/editor_base.cc index ff19cddff9f8aaab6cd5910db047f1a5cc4f8ef5..2b9a3b56d793b24a1cd55d8a92b8872edb66688e 100644 --- a/modules/mol/base/src/editor_base.cc +++ b/modules/mol/base/src/editor_base.cc @@ -208,6 +208,11 @@ void EditorBase::RenumberAllResidues(int start, bool keep_spacing) ent_.Impl()->RenumberAllResidues(start, keep_spacing); } +void EditorBase::RenumberChain(ChainHandle& chain, int start, bool keep_spacing) +{ + chain.Impl()->RenumberAllResidues(start, keep_spacing); +} + void EditorBase::RenameAtom(AtomHandle atom, const String& new_name) { CheckHandleValidity(atom); diff --git a/modules/mol/base/src/editor_base.hh b/modules/mol/base/src/editor_base.hh index 7d6f6d65a2e9761e1cebdd4b014589e5a0174cd0..c081ab97867d0b98d7aae7b7bb9b83b7888cfbec 100644 --- a/modules/mol/base/src/editor_base.hh +++ b/modules/mol/base/src/editor_base.hh @@ -277,6 +277,23 @@ public: /// If set to false, residues will continously be renumbered ongoing from start. /// Otherwise the spacings between the residues are kept. void RenumberAllResidues(int start, bool keep_spacing); + + + + /// \brief renumber residues of one chain + /// + /// \param chain + /// All residues of this chain will be renumbered according to the + /// parameters start and keep_spacing + /// + /// \param start + /// Residues of given chain will be renumbered, whereas the first + /// residue gets the residue number start. + /// + /// \param keep_spacing + /// If set to false, residues will continously be renumbered ongoing from start. + /// Otherwise the spacings between the residues are kept. + void RenumberChain(ChainHandle& chain, int start, bool keep_spacing); /// \brief Get edit mode of editor EditMode GetMode() const {return mode_;}