backward.py fails with "list index out of range"
- scm177
- Topic Author
- Visitor
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.
- riccardo
- Offline
- Platinum Boarder
Also, why would you call your atomistic gromos coordinates "aa_charmm.gro"? :-)
Please Log in or Create an account to join the conversation.
- scm177
- Topic Author
- Visitor
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 :)
Please Log in or Create an account to join the conversation.
- riccardo
- Offline
- Platinum Boarder
[ 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
- Topic Author
- Visitor
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.
- riccardo
- Offline
- Platinum Boarder
(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
- Topic Author
- Visitor
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.
- riccardo
- Offline
- Platinum Boarder
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.
- rituparna@22
- Offline
- Fresh Boarder
- Posts: 8
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.
- riccardo
- Offline
- Platinum Boarder
Can you successfully backmap one single peptide?
Please Log in or Create an account to join the conversation.
- rituparna@22
- Offline
- Fresh Boarder
- Posts: 8
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.
- riccardo
- Offline
- Platinum Boarder
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?
Please Log in or Create an account to join the conversation.
- rituparna@22
- Offline
- Fresh Boarder
- Posts: 8
Please Log in or Create an account to join the conversation.
- riccardo
- Offline
- Platinum Boarder
Please Log in or Create an account to join the conversation.
- shashank
- Offline
- Fresh Boarder
- Posts: 1
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.
- riccardo
- Offline
- Platinum Boarder
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.
- cneale
- Offline
- Junior Boarder
- Posts: 22
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.
- larryhems
- Offline
- Fresh Boarder
- Posts: 1
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.
- Saman Fatihi
- Offline
- Fresh Boarder
- Posts: 10
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.
- cneale
- Offline
- Junior Boarder
- Posts: 22
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.