Very nice!<br><br>Your termsize function doesn'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"><<a href="mailto:tsjerkw@gmail.com">tsjerkw@gmail.com</a>></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'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'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>
<<a href="mailto:mglerner%2Bgromacs@gmail.com">mglerner+gromacs@gmail.com</a>> wrote:<br>
><br>
><br>
> On Thu, Nov 5, 2009 at 10:23 AM, Erik Marklund <<a href="mailto:erikm@xray.bmc.uu.se">erikm@xray.bmc.uu.se</a>> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> So, what's the advantage over using e.g. (xm)grace?<br>
><br>
> I'm not sure. The last time I tried, xmgrace refused to install on my Mac.<br>
><br>
> This certainly isn't a big analysis/plotting package. It's just a quick way<br>
> to step through XVG files.<br>
><br>
>><br>
>> /Erik<br>
>><br>
>> Michael Lerner skrev:<br>
>>><br>
>>> Hi,<br>
>>><br>
>>> (My apologies if this shows up several times. I sent it yesterday, but it<br>
>>> appears that it won't go through to the list if I include a screenshot.)<br>
>>><br>
>>> I wanted a quick way to plot the data in XVG files, so I wrote a quick<br>
>>> little GUI viewer in Python this morning. You point it at an XVG file and it<br>
>>> pops up a GUI where you can click buttons to step through the columns of<br>
>>> data, plot individual columns from the XVG file, or make a plot of<br>
>>> everything in the XVG file.<br>
>>><br>
>>> This makes it easy to dump all the information from an .edr/trr/xtc/etc<br>
>>> file and step through it visually in 30 seconds. That, in turn, makes me way<br>
>>> more likely to look at as much information as possible as part of my normal<br>
>>> workflow.<br>
>>><br>
>>> I've only tested this on a few of my own XVG files, so it's possible that<br>
>>> my simple XVG parser doesn't cover everything.<br>
>>><br>
>>> Here's the help output. Let me know if anyone finds it useful.<br>
>>><br>
>>><br>
>>> Michael-Lerners-MacBook-Pro-2: ~ mglerner$ ./xvgviewer.py --help<br>
>>> Usage: Just a simple XVG viewer.<br>
>>><br>
>>> For each column in the XVG file, we plot<br>
>>><br>
>>> - the raw data (light blue)<br>
>>> - a running average (black)<br>
>>> - block averages (green)<br>
>>><br>
>>> We also print out<br>
>>><br>
>>> - the average over the simulation<br>
>>> - standard error over the blocks<br>
>>> - average of the standard deviations within each block<br>
>>><br>
>>> Block length is reported in number of frames, and its meaning will<br>
>>> therefore depend on the settings in your .mdp file as well as the<br>
>>> arguments you used when making the .xvg file.<br>
>>><br>
>>> We attempt to get units out of the XVG file, and we convert times to<br>
>>> nanoseconds before plotting.<br>
>>><br>
>>> This program requires<br>
>>><br>
>>> - Python 2.5 or 2.6<br>
>>> - wxPython 2.8.7.1+ (<a href="http://www.wxpython.org/" target="_blank">http://www.wxpython.org/</a>)<br>
>>> - numpy 1.3.0+ (<a href="http://numpy.scipy.org/" target="_blank">http://numpy.scipy.org/</a>)<br>
>>> - matplotlib 0.99.0+ (<a href="http://matplotlib.sourceforge.net/" target="_blank">http://matplotlib.sourceforge.net/</a>)<br>
>>> - traits 3.2.0+ (<a href="http://code.enthought.com/projects/traits/" target="_blank">http://code.enthought.com/projects/traits/</a>)<br>
>>><br>
>>> All of which will be installed for you if you use the Enthought Python<br>
>>> Distribution (<a href="http://enthought.com/" target="_blank">http://enthought.com/</a>).<br>
>>><br>
>>> I mostly wrote this as a quick way to figure out how to use the Traits<br>
>>> GUI, but feel free to email me (m g lerner atsign gmail dot com) if<br>
>>> you have any questions.<br>
>>><br>
>>><br>
>>> Options:<br>
>>> -h, --help show this help message and exit<br>
>>> -f FILE, --file=FILE The XVG file [default energy.xvg]<br>
>>><br>
>>><br>
>>> Cheers,<br>
>>><br>
>>> -Michael<br>
>>><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>
>>> ------------------------------------------------------------------------<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<br>
>>> posting!<br>
>>> Please don't post (un)subscribe requests to the list. Use the www<br>
>>> 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/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br>
>><br>
>><br>
>> --<br>
>> -----------------------------------------------<br>
>> Erik Marklund, PhD student<br>
>> Laboratory of Molecular Biophysics,<br>
>> Dept. of Cell and Molecular Biology, Uppsala University.<br>
>> Husargatan 3, Box 596, 75124 Uppsala, Sweden<br>
>> phone: +46 18 471 4537 fax: +46 18 511 755<br>
>> <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>
>><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't post (un)subscribe requests to the list. Use the www<br>
>> 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/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br>
><br>
><br>
><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>
><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'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/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br>
><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'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/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>