Skip to content

Commit

Permalink
Merge pull request #253 from menoliu/fix-ldrs
Browse files Browse the repository at this point in the history
Fix input sequence processing for single chains in `ldrs`
  • Loading branch information
menoliu authored Oct 2, 2023
2 parents 6843697 + d956b04 commit 25d94f0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ While in version ``0``, minor and patch upgrades converge in the ``patch`` numbe
Changelog
=========

* Bug-fix in ``ldrs`` for input sequence recognition

v0.7.7 (2023-09-26)
------------------------------------------------------------

Expand Down
20 changes: 13 additions & 7 deletions src/idpconfgen/cli_ldrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,14 +474,20 @@ def main(

# Accomodate multiple chains in template
global MULTICHAIN
if len(input_seq) > 1:
log.info(T('multiple sequences detected. assuming they are in a multi-chain complex')) # noqa: E501
for chain in input_seq:
log.info(S(f'{chain}: {input_seq[chain]}'))
MULTICHAIN = True
if type(input_seq) is dict:
if len(input_seq) > 1:
log.info(T('multiple sequences detected. assuming they are in a multi-chain complex')) # noqa: E501
for chain in input_seq:
log.info(S(f'{chain}: {input_seq[chain]}'))
MULTICHAIN = True
else:
single_seq = list(input_seq.values())[0]
log.info(S(f'input sequence: {single_seq}'))
# For the case when the user just enters sequence without .fasta
else:
single_seq = list(input_seq.values())[0]
log.info(S(f'input sequence: {single_seq}'))
log.info(S(f'input sequence: {input_seq}'))
# convert input_seq to a dict because that's how we will process
input_seq = {"A": input_seq}

# Calculates how many conformers are built per core
if nconfs < ncores:
Expand Down

0 comments on commit 25d94f0

Please sign in to comment.