Commit db775cab authored by Tauriello Gerardo's avatar Tauriello Gerardo
Browse files

Merge branch 'hotfix-1.0.2'

parents 74d0d18e a218bebf
......@@ -15,7 +15,7 @@ include(PROMOD3)
set(PROMOD3_VERSION_MAJOR 1)
set(PROMOD3_VERSION_MINOR 0)
set(PROMOD3_VERSION_PATCH 1)
set(PROMOD3_VERSION_PATCH 2)
set(PROMOD3_VERSION_STRING ${PROMOD3_VERSION_MAJOR}.${PROMOD3_VERSION_MINOR})
set(PROMOD3_VERSION_STRING ${PROMOD3_VERSION_STRING}.${PROMOD3_VERSION_PATCH})
......
......@@ -14,7 +14,10 @@ import sys
###############################################################################
# helper functions
def _GetGapExtender(mhandle, actual_gap, use_scoring_extender,
use_full_extender=True, max_length=-1):
use_full_extender, max_length=-1):
# DO NOT USE full ext. with max_len = -1 as this can use LOTS of memory
if use_full_extender and max_length < 0:
raise RuntimeError("Cannot use neg. max_length with full extender!")
# return appropriate gap extender
actual_chain_idx = actual_gap.GetChainIndex()
if use_scoring_extender:
......@@ -32,9 +35,7 @@ def _GetGapExtender(mhandle, actual_gap, use_scoring_extender,
mhandle.seqres[actual_chain_idx],
max_length)
else:
return ScoringGapExtender(actual_gap, 0.8,
extender_penalties,
mhandle.seqres[actual_chain_idx])
raise RuntimeError("Cannot use ScoringGapExtender w/o max_length.")
else:
if use_full_extender:
return FullGapExtender(actual_gap,
......@@ -753,9 +754,12 @@ def FillLoopsByMonteCarlo(mhandle, scorer, torsion_sampler, max_loops_to_search=
found_loops = 0
# currently extended gap and gap-extender
actual_gap = gap_orig.Copy()
# each extension can make it at most 1 longer...
max_loop_len = gap_orig.length + max_extension
actual_extender = _GetGapExtender(mhandle, actual_gap,
use_scoring_extender,
use_full_extender)
use_full_extender,
max_loop_len)
actual_chain_idx = actual_gap.GetChainIndex()
# iteratively extend actual_gap
ext_step = 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment