normal backward.py fails with "list index out of range"

  • scm177
  • scm177's Avatar Topic Author
  • Visitor
6 years 4 months ago #7428 by scm177
I have a system that has two types of peptides in a box.

The command I run (with output) is below:
./initram-v5.sh -f CG_FF_FNF_Assembly.gro -o aa_charmm.gro -to gromos54a7 -p topol.top

initram.sh version 0.1:

(c)2013 Tsjerk A. Wassenaar, PhD

University of Calgary
2500 University Drive NW
Calgary, Alberta
Canada, T2N 1N4

Now executing...

./initram-v5.sh -f CG_FF_FNF_Assembly.gro -o aa_charmm.gro -to gromos54a7 -p topol.top

Checking dependencies:
backward.py ... /home/scm177/Backmapping/backward/backward.py
gmx ... /usr/local/gromacs/bin/gmx
/home/scm177/Backmapping/backward/backward.py -f CG_FF_FNF_Assembly.gro -raw projected.gro -o 0-backward.gro -kick 0.05 -sol -p topol.top -po backmapped.top -n backmapped.ndx -from martini -to gromos54a7
Traceback (most recent call last):
File "/home/scm177/Backmapping/backward/backward.py", line 644, in <module>
struc = Structure(options["-f"].value,strict=options["-strict"].value)
File "/home/scm177/Backmapping/backward/backward.py", line 411, in __init__
crsp.append(crsp[-1])
IndexError: list index out of range


file:///home/scm177/Backmapping/backward/topol.top

Please Log in or Create an account to join the conversation.

More
6 years 4 months ago #7437 by riccardo
Are you sure you have all the mapping files (martini to gromos54a7) for the molecules you want to backmap in the "Mapping" directory?

Also, why would you call your atomistic gromos coordinates "aa_charmm.gro"? :-)

Please Log in or Create an account to join the conversation.

  • scm177
  • scm177's Avatar Topic Author
  • Visitor
6 years 4 months ago - 6 years 4 months ago #7440 by scm177
Hi Riccardo,

thanks for your response.

Yes I do: the only "molecules" in the system are Phe and Asn residues. The system is essentially chains of Fx-Ny peptide chains. As far as I can tell, phe.<forcefield>.map and asn.<forcefield>.map are standard in all mapping files...Please assist.

About naming it aa_charmm: ah yes. Didn't notice it, was trying to get the backmapping to work :)
Last edit: 6 years 4 months ago by scm177.

Please Log in or Create an account to join the conversation.

More
6 years 4 months ago #7441 by riccardo
Checking the mapping files provided with backward, I see that both phe and asn have indeed a gromos mapping file (i.e., phe.gromos.map and asn.gromos.map). However, if you look in, for example, phe.gromos.map, you'll see:
[ molecule ]
PHE

[ martini ]
BB SC1 SC2 SC3

[ mapping ]
gromos

...

As you can see, in the [ mapping ] section the string which appears is "gromos", and not "gromos54a7". I'm afraid that backward is not clever enough. Can you try if the following command works:
./initram-v5.sh -f CG_FF_FNF_Assembly.gro -o aa_gromos.gro -to gromos -p topol.top

An alternative would be to add the string "gromos54a7" to the mapping file section [ mapping ], as done below:
[ molecule ]
PHE

[ martini ]
BB SC1 SC2 SC3

[ mapping ]
gromos gromos54a7

...

Please Log in or Create an account to join the conversation.

  • scm177
  • scm177's Avatar Topic Author
  • Visitor
6 years 4 months ago #7442 by scm177
Hi again Riccardo,

I get the same error. Unsure why this is happening.


./initram-v5.sh -f CG_FF_FNF_Assembly.gro -o aa_gromos.gro -to gromos -p topol.top

Checking dependencies:
backward.py ... /home/scm177/Backmapping/backward/backward.py
gmx ... /usr/local/gromacs/bin/gmx
/home/scm177/Backmapping/backward/backward.py -f CG_FF_FNF_Assembly.gro -raw projected.gro -o 0-backward.gro -kick 0.05 -sol -p topol.top -po backmapped.top -n backmapped.ndx -from martini -to gromos
Traceback (most recent call last):
File "/home/scm177/Backmapping/backward/backward.py", line 644, in <module>
struc = Structure(options["-f"].value,strict=options["-strict"].value)
File "/home/scm177/Backmapping/backward/backward.py", line 411, in __init__
crsp.append(crsp[-1])
IndexError: list index out of range

Please Log in or Create an account to join the conversation.

More
6 years 4 months ago #7443 by riccardo
Alright, last things then:

(1) does the backmapping of a single peptide work? or even of a single amino acid (let's say "phe") just taken out of your system (i.e., delete everything but the peptide or amino acid beads) work?

(2) share the files with me (r [dot] alessandri [at] rug [dot] nl), I'll have a look

Please Log in or Create an account to join the conversation.

  • scm177
  • scm177's Avatar Topic Author
  • Visitor
6 years 4 months ago #7444 by scm177
Hi again,

1) Executing for a single peptide does not work either.
./initram-v5.sh -f singlepeptide.gro -o aa_gromos.gro -to gromos -p topol.top

initram.sh version 0.1:

(c)2013 Tsjerk A. Wassenaar, PhD

University of Calgary
2500 University Drive NW
Calgary, Alberta
Canada, T2N 1N4

Now executing...

./initram-v5.sh -f singlepeptide.gro -o aa_gromos.gro -to gromos -p topol.top

Checking dependencies:
backward.py ... /home/scm177/Backmapping/backward/backward.py
gmx ... /usr/local/gromacs/bin/gmx
/home/scm177/Backmapping/backward/backward.py -f singlepeptide.gro -raw projected.gro -o 0-backward.gro -kick 0.05 -sol -p topol.top -po backmapped.top -n backmapped.ndx -from martini -to gromos
Traceback (most recent call last):
File "/home/scm177/Backmapping/backward/backward.py", line 644, in <module>
struc = Structure(options["-f"].value,strict=options["-strict"].value)
File "/home/scm177/Backmapping/backward/backward.py", line 411, in __init__
crsp.append(crsp[-1])
IndexError: list index out of range


2) Emailing you the files shortly, thank you for assisting!

Please Log in or Create an account to join the conversation.

More
6 years 4 months ago #7456 by riccardo
The error is related with backward's backbone reconstruction breaking for a dipeptide (there's no cross product for a C-alpha triplet). We (i.e., Tsjerk & Co) are working on fixing this.

In the meantime, there's a workaround: renaming the BB (backbone) beads to, say, XX. So, for example, one can create a copy of phe.charmm36.map - let's name it fhe.charmm36.map - where the BB beads are renamed XX (and PHE became FHE). So, whenever part of a dipeptide, one should use the FHE phenylalanine (and something similar for the other eventual amino acid involved). Whenever part of a at-least-3-units-long amino acid, you can use the PHE phenylalanine (and all the other amino acids), as usual. Just make sure to change beads and residues names consistently in all the files involved.!

Please Log in or Create an account to join the conversation.

More
5 years 2 weeks ago #8070 by rituparna@22
Replied by rituparna@22 on topic backward.py fails with "list index out of range"
Hello Sir
I am working on gromacs 5.0.7. I have prepared an N-terminal capped phenylalanine as the single-peptide. I have created a box with 145 number of the above peptide present in it for self-aggregation. After simulation (output file is sim.gro),I want to backmap it with backward.py and initram.sh files. I have used the most up-to-date backward scripts and used the command-

./initram.sh -f sim.gro -o aa_gromos.gro -to gromos -p topol.top

But the following error is being shown-

initram.sh version 0.1:

(c)2014 Tsjerk A. Wassenaar, PhD

Computational Biology
Friedrich-Alexander University Erlangen-Nuernberg
Staudstrasse 5
91058 Erlangen
Germany


Now executing...

./initram.sh -f sim.gro -o aa_gromos.gro -to gromos -p topol.top

GROMACS VERSION: 5 0 7
MPI: false
/home/anish-ritu/RITUPARNA/backward-v5/new-github/Backward-master/backward.py -f sim.gro -raw projected.gro -o 0-backward.gro -kick 0.05 -sol -p topol.top -po backmapped.top -n backmapped.ndx -from martini -to gromos
Traceback (most recent call last):
File "/home/anish-ritu/RITUPARNA/backward-v5/new-github/Backward-master/backward.py", line 662, in <module>
struc = Structure(options["-f"].value,strict=options["-strict"].value)
File "/home/anish-ritu/RITUPARNA/backward-v5/new-github/Backward-master/backward.py", line 338, in __init__
b = [float(i) for i in lines[n].split()] + 6*[0] # Padding for rectangular boxes
IndexError: list index out of range

How to debug this?

Please Log in or Create an account to join the conversation.

More
5 years 2 weeks ago #8072 by riccardo
Hi,
Can you successfully backmap one single peptide?

Please Log in or Create an account to join the conversation.

More
5 years 2 weeks ago #8073 by rituparna@22
Replied by rituparna@22 on topic backward.py fails with "list index out of range"
Hello Sir
No I cannot even backmap one single peptide. My peptide is N-capped (by F-moc group) phenylalanine. I used the following command-

./initram.sh -f phenylalanine.pdb -o aa_gromos.gro -to gromos -p topol.top

But the following error showed-

initram.sh version 0.1:

(c)2014 Tsjerk A. Wassenaar, PhD

Computational Biology
Friedrich-Alexander University Erlangen-Nuernberg
Staudstrasse 5
91058 Erlangen
Germany


Now executing...

./initram.sh -f phenylalanine.pdb -o aa_gromos.gro -to gromos -p topol.top

GROMACS VERSION: 5 0 7
MPI: false
/home/anish-ritu/RITUPARNA/backward-v5/new-github/Backward-master/backward.py -f phenylalanine.pdb -raw projected.gro -o 0-backward.gro -kick 0.05 -sol -p topol.top -po backmapped.top -n backmapped.ndx -from martini -to gromos
Non-invertable box. Not able to unbreak molecules...
Traceback (most recent call last):
File "/home/anish-ritu/RITUPARNA/backward-v5/new-github/Backward-master/backward.py", line 662, in <module>
struc = Structure(options["-f"].value,strict=options["-strict"].value)
File "/home/anish-ritu/RITUPARNA/backward-v5/new-github/Backward-master/backward.py", line 425, in __init__
d12.append(d12[-1])
IndexError: list index out of range

Please Log in or Create an account to join the conversation.

More
5 years 2 weeks ago - 5 years 2 weeks ago #8074 by riccardo
As you can't backmap even a single peptide, I would guess that there must be some serious problem with your Mapping file and/or atomistic topology. I would first make sure that that's not the case.
The next suspect is the message "Non-invertable box. Not able to unbreak molecules...". Not sure I ever got this error message. Just to explore, though, what are the dimensions of your box? Is it cubic?
Last edit: 5 years 2 weeks ago by riccardo.

Please Log in or Create an account to join the conversation.

More
5 years 2 weeks ago #8075 by rituparna@22
Replied by rituparna@22 on topic backward.py fails with "list index out of range"
Yes it is cubic. 13 nm x 13nm x 13nm. I have inserted 300 peptides in it and solvated it with standard CG water.

Please Log in or Create an account to join the conversation.

More
5 years 2 weeks ago #8076 by riccardo
Right, but did you check the Mapping and/or atomistic atomistic topology? Do they match? Are you using standard mappings provided with backward?

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #8506 by shashank
Hello,

I am curious if i can get some help in backmapping my system to AA. I followed the aquaporin tutorial which worked perfectly fine. Along the same lines, i tried to convert the last frame of my CG trajectory but i am getting "list index out of range".

System details: I am working with a homotrimer with some unresolved regions (mostly loops). Bilayer constains POPC/CHOL.

I took the final gro file and executed:

./initram-v5.sh -f step7.1_production.gro -o aa_charmm.gro -to charmm36 -p system.top

Here is the output:
Checking dependencies:
backward.py ... /Users/shashankpant/Desktop/Research-PPT-Emad/Glt/CG/backward.py
gmx ... /usr/local/bin/gmx
/Users/shashankpant/Desktop/Research-PPT-Emad/Glt/CG/backward.py -f step7.1_production.gro -raw projected.gro -o 0-backward.gro -kick 0.05 -sol -p system.top -po backmapped.top -n backmapped.ndx -from martini -to charmm36
Vendor: continuum
Product: anaconda
Message: trial mode expires in 20 days
Traceback (most recent call last):
File "/Users/shashankpant/Desktop/Research-PPT-Emad/Glt/CG/backward.py", line 651, in <module>
struc = Structure(options["-f"].value,strict=options["-strict"].value)
File "/Users/shashankpant/Desktop/Research-PPT-Emad/Glt/CG/backward.py", line 417, in __init__
d12.append(d12[-1])
IndexError: list index out of range


I also tried converting a single amino acid in my file but it didnt work. As far as mapping is considered i downloaded it from: aquaporin tutorial and i have CHOL.itp file in the folder.

Thanks
Shashank

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #8521 by riccardo
I never remember what this (cryptic) error message is about.
Not even one single amino acid (in an empty box?) works? Just to make sure, the "system.top" is the atomistic topology, right?

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #8526 by cneale
I think this is a standard python error message that the code is trying to access a list element that is beyond the length of the list. I have encountered this error before while using backward.py when I was using a modified residue for which there was not a corresponding map file in the Mapping/ directory. In my case, adding the needed map file solved the issue. Here, that required map file could be a cap residue (e.g., the script package doesn't ship with a map file for a C-terminal NMA cap).

I am not sure why in my case this wasn't picked up by other tests in the script, but my best guess is that the script found and used a partial match of residue name and then there were not the expected number of atoms.

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago #8718 by larryhems
Replied by larryhems on topic backward.py fails with "list index out of range"

shashank wrote: IndexError: list index out of range


This error basically means you are trying to access a value at a List index which is out of bounds i.e greater than the last index of the list or less than the least index in the list. So the first element is 0, second is 1, so on. So if there are n elements in a python list , the last element is n-1 . If you try to access the empty or None element by pointing available index of the list, then you will get the "List index out of range " error. To solve this error, you should make sure that you're not trying to access a non-existent item in a list.

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #9450 by Saman Fatihi
Replied by Saman Fatihi on topic backward.py fails with "list index out of range"
I am trying to backmap protein from CG to AA using the backward.py script, the protein has a modified residue at GLY residue which is lipidated by a PE-tail. I have added the corresponding .map file in the Mapping/ directory which I created taking POPE and GLY map files as a reference. but I keep getting an error message (I will paste it below), can anyone help or tell me how to fix this?
The back mapping works fine without the modified residue, so I am guessing there is a problem with the created map file. I have matched the atoms in the topology file and map file.
#Command
python2 backward.py -f GLP-CG.gro -raw projected1.gro -o 0-backward1.gro -kick 0.05 -sol -p GLP-topol.top -po backmapped1.top -n backmapped1.ndx -from martini -to charmm36

#Error
Traceback (most recent call last):
File "backward.py", line 685, in <module>
struc = Structure(options["-f"].value, strict=options["-strict"].value)
File "backward.py", line 434, in __init__
d12.append(d12[-1])
IndexError: list index out of range

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #9451 by cneale
1. can you post your mapping file and one PDB/gro entry for this residue?
2. does the name in the [ molecule ] section match correctly?
3. is the [ martini ] section complete?
4. if you remove your new mapping file, then do you get the exact same error ? (in this case, the original issue might be because misnaming is leading your mapping file to be not found at all rather than that it is found but incorrect).

Please Log in or Create an account to join the conversation.

Time to create page: 0.127 seconds