Re: [AMBER-Developers] Two fixes for mdout_analyzer.py

From: Shiji Zhao <shijiz.uci.edu>
Date: Wed, 30 Jun 2021 21:09:44 -0700

Dear Amber developers,

I thought the original email failed to be sent to the maillist. Did you all
receive the same content three times? That's a little awkward...

Dr. Case and Dr. Swails, sorry that I copied the original line 73 of
mdoutanalyzer/mdout.py to the previous email.What I mean is change it to:

self.num_terms = int(self.num_steps / self.properties['ntpr']) + 1

The reason is that the result of self.num_steps / self.properties['ntpr'] may
not be an integer, so that self.num_terms will be saved as a floating
number. Consequently, a TypeError will be thrown when a float number is
used to indicate the size of a numpy array.

Regarding the questions of Dr. Swail, I actually use it after every MD run
to check energy etc. It is more convenient than the traditional way using
xmgrace to visualize mdout files. In fact, I was not the only one who got
stuck on this bug. Here is the same question posted on Amber mail list last
year but was not answered: http://archive.ambermd.org/202010/0252.html

Best regards,
Shiji Zhao

On Wed, Jun 30, 2021 at 7:37 PM Jason Swails <jason.swails.gmail.com> wrote:

> On Wed, Jun 30, 2021 at 7:54 PM David A Case <david.case.rutgers.edu>
> wrote:
>
> > On Mon, Jun 28, 2021, Shiji Zhao wrote:
> >
> > >I hereby propose 2 changes that fix mdout_analyzer.py.
> > >
> > >
> > > - Change line 73 of mdoutanalyzer/mdout.py to: self.num_terms =
> > > self.num_steps / self.properties['ntpr'] + 1
> >
> > As far as I can see, this is already what line 73 says. Can you double
> > check?
> >
> > > - Change line 226 of mdoutanalyzer/widgets.py to: fig.draw()
> >
> > I can push this change to the master branch.
> >
> > Is there a test case for this script?
> >
>
> No (it's hard to unit-test GUI code). Basically just run it and see if it
> "works."
>
> I'm curious if this script is used much - it was a pet project when I was
> experimenting with making GUIs. While it may be pedagogically
> useful/helpful to beginners, I certainly wouldn't use it to generate
> production-quality figures.
>
> If nobody uses it we can drop it from the Amber code base and just throw it
> up on GitHub if people *really* want it for some reason.
>
> Does anybody use it? Does anybody even know it exists? It's got an
> obligatory paragraph on page 592 of the Amber 20 manual, but it wouldn't
> hurt my feelings to just get rid of it :)
>
> Thanks,
> Jason
>
> --
> Jason M. Swails
> _______________________________________________
> AMBER-Developers mailing list
> AMBER-Developers.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber-developers
>
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Wed Jun 30 2021 - 21:30:02 PDT
Custom Search