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

remove el enumerador that, in this form, contains a conceptual error

parent 0d355857
No related branches found
No related tags found
No related merge requests found
...@@ -5,81 +5,6 @@ Modelling Algorithms ...@@ -5,81 +5,6 @@ Modelling Algorithms
A collection of algorithms that can be useful in modelling A collection of algorithms that can be useful in modelling
El Enumerador
--------------------------------------------------------------------------------
In the modelling process you typically have to generate loops at several
locations in the model. They're potentially close enough to interact. If you
simply iterate over to locations and set the loop at one location after the
other, the scorer cannot "see" loops at locations that will be processed later
on. A naive approach to tackle this problem would be to generate an enumeration
with all possible loop combinations:
For every possible combination of loops:
* Set the according loop from every location in the environment
* Calculate the scores from all loops given that environment
* Keep the best overall score
Assuming a small modelling problem with a total of 5 locations with 10
candidates each, this already gives 100000 set loop scoring environment calls
and 100000 loop scoring calls. ElEnumerador tries to solve the problem in
a more clever approach. It first generates an interaction graph of which
locations actually have candidates that interact (If any of the candidates
have a CA distances closer than a specified threshold).
This graph gets then decomposed into a minimal width tree and solved in a
similar manner as in the sidechain modelling problem.
This typically massively reduces the problem size by solving
small subproblems and allows to tackle larger problems in a feasible amount
of computing time. Despite massively reducing the amount of loop scoring
and set environment calls, we still need to define an upper bound of computation
time. After building the minimal width tree, one can already determine the
exact number of loop scoring calls required to solve that tree. This measure
turnes out to be an accurate measure of overall runtime, since the scoring
clearly is the dominant operation. ElEnumerador checks, whether this number
is above a user defined threshold. If yes, the 20% worst scoring loop candidates
from the location with the largest amount of loop candidates gets removed and
a new tree gets generated. Please note, that this pruning step only
considers the already set environment and no pairwise interactions to other
loops. A global optimum is therefore not guaranteed, but still very likely.
.. method:: ElEnumerador(mhandle, gaps, loop_candidates, all_atom_scores,\
[max_complexity=1000000, distance_thresh=10.0])
Searches the loops in **loop_candidates** with their exact locations defined
in **gaps** that optimize the score given a scoring environment built from the
current model attached to **mhandle** and an internally loaded default scorer
with default weights.
The scores can either be backbone only or also consider all atom scores if
the according flag is set to true. Please note, that this has a massive impact
on runtime! The algorithm performs pruning iterations
until every connected component in the interaction graph can be solved with
the number of required loop scoring calls being lower than **max_complexity**.
:param mhandle: Handle with valid model attached. This handle is treated
as const
:param gaps: A list of gaps specifying the loop locations
:param loop_candidates: A list of :class:`LoopCandidates` objects defining
loops at different locations.
:param all_atom_scores: Whether to use all atom scores or go for backbone only
:param max_complexity: Pruning gets performed until every connected component
in the interaction graph can be solved with scoring
steps below this threshold.
:param distance_thresh: If any loop of two LoopCandidates objects has a
pairwise CA distance below this thresh, they're
considered to interact. Use with care, this has
an impact on the problem complexity if increased.
:type mhandle: :class:`ModellingHandle`
:type gaps: :class:`StructuralGapList`
:type loop_candidates: :class:`list`
:type all_atom_scores: :class:`bool`
:type max_complexity: :class:`int`
:type distance_thresh: :class:`float`
:returns: A :class:`list` of :class:`int` specifying the optimal loop in every
item of **loop_candidates**
Rigid Blocks Rigid Blocks
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
......
...@@ -9,7 +9,6 @@ set(MODELLING_CPP ...@@ -9,7 +9,6 @@ set(MODELLING_CPP
export_rigid_blocks.cc export_rigid_blocks.cc
export_score_container.cc export_score_container.cc
export_scoring_weights.cc export_scoring_weights.cc
export_el_enumerador.cc
export_sidechain_reconstructor.cc export_sidechain_reconstructor.cc
wrap_modelling.cc wrap_modelling.cc
) )
......
#include <boost/python.hpp>
#include <promod3/core/export_helper.hh>
#include <promod3/modelling/el_enumerador.hh>
using namespace ost;
using namespace boost::python;
using namespace promod3::modelling;
namespace{
boost::python::list WrapEnumerador(ModellingHandle& mhandle,
const StructuralGapList& gaps,
const boost::python::list& loop_candidates,
bool all_atom,
uint max_complexity,
Real distance_thresh){
std::vector<promod3::modelling::LoopCandidatesPtr> v_loop_candidates;
promod3::core::ConvertListToVector(loop_candidates, v_loop_candidates);
std::vector<uint> v_result =
promod3::modelling::ElEnumerador(mhandle, gaps, v_loop_candidates,
all_atom, max_complexity,
distance_thresh);
boost::python::list result;
promod3::core::AppendVectorToList(v_result, result);
return result;
}
}
void export_el_enumerador(){
def("ElEnumerador", &WrapEnumerador, (arg("mhandle"),
arg("gaps"),
arg("loop_candidates"),
arg("all_atom_scores") = false,
arg("max_complexity")=1000000,
arg("distance_thresh")=10.0));
}
\ No newline at end of file
...@@ -11,7 +11,6 @@ void export_rigid_blocks(); ...@@ -11,7 +11,6 @@ void export_rigid_blocks();
void export_score_container(); void export_score_container();
void export_scoring_weights(); void export_scoring_weights();
void export_SidechainReconstructor(); void export_SidechainReconstructor();
void export_el_enumerador();
BOOST_PYTHON_MODULE(_modelling) BOOST_PYTHON_MODULE(_modelling)
{ {
...@@ -26,5 +25,4 @@ BOOST_PYTHON_MODULE(_modelling) ...@@ -26,5 +25,4 @@ BOOST_PYTHON_MODULE(_modelling)
export_score_container(); export_score_container();
export_scoring_weights(); export_scoring_weights();
export_SidechainReconstructor(); export_SidechainReconstructor();
export_el_enumerador();
} }
...@@ -18,7 +18,6 @@ set(MODELLING_SOURCES ...@@ -18,7 +18,6 @@ set(MODELLING_SOURCES
scoring_weights.cc scoring_weights.cc
sidechain_reconstructor.cc sidechain_reconstructor.cc
sidechain_env_listener.cc sidechain_env_listener.cc
el_enumerador.cc
) )
set(MODELLING_HEADERS set(MODELLING_HEADERS
...@@ -41,7 +40,6 @@ set(MODELLING_HEADERS ...@@ -41,7 +40,6 @@ set(MODELLING_HEADERS
scoring_weights.hh scoring_weights.hh
sidechain_reconstructor.hh sidechain_reconstructor.hh
sidechain_env_listener.hh sidechain_env_listener.hh
el_enumerador.hh
) )
module(NAME modelling module(NAME modelling
......
This diff is collapsed.
#ifndef PM3_MODELLING_ELENUMERADOR_HH
#define PM3_MODELLING_ELENUMERADOR_HH
#include <promod3/modelling/loop_candidate.hh>
#include <promod3/modelling/model.hh>
#include <promod3/loop/structure_db.hh>
#include <vector>
namespace promod3 { namespace modelling {
std::vector<uint> ElEnumerador(const ModellingHandle& mhandle,
const StructuralGapList& gaps,
const std::vector<LoopCandidatesPtr>& loop_candidates,
bool all_atom_scores = false,
uint max_complexity = 10000000,
Real distance_thresh = 10.0);
}} //ns
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment