<html><body><div style="color:#000; background-color:#fff; font-family:bookman old style, new york, times, serif;font-size:14pt"><div><span>Hi Tsjerk,</span></div><div><br><span></span></div><div><span>Thank you very much from your reply. Yes, you're right, I corrected that, but now it gave me this error:<br></span></div><div><br><span></span><span>Traceback (most recent call last):<br>&nbsp; File "./xtcrev.py", line 68, in &lt;module&gt;<br>&nbsp;&nbsp;&nbsp; o = open(sys.argv[2],"w")<br>IndexError: list index out of range<br></span></div><div><br></div><div>May I ask you to help me, please?</div><div><br></div><div>Best Regards</div><div>Sara<br></div>  <div style="font-family: bookman old style, new york, times, serif; font-size: 14pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Tsjerk Wassenaar
 &lt;tsjerkw@gmail.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> mohammad agha &lt;mra_bu@yahoo.com&gt;; Discussion list for GROMACS users &lt;gmx-users@gromacs.org&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, January 11, 2012 12:54 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: Fw: [gmx-users] trjconv in martini<br> </font> <br>
Hi Sara,<br><br>That can only happen if the input file is empty.<br>But I now see that the output file should be given as second argument,<br>so it should be<br><br>./xtcrev.py input.xtc output.xtc<br><br>rather than<br><br>./xtcrev.py input.xtc &gt; output.xtc<br><br>The latter will actually result in an empty xtc file. Maybe that's the<br>cause of the problem? Sorry about that.<br><br>Cheers,<br><br>Tsjerk<br><br>On Tue, Jan 10, 2012 at 6:38 PM, mohammad agha &lt;<a ymailto="mailto:mra_bu@yahoo.com" href="mailto:mra_bu@yahoo.com">mra_bu@yahoo.com</a>&gt; wrote:<br>&gt; Hi Tsjerk,<br>&gt;<br>&gt; I know that my question is silly but please help me.<br>&gt; I installed python2.5 on my system, then I ran "./xtcrev.py 1a.xtc &gt;<br>&gt; 1a-rev.xtc" but it gave me following error:<br>&gt;<br>&gt; Traceback (most recent call last):<br>&gt; &nbsp; File "./xtcrev.py", line 54, in &lt;module&gt;<br>&gt; &nbsp;&nbsp;&nbsp; n&nbsp;&nbsp; = 92 +
 i(f.read(84)[-4:])&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Size of frame in bytes<br>&gt; &nbsp; File "./xtcrev.py", line 24, in i<br>&gt;<br>&gt; &nbsp;&nbsp;&nbsp; def i(x): return sum([ord(x[j])&lt;&lt;(24-j*8) for j in range(4)])<br>&gt; IndexError: string index out of range<br>&gt;<br>&gt; I know that j is out of range but I don't know that what should I do<br>&gt; exactly?<br>&gt; May I ask you to help me, Please?<br>&gt;<br>&gt; Best Regards<br>&gt; Sara<br>&gt; ________________________________<br>&gt; From: Tsjerk Wassenaar &lt;<a ymailto="mailto:tsjerkw@gmail.com" href="mailto:tsjerkw@gmail.com">tsjerkw@gmail.com</a>&gt;<br>&gt; To: mohammad agha &lt;<a ymailto="mailto:mra_bu@yahoo.com" href="mailto:mra_bu@yahoo.com">mra_bu@yahoo.com</a>&gt;; Discussion list for GROMACS users<br>&gt; &lt;<a ymailto="mailto:gmx-users@gromacs.org" href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a>&gt;<br>&gt; Sent: Saturday, December 31, 2011 3:41
 PM<br>&gt;<br>&gt; Subject: Re: Fw: [gmx-users] trjconv in martini<br>&gt;<br>&gt; Hi Sara,<br>&gt;<br>&gt;&gt; # Extract the first part of the trajectory<br>&gt;&gt; trjconv -s md.tpr -f md.trr -n index.ndx -o 1a.xtc -e 19999<br>&gt;<br>&gt; That should be -e 199999 :) But you can also use -e 200000. Probably<br>&gt; that is better. I first thought it'd be better to avoid a double<br>&gt; frame, but since trjcat is used to combine the parts again, it doesn't<br>&gt; matter.<br>&gt;<br>&gt; Good luck,<br>&gt;<br>&gt; Tsjerk<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Tsjerk A. Wassenaar, Ph.D.<br>&gt;<br>&gt; post-doctoral researcher<br>&gt; Molecular Dynamics Group<br>&gt; * Groningen Institute for Biomolecular Research and Biotechnology<br>&gt; * Zernike Institute for Advanced Materials<br>&gt; University of Groningen<br>&gt; The Netherlands<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; gmx-users mailing list &nbsp; &nbsp;<a
 ymailto="mailto:gmx-users@gromacs.org" href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>&gt; http://lists.gromacs.org/mailman/listinfo/gmx-users<br>&gt; Please search the archive at<br>&gt; <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>&gt; Please don't post (un)subscribe requests to the list. Use the<br>&gt; www interface or send it to <a ymailto="mailto:gmx-users-request@gromacs.org" href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>&gt; Can't post? Read http://www.gromacs.org/Support/Mailing_Lists<br><br><br><br>-- <br>Tsjerk A. Wassenaar, Ph.D.<br><br>post-doctoral researcher<br>Molecular Dynamics Group<br>* Groningen Institute for Biomolecular Research and Biotechnology<br>* Zernike Institute for Advanced Materials<br>University of Groningen<br>The Netherlands<br><br><br> </div> </div> 
 </div></body></html>