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

Allow renumbering of single chain

parent e0a9774a
No related branches found
No related tags found
No related merge requests found
...@@ -249,6 +249,7 @@ void export_Editors() ...@@ -249,6 +249,7 @@ void export_Editors()
.def("ReorderResidues",&EditorBase::ReorderResidues) .def("ReorderResidues",&EditorBase::ReorderResidues)
.def("ReorderAllResidues",&EditorBase::ReorderAllResidues) .def("ReorderAllResidues",&EditorBase::ReorderAllResidues)
.def("RenumberAllResidues",&EditorBase::RenumberAllResidues) .def("RenumberAllResidues",&EditorBase::RenumberAllResidues)
.def("RenumberChain",&EditorBase::RenumberChain)
; ;
void (XCSEditor::*apply_transform1)(const geom::Mat4&) = &XCSEditor::ApplyTransform; void (XCSEditor::*apply_transform1)(const geom::Mat4&) = &XCSEditor::ApplyTransform;
......
...@@ -208,6 +208,11 @@ void EditorBase::RenumberAllResidues(int start, bool keep_spacing) ...@@ -208,6 +208,11 @@ void EditorBase::RenumberAllResidues(int start, bool keep_spacing)
ent_.Impl()->RenumberAllResidues(start, 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) void EditorBase::RenameAtom(AtomHandle atom, const String& new_name)
{ {
CheckHandleValidity(atom); CheckHandleValidity(atom);
......
...@@ -277,6 +277,23 @@ public: ...@@ -277,6 +277,23 @@ public:
/// If set to false, residues will continously be renumbered ongoing from start. /// If set to false, residues will continously be renumbered ongoing from start.
/// Otherwise the spacings between the residues are kept. /// Otherwise the spacings between the residues are kept.
void RenumberAllResidues(int start, bool keep_spacing); 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 /// \brief Get edit mode of editor
EditMode GetMode() const {return mode_;} EditMode GetMode() const {return mode_;}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment