Error in the use of eqp.py

Submitted by ljzhou86 on Wed, 10/11/2017 - 17:41

Forums 

User questions

Dear sir,

I finished epsilon and sigma calculations normally, then I extracted the quasiparticle energies from sigma_hp.log by using "eqp.py eqp1 ./6-sigma/sigma_hp.log ./8-absorption/eqp_co.dat". However, I got the following error as:

"Frequency dependence = 1
Traceback (most recent call last):
File "/users/ljzhou86/BerkeleyGW/bin/eqp.py", line 192, in
sys.exit(main())
File "/users/ljzhou86/BerkeleyGW/bin/eqp.py", line 73, in main
kidx.append(int(t[7]))
ValueError: invalid literal for int() with base 10: 'spin'"

What's the reason and how to fix it? Thanks.

Submitted by babarker on Wed, 10/11/2017 - 19:52

Hello ljzhou86,

The first thing that comes to mind is that your machine is using a different version of Python than the script expects. Another thing that comes to mind is that you are probably using BerkeleyGW 1.0, as the latest version (1.2) automatically writes out the eqp1.dat (and eqp0.dat, vxc.dat, and x.dat) files.

If you do in fact have to run the eqp.py script to extract the eqp1.dat file from sigma_hp.log, I recommend looking at the line in sigma_hp.log that "int(t[7])" is reading from and seeing if it supposed to be the string "spin." If that is in fact correct, just get rid of "int(" and ")" as it should read in the string. If it is supposed to read in the integer value of the spin, though, then you probably just have to increment the index appropriately.

In any case, I recommend that you make a local copy of your edited eqp.py and modify it as needed to get it to work.

Best,
Brad