[gmx-users] About Mike Harms python script

lloyd riggs lloyd.riggs at gmx.ch
Sun Jun 17 10:56:57 CEST 2012


Dear Vidhyh Sankar,

>IndexError: list index out of range

When a program reads in lists or arrays, in the software there is usually a set size, for lines or number of atoms, etc... If the array or list is longer than the set value you get this error.  Also, if a counter is off, ie stops one short through an iteration usually from not reading lines properly or geting a returned length for an index which has changed in length...

It either means one of the following:

2 of your files dont match in size (ie number of atoms)
1 of your files has the formatting wrong, ie lines are speced too long, so it doesnt read them properly
or theres a problem with the script, where it gets incorrect index lenghts.

if you look at the lines mentioned in the setupUmbrella.py script, it will tell you exactly what it is trying to read in, and you can then either know if its missmatch, or your files are formatted wrong.

Id wait and see, somone might be able to tell you off the bat exactly what the error is though.  In my experience, it can often be a secound carriage return or space at the end of a .gro, or .dat or .sh file.

Stephan Watkins

-------- Original-Nachricht --------
> Datum: Sat, 16 Jun 2012 23:49:06 +0800 (SGT)
> Von: vidhya sankar <scvsankar_agr at yahoo.com>
> An: "gmx-users at gromacs.org" <gmx-users at gromacs.org>
> Betreff: [gmx-users] About Mike Harms python script

> Dear justin  Thank you for your previous reply
> 
>                   I am doing  Umbrella sampling in
> gromacs 
> 
> I have 30 set of initial configuration in .gro file format .Now i would
> like to do NPT equilibration and  umbrella sampling for all these
> configuration  (for these i have to carry out 30 times equilibration and 30 times
> umbrella sampling)  to  Automate these process i used the python script
> provided by Mike Harms. but when invoke the command as follows
> ./setupUmbrella.py summary_distances.dat 0.2 run-umbrella.sh &>
> caught-output.txt
> I got error as follows in Caught_output .txt
> 
> 
> Traceback (most recent call last):
>   File "./setupUmbrella.py", line 182, in <module>
>     out = main() 
>   File "./setupUmbrella.py", line 150, in main
>     distance_table = readDistanceFile(distance_file)
>   File "./setupUmbrella.py", line 49, in readDistanceFile
>     value = float(columns[1])
> IndexError: list index out of range
> 
> I  have all the required files ( index.ndx files , dist.xvg files, , .gro
> files and .mdp files) in the  running directory
> 
> How to solve these error
> Thanks In advance

-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a



More information about the gromacs.org_gmx-users mailing list