atomate icon indicating copy to clipboard operation
atomate copied to clipboard

Gibbs Workflow -- Phonopy QHA refactor error

Open mattmcdermott opened this issue 6 years ago • 10 comments

The phonopy QHA code was refactored in July 2018 and the variable "_max_t_index" no longer exists. It is currently used here:

https://github.com/hackingmaterials/atomate/blob/a2cfee5c7cad28e43b2756a4168959a92f4494dc/atomate/vasp/analysis/phonopy.py#L39-L41

This needs to be updated for the current version of phonopy to be used with the Gibbs workflow (should be able to use _len instead).

mattmcdermott avatar Mar 07 '19 07:03 mattmcdermott

As far as I can tell, the whole PhonopyQHA interface has been removed/simplified and replaced with just a QHA object, the method signatures look similar though. In other words, this now gives the ._qha object directly, and ._max_t_index has become ._t_max.

Not sure if there would be a better way of writing this analysis step without using 'protected' attributes?

mkhorton avatar Mar 07 '19 19:03 mkhorton

@mkhorton the PhonopyQHA interface is just for the API -- it has always just created a QHA object actually

mattmcdermott avatar Mar 07 '19 19:03 mattmcdermott

Right, which is I guess why it was removed?

mkhorton avatar Mar 07 '19 19:03 mkhorton

It hasn't been removed though?

mattmcdermott avatar Mar 07 '19 19:03 mattmcdermott

Ah my mistake, I must have been looking at an old commit.

mkhorton avatar Mar 07 '19 19:03 mkhorton

Haha it's alright, I thought the same thing. This is where it is defined FYI:

https://github.com/atztogo/phonopy/blob/b7cff9090ae17be41b209f6b89a6f49cd83c36ab/phonopy/api_qha.py#L38

mattmcdermott avatar Mar 07 '19 19:03 mattmcdermott

I am trying to run a QHA analysis with phonopy and just got this error. Do I have an old version of the code or is this still an issue?

ehomer avatar Oct 29 '21 20:10 ehomer

Hi @ehomer, sorry for the late reply. I think this bug has not been fixed actually -- I don't see any commits to the code since 2017.

I ran the Gibbs workflow so long ago I'm not actually sure what edits I made to get things to work... this was also at the beginning of me starting as a grad student so I didn't do a great job contribution-wise. If my old branch might be of any use, here it is:

https://github.com/mattmcdermott/atomate/tree/gibbs

It's possible I'll revisit if/when I do phonopy stuff again, but if you are able to make a pull request with the fix that would be much appreciated :)

mattmcdermott avatar Nov 06 '21 01:11 mattmcdermott

Basic fix from PR #751 still need to check the results in detail and add tests.

jmmshn avatar Mar 09 '22 18:03 jmmshn

Thanks @jmmshn for addressing this!!

mattmcdermott avatar Mar 09 '22 19:03 mattmcdermott