Re: [AMBER] Replacement for xmgrace

From: Jean-Patrick Francoia <jeanpatrick.francoia.gmail.com>
Date: Mon, 1 Feb 2016 20:27:13 +0100

Sorry, I misunderstood. Here you are (again).

Le 01/02/2016 15:52, Jean-Patrick Francoia a écrit :
> Here you are
>
> Le 01/02/2016 15:36, Jason Swails a écrit :
>> Can you provide the mdout file that failed here?
>>
>> On Mon, Feb 1, 2016 at 9:32 AM, Jean-Patrick Francoia <
>> jeanpatrick.francoia.gmail.com> wrote:
>>
>>> Cool.
>>>
>>> It's buggy however:
>>>
>>> Traceback (most recent call last):
>>> File "/home/djipey/SOFT/amber14/bin/mdout_analyzer.py", line 63, in
>>> <module>
>>> mdout = MdoutClass(f)
>>> File
>>>
>>> "/home/djipey/SOFT/amber14/lib/python2.7/site-packages/mdoutanalyzer/mdout.py",
>>>
>>> line 82, in __init__
>>> if self.properties['imin'] == 5:
>>> KeyError: 'imin'
>>>
>>> Le 01/02/2016 15:05, Jason Swails a écrit :
>>>> If you're trying to plot data from mdout files, you can always try
>>>> "mdout_analyzer.py". It's built on top of matplotlib and doesn't
>>>> require
>>>> any pre-processing step for mdout files (i.e., you can just type:
>>>>
>>>> mdout_analyzer.py mdout1 mdout2 ... mdoutN
>>>> )
>>>>
>>>> HTH,
>>>> Jason
>>>>
>>>> On Mon, Feb 1, 2016 at 8:57 AM, Jean-Patrick Francoia <
>>>> jeanpatrick.francoia.gmail.com> wrote:
>>>>
>>>>> "Plots generally look good"...Yeah maybe with a little formatting
>>>>> as you
>>>>> suggested. Actually xmgrace has an old look on my platform, a bit
>>>>> like
>>>>> xleap. That's why I will go for gnuplot.
>>>>>
>>>>> I had a bit of spare time, so I wrote a quick script:
>>>>>
>>>>> #!/usr/bin/python
>>>>> # coding: utf-8
>>>>>
>>>>> help = """Plot.py
>>>>>
>>>>> Script to plot (x, y) data from files
>>>>>
>>>>> Usage:
>>>>> plot.py <files>...
>>>>>
>>>>> Options:
>>>>> -h --help Display help
>>>>> """
>>>>>
>>>>>
>>>>> from docopt import docopt
>>>>> import matplotlib.pyplot as plt
>>>>>
>>>>> plt.style.use('ggplot')
>>>>> plt.style.use('seaborn-poster')
>>>>> plt.tick_params(left='off', bottom='off', top='off', right='off')
>>>>>
>>>>>
>>>>> arguments = docopt(help)
>>>>>
>>>>> for arg in arguments['<files>']:
>>>>> pts_x = []
>>>>> pts_y = []
>>>>>
>>>>> with open(arg, 'r') as f:
>>>>> for line in f.readlines():
>>>>> res = [float(value.strip()) for value in
>>>>> line.split(' ')
>>>>> if value.strip() != '']
>>>>> if res:
>>>>> pts_x.append(res[0])
>>>>> pts_y.append(res[1])
>>>>>
>>>>> plt.plot(pts_x, pts_y, label=arg)
>>>>>
>>>>> plt.legend()
>>>>> plt.show()
>>>>>
>>>>> Just to try docopt and the new version of matplotlib (which includes
>>>>> styles). The graph formatting is clearly R-inspired (the devs of
>>>>> matplotlib finally underestood...).
>>>>>
>>>>> Usage:
>>>>> ./plot.py summary.EPTOT summary.ETOT
>>>>>
>>>>> Result:
>>>>> http://i.imgur.com/FPdBfsz.png
>>>>>
>>>>> Le 01/02/2016 14:08, David A Case a écrit :
>>>>>> On Mon, Feb 01, 2016, Lorenzo Gontrani wrote:
>>>>>>
>>>>>>> xmgrace is great..and lightweight.
>>>>>> Just some (off-topic) comments about why I like xmgrace:
>>>>>>
>>>>>> 1. Plots generally look good and can be interactively edited if they
>>>>> don't.
>>>>>> Consider modifying your ~/.grace/templates/Default.agr file to
>>>>>> specify
>>>>>> Helvetica as "font 0" (the default) and change 'xaxis label char
>>>>>> size'
>>>>> to 1.25
>>>>>> (from 1.0); same for yaxis.
>>>>>>
>>>>>> 2. A single .agr file has both the data and the formatting in a
>>>>>> single
>>>>> file.
>>>>>> This is good if you come back months or years later and don't
>>>>>> remember
>>>>> your
>>>>>> file naming conventions.
>>>>>>
>>>>>> 3. You can also write simple scripts to systematically modify
>>>>>> lots of
>>>>>> files, to replace the data but keep the formatting, etc. Once
>>>>>> you grok
>>>>> the
>>>>>> file syntax (which is pretty straightforward), it's about as easy to
>>>>> write
>>>>>> scripts to create or manipulate xmgrace files as it is to write
>>>>>> gnuplot
>>>>> or
>>>>>> matplotlib scripts.
>>>>>>
>>>>>> 4. Consider aliasing xmgrace to 'xmgrace -hdevice PDF'. This means
>>> that
>>>>>> "print" will create a PDF file (rather than the default PostScript).
>>>>> This is
>>>>>> likely to be what most people want.
>>>>>>
>>>>>> ....dac
>>>>>>
>>>>>> (OK: I realize I've probably started a flame war here... Next up:
>>>>>> why
>>> you
>>>>>> should write all your code in LISP.)
>>>>>>
>>>>>> _______________________________________________
>>>>>> AMBER mailing list
>>>>>> AMBER.ambermd.org
>>>>>> http://lists.ambermd.org/mailman/listinfo/amber
>>>>> _______________________________________________
>>>>> AMBER mailing list
>>>>> AMBER.ambermd.org
>>>>> http://lists.ambermd.org/mailman/listinfo/amber
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> AMBER mailing list
>>> AMBER.ambermd.org
>>> http://lists.ambermd.org/mailman/listinfo/amber
>>>
>>
>>
>



_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber

Received on Mon Feb 01 2016 - 11:30:02 PST
Custom Search