Skip to content
Snippets Groups Projects
Commit db8e46f1 authored by BIOPZ-Bertoni Martino's avatar BIOPZ-Bertoni Martino
Browse files

Merge branch 'develop' of bc2-dng01.bc2.unibas.ch:/opt/git/GIT_DATA/ost into develop

parents e3b63b5b 99b3fb88
No related branches found
No related tags found
No related merge requests found
......@@ -243,6 +243,8 @@ void export_Editors()
.def("DeleteResidue", &EditorBase::DeleteResidue)
.def("DeleteChain", &EditorBase::DeleteChain)
.def("DeleteAtom", &EditorBase::DeleteAtom)
.def("DeleteBond", &EditorBase::DeleteBond)
.def("DeleteBonds", &EditorBase::DeleteBonds)
.def("InsertResidueBefore", &EditorBase::InsertResidueBefore)
.def("InsertResidueAfter", &EditorBase::InsertResidueAfter)
.def("AppendResidue", append_a)
......
......@@ -193,6 +193,19 @@ void EditorBase::DeleteAtom(const AtomHandle& atom_handle)
atom_handle.GetResidue().Impl()->DeleteAtom(atom_handle.Impl());
}
void EditorBase::DeleteBond(const BondHandle& bond)
{
bond.GetFirst().Impl()->DeleteConnector(bond.Impl(),true);
}
void EditorBase::DeleteBonds(const BondHandleList& bond_list)
{
for(BondHandleList::const_iterator i = bond_list.begin();
i != bond_list.end(); ++i){
i->GetFirst().Impl()->DeleteConnector(i->Impl(),true);
}
}
void EditorBase::DeleteResidue(const ResidueHandle& residue_handle)
{
CheckHandleValidity(residue_handle);
......
......@@ -249,6 +249,20 @@ public:
/// All associated torsions and bonds will be removed as well
void DeleteAtoms(const AtomHandleList& atoms);
/// \ brief Delete bond
///
/// \param bond
/// Is the bond to remove. If no such bond exists, this method will
/// have no effect
void DeleteBond(const BondHandle& bond);
/// \ brief Delete a set of bond
///
/// \param bonds
/// bonds to remove. If no such bonds exist, this method will
/// have no effect
void DeleteBonds(const BondHandleList& bonds);
/// \brief Add named torsion to entity
TorsionHandle AddTorsion(const String& name, const AtomHandle& a1,
const AtomHandle& a2, const AtomHandle& a3,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment