<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 &#39;did it work?&#39; Knowing python is not so important, unless you&#39;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&#39;d do range(1,11). The line builds three ranges, so I aliased the function &#39;range&#39; to &#39;r&#39; to shorten the line. There&#39;s a lot of malpractice in that line ;) but it works, right?</p>

<p>By the way, Python is worth your while. It&#39;s actually renowned for it&#39;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, &quot;leila karami&quot; &lt;<a href="mailto:karami.leila1@gmail.com">karami.leila1@gmail.com</a>&gt; 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 &#39;r,a,b,c=range,1868,24086,24100;open(&quot;r.ndx&quot;,&quot;w&quot;).write(&quot;[x]\n&quot;+&quot;\n&quot;.join([str(i)<br>
for i in r(1,a)+r(b,c)+r(a,b)]))&#39;].<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&#39;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&#39;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>