<p>Hi Leila,</p>
<p>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?</p>
<p>By the way, Python is worth your while. It's actually renowned for it's clarity. But anything can be obscured :p</p>
<p>Cheers,</p>
<p>Tsjerk</p>
<p><blockquote type="cite">On Jan 3, 2011 6:39 PM, "leila karami" <<a href="mailto:karami.leila1@gmail.com">karami.leila1@gmail.com</a>> wrote:<br><br>Dear Tsjerk<br>
<br>
thanks for your reply<br>
<br>
I have not experience in using python.<br>
<br>
in [python -c 'r,a,b,c=range,1868,24086,24100;open("r.ndx","w").write("[x]\n"+"\n".join([str(i)<br>
for i in r(1,a)+r(b,c)+r(a,b)]))'].<br>
<br>
r.ndx contains all the atoms. is it true?<br>
<br>
why did you use r,a,b,c=range,1868,24086,24100.<br>
<br>
is r,a,b,c=range,1867,24085,24099 wrong?<br>
<br>
<br>
--<br>
<br>
<br>
Leila Karami<br>
Ph.D. student of Physical Chemistry<br>
K.N. Toosi University of Technology<br>
Theoretical Physical Chemistry Group<br>
<font color="#888888">--<br>
gmx-users mailing list <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>
Please don't post (un)subscribe requests to the list. Use the<br>
www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
Can't post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
</font></blockquote></p>