<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> File "./xtcrev.py", line 68, in <module><br> 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
<tsjerkw@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> mohammad agha <mra_bu@yahoo.com>; Discussion list for GROMACS users <gmx-users@gromacs.org> <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 > 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 <<a ymailto="mailto:mra_bu@yahoo.com" href="mailto:mra_bu@yahoo.com">mra_bu@yahoo.com</a>> wrote:<br>> Hi Tsjerk,<br>><br>> I know that my question is silly but please help me.<br>> I installed python2.5 on my system, then I ran "./xtcrev.py 1a.xtc ><br>> 1a-rev.xtc" but it gave me following error:<br>><br>> Traceback (most recent call last):<br>> File "./xtcrev.py", line 54, in <module><br>> n = 92 +
i(f.read(84)[-4:]) # Size of frame in bytes<br>> File "./xtcrev.py", line 24, in i<br>><br>> def i(x): return sum([ord(x[j])<<(24-j*8) for j in range(4)])<br>> IndexError: string index out of range<br>><br>> I know that j is out of range but I don't know that what should I do<br>> exactly?<br>> May I ask you to help me, Please?<br>><br>> Best Regards<br>> Sara<br>> ________________________________<br>> From: Tsjerk Wassenaar <<a ymailto="mailto:tsjerkw@gmail.com" href="mailto:tsjerkw@gmail.com">tsjerkw@gmail.com</a>><br>> To: mohammad agha <<a ymailto="mailto:mra_bu@yahoo.com" href="mailto:mra_bu@yahoo.com">mra_bu@yahoo.com</a>>; Discussion list for GROMACS users<br>> <<a ymailto="mailto:gmx-users@gromacs.org" href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a>><br>> Sent: Saturday, December 31, 2011 3:41
PM<br>><br>> Subject: Re: Fw: [gmx-users] trjconv in martini<br>><br>> Hi Sara,<br>><br>>> # Extract the first part of the trajectory<br>>> trjconv -s md.tpr -f md.trr -n index.ndx -o 1a.xtc -e 19999<br>><br>> That should be -e 199999 :) But you can also use -e 200000. Probably<br>> that is better. I first thought it'd be better to avoid a double<br>> frame, but since trjcat is used to combine the parts again, it doesn't<br>> matter.<br>><br>> Good luck,<br>><br>> Tsjerk<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>><br>> --<br>> gmx-users mailing list <a
ymailto="mailto:gmx-users@gromacs.org" href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>> http://lists.gromacs.org/mailman/listinfo/gmx-users<br>> Please search the archive at<br>> <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 ymailto="mailto:gmx-users-request@gromacs.org" href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>> 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>