Python Forum
MAWS.py PRGM:IndexError: list index out of range
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MAWS.py PRGM:IndexError: list index out of range
#1
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  IndexError: index 10 is out of bounds for axis 0 with size 10 Mehboob 11 1,948 Sep-14-2023, 06:54 AM
Last Post: Mehboob
Thumbs Down I hate "List index out of range" Melen 20 3,154 May-14-2023, 06:43 AM
Last Post: deanhystad
Exclamation IndexError: Replacement index 2 out of range for positional args tuple - help? MrKnd94 2 5,956 Oct-14-2022, 09:57 PM
Last Post: MrKnd94
  IndexError: list index out of range dolac 4 1,843 Jul-25-2022, 03:42 PM
Last Post: deanhystad
  I'm getting a String index out of range error debian77 7 2,277 Jun-26-2022, 09:50 AM
Last Post: deanhystad
  IndexError: list index out of range Anldra12 2 1,408 May-03-2022, 01:39 PM
Last Post: Anldra12
  TypeError: list indices must be integers or slices, not range Anldra12 2 2,499 Apr-22-2022, 10:56 AM
Last Post: Anldra12
  matplotlib x axis range goes over the set range Pedroski55 5 3,101 Nov-21-2021, 08:40 AM
Last Post: paul18fr
  IndexError: list index out of range rf_kartal 6 2,761 Sep-07-2021, 02:36 PM
Last Post: Larz60+
  Python Error List Index Out of Range abhi1vaishnav 3 2,234 Sep-03-2021, 08:40 PM
Last Post: abhi1vaishnav

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020