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

Delete residues/chains that don't contain atoms after molck cleanup by default

parent 2f14bd97
No related branches found
No related tags found
No related merge requests found
......@@ -1877,7 +1877,7 @@ API
The API here is set such that the functions modify the passed structure *ent*
in-place. If this is not ok, please work on a copy of the structure.
.. function:: Molck(ent, lib, settings)
.. function:: Molck(ent, lib, settings, [prune=True])
Runs Molck on provided entity.
......@@ -1887,6 +1887,10 @@ API
:type lib: :class:`~ost.conop.CompoundLib`
:param settings: Molck settings
:type settings: :class:`MolckSettings`
:param prune: Whether to remove residues/chains that don't contain atoms
anymore after Molck cleanup
:type prune: `bool`
.. function:: MapNonStandardResidues(ent, lib)
......
......@@ -133,5 +133,5 @@ void export_Molck()
def("CleanUpElementColumn", &CleanUpElementColumn, (arg("ent"), arg("lib")));
def("Molck", &Molck, (arg("ent"), arg("lib"), arg("settings")));
def("Molck", &Molck, (arg("ent"), arg("lib"), arg("settings"), arg("prune")=true));
}
......@@ -174,7 +174,8 @@ void CleanUpElementColumn(EntityHandle& ent, CompoundLibPtr lib){
void Molck(ost::mol::EntityHandle& ent,
ost::conop::CompoundLibPtr lib,
const MolckSettings& settings = MolckSettings()){
const MolckSettings& settings,
bool prune) {
if(!lib) {
throw ost::Error("Require valid compound library!");
......@@ -193,7 +194,12 @@ void Molck(ost::mol::EntityHandle& ent,
settings.colored);
if (settings.assign_elem) {
CleanUpElementColumn(ent, lib);
}
}
if(prune) {
ost::mol::XCSEditor edi = ent.EditXCS();
edi.Prune();
}
}
}}} // ns
\ No newline at end of file
......@@ -97,7 +97,8 @@ void CleanUpElementColumn(ost::mol::EntityHandle& ent,
void Molck(ost::mol::EntityHandle& ent,
ost::conop::CompoundLibPtr lib,
const MolckSettings& settings);
const MolckSettings& settings,
bool prune = true);
}}} // namespace
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment