Hi Leila, r.ndx would be the index file indeed. Sorry for not explicitly mentioning that. For the rest, the most important question is 'did it work?' Knowing python is not so important, unless you're determined to understand how it works :) As for the numbers, python always goes up to, not including. So, to get a series from 1 to 10, you'd do range(1,11). The line builds three ranges, so I aliased the function 'range' to 'r' to shorten the line. There's a lot of malpractice in that line ;) but it works, right?
By the way, Python is worth your while. It's actually renowned for it's clarity. But anything can be obscured :p Cheers, Tsjerk On Jan 3, 2011 6:39 PM, "leila karami" <karami.lei...@gmail.com> wrote: Dear Tsjerk thanks for your reply I have not experience in using python. in [python -c 'r,a,b,c=range,1868,24086,24100;open("r.ndx","w").write("[x]\n"+"\n".join([str(i) for i in r(1,a)+r(b,c)+r(a,b)]))']. r.ndx contains all the atoms. is it true? why did you use r,a,b,c=range,1868,24086,24100. is r,a,b,c=range,1867,24085,24099 wrong? -- Leila Karami Ph.D. student of Physical Chemistry K.N. Toosi University of Technology Theoretical Physical Chemistry Group -- gmx-users mailing list gmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
-- gmx-users mailing list gmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists