Error running wf_piezoelectric_constant due to changes in Pymatgen

18 views
Skip to first unread message

yaz...@gmail.com

unread,
Nov 20, 2018, 4:18:22 AM11/20/18
to atomate
HI Dr. Jain

(Short version of things)

I am trying to load wf_piezoelectric_constant in my script and the following error occured:

/opt/apps/util/easybuild/software/pymatgen/2018.11.6-intel-2018b-Python-3.6.6/lib/python3.6/site-packages/pymatgen-2018.11.6-py3.6-linux-x86_64.egg/pymatgen/analysis/elasticity/tensors.py:7: UserWarning: pymatgen.analysis.elasticity.tensors has been moved to pymatgen.core.tensors, please update dependencies accordingly. Links will removed in v2019.1.1.
  warnings.warn("pymatgen.analysis.elasticity.tensors has been moved to "

I can't find which file to modify in order to load the pymatgen.core.tensors instead of the older pymatgen.analysis.elasticity.tensors. Could you enlighten me on where the changes should be made?

(Longer version of things)

Upon checking the pymatgen.analysis.elasticity.tensors file, the above error message is pretty much all the content the file contained. So wf_piezoelectric_constant is effectively nonfunctional right now because of this change in pymatgen.

In my attempt to find the right file to modify, I observed that:

wf_piezoelectric_constant calls for piezoelectric_constant.yaml in atomate.vasp.workflows.base.library;
which in turn calls for atomate.vasp.fireworks.core.LepsFW;
In which the following pymatgen classes are loaded:
Pymatgen.io.vasp.sets MPrelaxSet; MITMDSet, MITRelaxSet, MPStaticSet, MPSOCSet

I am still unable to find where pymatgen.analysis.elasticity.tensors is invoked and hence change it to load pymatgen,core.tensors.

Another thing I'd like to check with you is that because Pymatgen is phasing out some of its older classes by 1Jan2019, will Atomate be updated to accommodate these changes? The above problem I have right now should be an example of this.

I also notice that some of the atomate classes such as LepsFW are also due to be removed soon; however they are invoked in some of the default workflow.yaml files, like the piezoelectri_constant.yaml for example. Will these .yaml files be updated as well to use the newer atomate classes when the older classes are deleted?

I am using the following version of atomate if it helps in any way:  atomate/0.8.4-intel-2018b-Python-3.6.6

Thanks a lot for your help on this

Best wishes
Yaze

Joseph Montoya

unread,
Nov 20, 2018, 12:51:00 PM11/20/18
to yaz...@gmail.com, ato...@googlegroups.com
Hi Yaze,

I'll look into updating the code today to ensure the elasticity imports are up to date, but note that it is just a warning and shouldn't prevent the code from running.

Best,
Joey

--
You received this message because you are subscribed to the Google Groups "atomate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atomate+u...@googlegroups.com.
To post to this group, send email to ato...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yaze Wu

unread,
Nov 20, 2018, 12:58:09 PM11/20/18
to Joseph Montoya, ato...@googlegroups.com
Hi Joey

Thanks for your help!

From my experience, the code stopped running altogether because the pymatgen.analysis.elasticity.tensors file has no useful content left in it. Guess it was deleted by the pymatgen team. But again, all this should be fixed once we shift to using pymatgen.core.tensors. the only problem I have right now is being unable to find the correct file to modify to enable that switch to using pymatgen.core.tensors...

Best wishes
Yaze

From: Joseph Montoya <mont...@gmail.com>
Sent: Wednesday, November 21, 2018 1:50:47 AM
To: yaz...@gmail.com
Cc: ato...@googlegroups.com
Subject: Re: Error running wf_piezoelectric_constant due to changes in Pymatgen
 

Joseph Montoya

unread,
Nov 20, 2018, 2:19:41 PM11/20/18
to yaz...@gmail.com, ato...@googlegroups.com
Hi Yaze, the backwards compatibility is achieved via the import statement "from pymatgen.core.tensors import *" in pymatgen.analysis.elasticity.tensors, which ensures that everything in the pymatgen.core.tensors namespace is also present in pymatgen.analysis.elasticity.tensors.  Is there a specific instance you have encountered in which this is throwing an error?  I'd like to know if this is the case, because I'd prefer to ensure backwards compatibility for the timetable set in the warning, if possible.

Yaze Wu

unread,
Nov 20, 2018, 11:27:37 PM11/20/18
to Joseph Montoya, ato...@googlegroups.com

Hi Joey

 

I’ve did a bit more troubleshooting and realized that the problem is actually with my range loop; the range ended up containing nothing, so naturally the script stopped with nothing done but just showing the warning message about the file removal deadline. I mistook the error as from the pymatgen.analysis.elasticity.tensors because I misunderstood the last line of the code in the file as a casual leftover from the older file.

 

I tested the corrected script and there is no problem with the wf_piezoelectric_constant as far as I can tell. Apologies for the mix up!

 

Maybe we should delete this thread altogether to avoid confusing others. And thanks a lot for your help on this issue.

 

 

Best wishes

Yaze

 

 

 

From: Joseph Montoya
Sent: Wednesday, 21 November 2018 3:19 AM
To: yaz...@gmail.com
Cc: ato...@googlegroups.com
Subject: Re: Error running wf_piezoelectric_constant due to changes inPymatgen

 

Hi Yaze, the backwards compatibility is achieved via the import statement "from pymatgen.core.tensors import *" in pymatgen.analysis.elasticity.tensors, which ensures that everything in the pymatgen.core.tensors namespace is also present in pymatgen.analysis.elasticity.tensors.  Is there a specific instance you have encountered in which this is throwing an error?  I'd like to know if this is the case, because I'd prefer to ensure backwards compatibility for the timetable set in the warning, if possible.

 

On Tue, Nov 20, 2018 at 9:58 AM Yaze Wu <yaz...@gmail.com> wrote:

Hi Joey

Thanks for your help!

From my experience, the code stopped running altogether because the pymatgen.analysis.elasticity.tensors file has no useful content left in it. Guess it was deleted by the pymatgen team. But again, all this should be fixed once we shift to using pymatgen.core.tensors. the only problem I have right now is being unable to find the correct file to modify to enable that switch to using pymatgen.core.tensors...

Best wishes

Yaze

Joseph Montoya

unread,
Nov 20, 2018, 11:34:47 PM11/20/18
to Yaze Wu, ato...@googlegroups.com
I think its fine to leave, as the warning messages can be a bit confusing.  Also i issued a PR today to fix the issue so hopefully in the next atomate release these warnings should go away.

Yaze Wu

unread,
Nov 20, 2018, 11:35:59 PM11/20/18
to Joseph Montoya, ato...@googlegroups.com

That’s great. Thanks a lot Joey!

cid:image001.png@01D48195.935D1C10

E2450B134B0D41989BA2E5274BE0F683.png
Reply all
Reply to author
Forward
0 new messages