Very nice!<br><br>Your termsize function doesn&#39;t seem to work on my Mac, but the one from here (<a href="http://www.finalcog.com/terminal-size-python">http://www.finalcog.com/terminal-size-python</a>) does.<br><br><div class="gmail_quote">
On Thu, Nov 5, 2009 at 11:19 AM, Tsjerk Wassenaar <span dir="ltr">&lt;<a href="mailto:tsjerkw@gmail.com">tsjerkw@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
Well, if we&#39;re exchanging xvg viewers... This one I wrote for quickly<br>
viewing xvg files in a terminal. It converts the graph to ascii,<br>
fitting automatically to the terminal size. It can also be used to<br>
generate (ramachandran) density plots. Should still add proper help<br>
info, but the options are:<br>
<br>
-f xvg file<br>
-g [optional] second xvg file to plot one against the other<br>
-c column to plot<br>
-d [optional] column to plot, will plot one column against the other,<br>
or use this column from second xvg file if given<br>
-x minimum x value<br>
-X maximum X value<br>
-y minimum y value<br>
-Y maximum y value<br>
--square force square display<br>
--angles set x=-180, X=180, y=-180, Y=180<br>
<br>
Hope it&#39;s of some use to some one :)<br>
<br>
Tsjerk<br>
<div><div></div><div class="h5"><br>
On Thu, Nov 5, 2009 at 4:29 PM, Michael Lerner<br>
&lt;<a href="mailto:mglerner%2Bgromacs@gmail.com">mglerner+gromacs@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Nov 5, 2009 at 10:23 AM, Erik Marklund &lt;<a href="mailto:erikm@xray.bmc.uu.se">erikm@xray.bmc.uu.se</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; So, what&#39;s the advantage over using e.g. (xm)grace?<br>
&gt;<br>
&gt; I&#39;m not sure. The last time I tried, xmgrace refused to install on my Mac.<br>
&gt;<br>
&gt; This certainly isn&#39;t a big analysis/plotting package. It&#39;s just a quick way<br>
&gt; to step through XVG files.<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; /Erik<br>
&gt;&gt;<br>
&gt;&gt; Michael Lerner skrev:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; (My apologies if this shows up several times. I sent it yesterday, but it<br>
&gt;&gt;&gt; appears that it won&#39;t go through to the list if I include a screenshot.)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I wanted a quick way to plot the data in XVG files, so I wrote a quick<br>
&gt;&gt;&gt; little GUI viewer in Python this morning. You point it at an XVG file and it<br>
&gt;&gt;&gt; pops up a GUI where you can click buttons to step through the columns of<br>
&gt;&gt;&gt; data, plot individual columns from the XVG file, or make a plot of<br>
&gt;&gt;&gt; everything in the XVG file.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; This makes it easy to dump all the information from an .edr/trr/xtc/etc<br>
&gt;&gt;&gt; file and step through it visually in 30 seconds. That, in turn, makes me way<br>
&gt;&gt;&gt; more likely to look at as much information as possible as part of my normal<br>
&gt;&gt;&gt; workflow.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I&#39;ve only tested this on a few of my own XVG files, so it&#39;s possible that<br>
&gt;&gt;&gt; my simple XVG parser doesn&#39;t cover everything.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Here&#39;s the help output. Let me know if anyone finds it useful.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Michael-Lerners-MacBook-Pro-2: ~ mglerner$ ./xvgviewer.py --help<br>
&gt;&gt;&gt; Usage: Just a simple XVG viewer.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; For each column in the XVG file, we plot<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  - the raw data (light blue)<br>
&gt;&gt;&gt;  - a running average (black)<br>
&gt;&gt;&gt;  - block averages (green)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; We also print out<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  - the average over the simulation<br>
&gt;&gt;&gt;  - standard error over the blocks<br>
&gt;&gt;&gt;  - average of the standard deviations within each block<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Block length is reported in number of frames, and its meaning will<br>
&gt;&gt;&gt; therefore depend on the settings in your .mdp file as well as the<br>
&gt;&gt;&gt; arguments you used when making the .xvg file.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; We attempt to get units out of the XVG file, and we convert times to<br>
&gt;&gt;&gt; nanoseconds before plotting.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; This program requires<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  - Python 2.5 or 2.6<br>
&gt;&gt;&gt;  - wxPython 2.8.7.1+ (<a href="http://www.wxpython.org/" target="_blank">http://www.wxpython.org/</a>)<br>
&gt;&gt;&gt;  - numpy 1.3.0+ (<a href="http://numpy.scipy.org/" target="_blank">http://numpy.scipy.org/</a>)<br>
&gt;&gt;&gt;  - matplotlib 0.99.0+ (<a href="http://matplotlib.sourceforge.net/" target="_blank">http://matplotlib.sourceforge.net/</a>)<br>
&gt;&gt;&gt;  - traits 3.2.0+ (<a href="http://code.enthought.com/projects/traits/" target="_blank">http://code.enthought.com/projects/traits/</a>)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; All of which will be installed for you if you use the Enthought Python<br>
&gt;&gt;&gt; Distribution (<a href="http://enthought.com/" target="_blank">http://enthought.com/</a>).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I mostly wrote this as a quick way to figure out how to use the Traits<br>
&gt;&gt;&gt; GUI, but feel free to email me (m g lerner atsign gmail dot com) if<br>
&gt;&gt;&gt; you have any questions.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Options:<br>
&gt;&gt;&gt;  -h, --help            show this help message and exit<br>
&gt;&gt;&gt;  -f FILE, --file=FILE  The XVG file [default energy.xvg]<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Cheers,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; -Michael<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Michael Lerner, Ph.D.<br>
&gt;&gt;&gt; IRTA Postdoctoral Fellow<br>
&gt;&gt;&gt; Laboratory of Computational Biology NIH/NHLBI<br>
&gt;&gt;&gt; 5635 Fishers Lane, Room T909, MSC 9314<br>
&gt;&gt;&gt; Rockville, MD 20852 (UPS/FedEx/Reality)<br>
&gt;&gt;&gt; Bethesda MD 20892-9314 (USPS)<br>
&gt;&gt;&gt; ------------------------------------------------------------------------<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
&gt;&gt;&gt; <a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
&gt;&gt;&gt; Please search the archive at <a href="http://www.gromacs.org/search" target="_blank">http://www.gromacs.org/search</a> before<br>
&gt;&gt;&gt; posting!<br>
&gt;&gt;&gt; Please don&#39;t post (un)subscribe requests to the list. Use the www<br>
&gt;&gt;&gt; interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
&gt;&gt;&gt; Can&#39;t post? Read <a href="http://www.gromacs.org/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; -----------------------------------------------<br>
&gt;&gt; Erik Marklund, PhD student<br>
&gt;&gt; Laboratory of Molecular Biophysics,<br>
&gt;&gt; Dept. of Cell and Molecular Biology, Uppsala University.<br>
&gt;&gt; Husargatan 3, Box 596,    75124 Uppsala, Sweden<br>
&gt;&gt; phone:    +46 18 471 4537        fax: +46 18 511 755<br>
&gt;&gt; <a href="mailto:erikm@xray.bmc.uu.se">erikm@xray.bmc.uu.se</a>    <a href="http://xray.bmc.uu.se/molbiophys" target="_blank">http://xray.bmc.uu.se/molbiophys</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
&gt;&gt; <a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
&gt;&gt; Please search the archive at <a href="http://www.gromacs.org/search" target="_blank">http://www.gromacs.org/search</a> before posting!<br>
&gt;&gt; Please don&#39;t post (un)subscribe requests to the list. Use the www<br>
&gt;&gt; interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
&gt;&gt; Can&#39;t post? Read <a href="http://www.gromacs.org/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Michael Lerner, Ph.D.<br>
&gt; IRTA Postdoctoral Fellow<br>
&gt; Laboratory of Computational Biology NIH/NHLBI<br>
&gt; 5635 Fishers Lane, Room T909, MSC 9314<br>
&gt; Rockville, MD 20852 (UPS/FedEx/Reality)<br>
&gt; Bethesda MD 20892-9314 (USPS)<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
&gt; <a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
&gt; Please search the archive at <a href="http://www.gromacs.org/search" target="_blank">http://www.gromacs.org/search</a> before posting!<br>
&gt; Please don&#39;t post (un)subscribe requests to the list. Use the<br>
&gt; www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
&gt; Can&#39;t post? Read <a href="http://www.gromacs.org/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br>
&gt;<br>
<br>
<br>
<br>
--<br>
</div></div>Tsjerk A. Wassenaar, Ph.D.<br>
Junior UD (post-doc)<br>
Biomolecular NMR, Bijvoet Center<br>
Utrecht University<br>
Padualaan 8<br>
3584 CH Utrecht<br>
The Netherlands<br>
P: +31-30-2539931<br>
F: +31-30-2537623<br>
<br>_______________________________________________<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/search" target="_blank">http://www.gromacs.org/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/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br></blockquote></div><br><br clear="all"><br>-- <br>Michael Lerner, Ph.D.<br>
IRTA Postdoctoral Fellow<br>Laboratory of Computational Biology NIH/NHLBI<br>5635 Fishers Lane, Room T909, MSC 9314<br>Rockville, MD 20852 (UPS/FedEx/Reality)<br>Bethesda MD 20892-9314 (USPS)<br>