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

apply all atom scores in ElEnumerador

parent edeb402f
No related branches found
No related tags found
No related merge requests found
......@@ -38,16 +38,18 @@ 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 scoring step only
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, weights, \
.. method:: ElEnumerador(mhandle, gaps, loop_candidates, all_atom_scores,\
[max_pruning_iterations=100, max_complexity=1000000])
Searches the loops in **loop_candidates** with their exact locations defined
in **gaps** that optimize the score using the scorer that is set in
**mhandle** and the given **weights**. The algorithm performs a maximum of
in **gaps** that optimize the score given predefined scorer and 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 a maximum of
**max_pruning_iterations** of the previously described 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**.
......@@ -62,8 +64,7 @@ loops. A global optimum is therefore not guaranteed, but still very likely.
: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 weights: The weights used for a linear combinations of scores
:param all_atom_scores: Whether to use all atom scores or go for backbone only
:param max_pruning_iterations: Maximum number of pruning iterations before
giving up
:param max_complexity: Pruning gets performed until
......@@ -71,8 +72,8 @@ loops. A global optimum is therefore not guaranteed, but still very likely.
:type mhandle: :class:`ModellingHandle`
:type gaps: :class:`StructuralGapList`
:type loop_candidates: :class:`list`
:type weights: :class:`dict`
:type loop_candidates: :class:`list`
:type all_atom_scores: :class:`bool`
:type max_pruning_iterations: :class:`int`
:type max_complexity: :class:`int`
......
......@@ -11,29 +11,15 @@ namespace{
void WrapEnumerador(ModellingHandle& mhandle,
const StructuralGapList& gaps,
const boost::python::list& loop_candidates,
const boost::python::dict& weights,
const boost::python::list& base_scores,
bool all_atom,
uint max_pruning_iterations,
uint max_complexity){
std::vector<promod3::modelling::LoopCandidatesPtr> v_loop_candidates;
std::map<String,Real> m_weights;
std::vector<std::vector<Real> > v_base_scores;
promod3::core::ConvertListToVector(loop_candidates, v_loop_candidates);
promod3::core::ConvertDictToMap(weights, m_weights);
if(boost::python::len(base_scores) != 0){
v_base_scores.resize(boost::python::len(base_scores));
for(uint i = 0; i < boost::python::len(base_scores); ++i){
boost::python::list current_list =
boost::python::extract<boost::python::list>(base_scores[i]);
promod3::core::ConvertListToVector(current_list, v_base_scores[i]);
}
}
promod3::modelling::ElEnumerador(mhandle, gaps, v_loop_candidates,
m_weights, v_base_scores, max_pruning_iterations,
all_atom, max_pruning_iterations,
max_complexity);
}
......@@ -48,8 +34,7 @@ void export_el_enumerador(){
def("ElEnumerador", &WrapEnumerador, (arg("mhandle"),
arg("gaps"),
arg("loop_candidates"),
arg("weights"),
arg("base_scores") = boost::python::list(),
arg("all_atom_scores") = false,
arg("max_pruning_iterations") = 100,
arg("max_complexity")=1000000));
......
This diff is collapsed.
......@@ -3,6 +3,7 @@
#include <promod3/modelling/loop_candidate.hh>
#include <promod3/modelling/model.hh>
#include <promod3/loop/structure_db.hh>
#include <vector>
......@@ -11,11 +12,9 @@ namespace promod3 { namespace modelling {
void ElEnumerador(ModellingHandle& mhandle,
const StructuralGapList& gaps,
std::vector<LoopCandidatesPtr>& loop_candidates,
const std::map<String,Real>& weights,
std::vector<std::vector<Real> >& base_scores,
bool all_atom_scores = false,
uint max_pruning_iterations = 100,
uint max_complexity = 10000000);
}} //ns
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment