Python Forum
MAWS.py PRGM:IndexError: list index out of range - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: MAWS.py PRGM:IndexError: list index out of range (/thread-20744.html)



MAWS.py PRGM:IndexError: list index out of range - bcramer - Aug-28-2019

I want to use a program called MAWS written in python in the year 2015, which in short,is used to predict aptamers (nucleotides) based on a molecular target (peptide, protein,etc). Unfortunately the person who wrote the program is not available. So I am trying to get help from python programmers/users to "adjust" the MAWS script.

Important to know: MAWS uses Amber/AmberTools (now in v19).

- MAWS script was updated with a newer force field "leaprc.DNA.bsc1" matching the Amber 2019 version. Updating lines 25, 1079, 1087, 1088 it became possible to calculate 'DGN','DAN','DTN','DCN' files with the prefix '.prmtop' respectively 'inpcrd'. This was not possible before this update.

However, although the MAWS calculates this initial part, it finalizes with the error bellow.
and I don't know how to solve it as I am not familiar with python. I found some similar erros in the internet, but I don't know how handle the proposed solution.
Any help is welcome. Maybe an experienced python programmer will identify what has to be 'adjusted' in the MAWS script.

---------------
bcramer@schrodinger:~/workdir-MAWS$ python3 MAWS_rev1.py -b 0.01 -i 200 -s 200 -l 15 -t 0.01 -f mol2 -y HYBRID PATH INFILE
Output:
['DGN', 'DAN', 'DTN', 'DCN']
Choosing from candidates ...
Constructing Ligand/Aptamer complex ...
Constructing Ligand/Aptamer complex ...
Constructing Ligand/Aptamer complex ...
Constructing Ligand/Aptamer complex ...
Aptamer/Ligand complex constructed.
Aptamer/Ligand complex constructed.
Loading Aptamer/Ligand complex ...
Loading Aptamer/Ligand complex ...
Aptamer/Ligand complex constructed.
Loading Aptamer/Ligand complex ...
Aptamer/Ligand complex constructed.
Loading Aptamer/Ligand complex ...
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/bcramer/miniconda3/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/bcramer/miniconda3/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "MAWS_rev1.py", line 1090, in initial
ligand_range = get_ligand_range(aptamer_top.topology)
File "MAWS_rev1.py", line 197, in get_ligand_range
return [get_ligand(topology)[0], len(get_ligand(topology))]
IndexError: list index out of range
"""
The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "MAWS_rev1.py", line 1357, in <module>
positions_and_Ntides = loop()
File "MAWS_rev1.py", line 1237, in loop
pos_Nt_S_task = pool.map(initial, alphabet)
File "/home/bcramer/miniconda3/lib/python3.7/multiprocessing/pool.py", line 268, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/home/bcramer/miniconda3/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
IndexError: list index out of range
---------------------
MAWS.py script can be downloaded from https://github.com/igemsoftware/Heidelberg_15