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

Allow renumbering of single chain

parent 1054fbb3
Branches
Tags
No related merge requests found
......@@ -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;
......
......@@ -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);
......
......@@ -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_;}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment