[Wien] Berrypi Error

shahrbano rahimi shahrbanorahimi60 at gmail.com
Fri Nov 17 17:17:00 CET 2023


Dear Prof. Peter Blaha and Prof. Oleg Rubel,

hope this email finds you in good health and spirits. I am reaching out to
respectfully report a technical challenge we recently encountered in our
Wien2k calculations using BerrypI, and to share the solution we found in
hopes that it might be helpful.

Our team has been utilizing Wien2k version 23.2, along with Python version
3.10.9 and Numpy version 1.23.5. Initially, the electronic part of the
calculations proceeded without any issues. However, we stumbled upon a snag
in the ionic part, which resulted in the following error message:

“Traceback (most recent call last): File "/opt/codes/wien2k/v23.2/berrypi",
line 1081, in <module> theCalc =
postProcBerryPhase(configFile,phasesRaw,spCalc) File
"/opt/codes/wien2k/v23.2/berrypi", line 72, in postProcBerryPhase
mainCalculation = b_PyCalc.MainCalculationContainer( File
"/opt/codes/wien2k/v23.2/SRC_BerryPI/BerryPI/calculations.py", line 338, in
init ionP = self.determineIonPolarization(wrpFn,args) File
"/opt/codes/wien2k/v23.2/SRC_BerryPI/BerryPI/calculations.py", line 621, in
determineIonPolarization if isinstance(iValence, collections.Iterable):
AttributeError: module 'collections' has no attribute 'Iterable'”

In our efforts to resolve this, we made the following changes in the
calculations.py file:

   1.

   Altered the import statement from:

   import collections

   to:

   from collections.abc import Iterable
   2.

   Amended the following line:

   from:

   if isinstance(iValence, collections.Iterable):

   to:

   if isinstance(iValence, Iterable):

These modifications have thankfully resolved the 'collections.Iterable'
error, allowing our calculations to proceed without further issues.

I thought it prudent to share this experience with you, given your profound
expertise and significant contributions to the development of Wien2k. Your
guidance and insights have always been invaluable to our work, and I hope
this information might be of some utility in your ongoing endeavors.

Thank you very much for your time and attention to this matter. Any further
insights or suggestions from your esteemed perspectives would be greatly
appreciated.

With sincere respect and best regards,

Sharbano Rahimi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20231117/ecf50196/attachment.htm>


More information about the Wien mailing list