yambopy interpolation error

Post here any question you encounter when running the scripts of the yambo-py suite. Post here problem strictly to the python interface as problem coming from the yambo runs should go in the appropriate subforum.

Moderators: palful, amolina, mbonacci

Post Reply
Longjun Xiang
Posts: 34
Joined: Tue May 07, 2019 9:53 am

yambopy interpolation error

Post by Longjun Xiang » Fri Feb 07, 2020 3:05 am

Dear developers:

I am learning your yambopy tutorials following this link: http://www.yambo-code.org/wiki/index.ph ... in_Yambopy. For the bn system, I have complete GW and BSE calculation. When I plot the result, I obtain the following error messages:

############################################################
➜ scripts python plot-qp.py
valence bands:
slope: 1.1141420966303826
intercept: -0.5936418076193082
r_value: 0.9984998986273829
p_value: 1.9376543992955728e-25
std_err: 0.014016130350334357

conduction bands:
slope: 1.034427830097967
intercept: 0.6651380198898966
r_value: 0.9723476227114536
p_value: 6.08151830848826e-09
std_err: 0.07172094179826523
direct dft gap: 4.7445549964904785
direct qp gap: 6.200752019882202

scissor list (shift,c,v) [eV,adim,adim]: [1.4561970233917236, 1.034427830097967, 1.1141420966303826]
7 kpoints expanded to 36
Traceback (most recent call last):
File "plot-qp.py", line 53, in <module>
ks_bs, qp_bs = ydb.interpolate(lat,path,what='QP+KS',lpratio=20)
File "/Applications/anaconda3/lib/python3.6/site-packages/yambopy-0.1-py3.6.egg/yambopy/dbs/qpdb.py", line 230, in interpolate
from abipy.core.skw import SkwInterpolator
File "/Applications/anaconda3/lib/python3.6/site-packages/abipy/__init__.py", line 18, in <module>
from abipy.core import release
File "/Applications/anaconda3/lib/python3.6/site-packages/abipy/core/__init__.py", line 3, in <module>
from .kpoints import *
File "/Applications/anaconda3/lib/python3.6/site-packages/abipy/core/kpoints.py", line 15, in <module>
from pymatgen.core.lattice import Lattice
File "/Applications/anaconda3/lib/python3.6/site-packages/pymatgen/__init__.py", line 46, in <module>
from .core.periodic_table import Element, Specie, DummySpecie
File "/Applications/anaconda3/lib/python3.6/site-packages/pymatgen/core/__init__.py", line 12, in <module>
from .structure import Structure, IStructure, Molecule, IMolecule
File "/Applications/anaconda3/lib/python3.6/site-packages/pymatgen/core/structure.py", line 31, in <module>
from pymatgen.core.lattice import Lattice, get_points_in_spheres
File "/Applications/anaconda3/lib/python3.6/site-packages/pymatgen/core/lattice.py", line 25, in <module>
from pymatgen.util.coord import pbc_shortest_vectors
File "/Applications/anaconda3/lib/python3.6/site-packages/pymatgen/util/coord.py", line 9, in <module>
from . import coord_cython as cuc
File "__init__.pxd", line 872, in init pymatgen.util.coord_cython
ValueError: numpy.ufunc has the wrong size, try recompiling. Expected 192, got 216
############################################################

I found these errors are related to this yambopy's interpolation method:
============================================
ks_bs, qp_bs = ydb.interpolate(lat,path,what='QP+KS',lpratio=20)
============================================

How can I fix this problem? Thanks for your help.
Dr. Longjun Xiang
School of Physical Science and Technology, ShanghaiTech University, China

Longjun Xiang
Posts: 34
Joined: Tue May 07, 2019 9:53 am

Re: yambopy interpolation error

Post by Longjun Xiang » Fri Feb 07, 2020 7:48 am

I found the problem is related to the abipy. I have used [pip install abipy] to install abipy, but the [import abipy] printed the same error messages as I posted.

=========================
ValueError: numpy.ufunc has the wrong size, try recompiling. Expected 192, got 216
=========================
Dr. Longjun Xiang
School of Physical Science and Technology, ShanghaiTech University, China

User avatar
amolina
Posts: 135
Joined: Fri Jul 15, 2011 11:23 am
Location: Valencia, Spain
Contact:

Re: yambopy interpolation error

Post by amolina » Fri Feb 07, 2020 12:09 pm

Dear Longjun,
most likely you have a problem with the python libraries. If you are working in a linux machine, I recommend you to use anaconda to create the proper environment. An example will be:

conda create --name yambopy python=3.7 scipy matplotlib netcdf4 matplotlib

This will install all the packages that you need for yambopy. You can install then abipy in this environment and then yambopy as indicated in the manual.

Cheers,
Alejandro.
Alejandro Molina-Sánchez
Institute of Materials Science (ICMUV)
University of Valencia, Spain

Post Reply