Dear machael1789,
Thanks for your reply. Here is the segment of the code where problem might arise as in the error message the line number 163 indicates.
# For loop goes to line by line of EIGENVAL file (afer 8th line), and record kpoints and eigenvalues
# depending on how many values are given. If # values are 4, it is for k_point,
# otherwise it is eigen value file.
for i,line in enumerate(lines[7::]): #starts from 8th line
# If the line is for k-point mash
if len(re.findall("[-a-zA-Z0-9.\+]+",line))==4:
temp=re.findall('[-a-zA-Z0-9.\+]+',line)
num_temp=[float(j) for j in temp]
kpoints[kp_counter,:]=num_temp
kp_counter+=1
# If the line is for Eigenvalues
elif len(re.findall("[-a-zA-Z0-9.\+]+",line)) > 0:
temp=re.findall('[-a-zA-Z0-9.\+]+',line)
band_num=int(temp[0])
ei_val_string=temp[1:1+ispin:]
ei_val=[float(k) for k in ei_val_string] #Eigenvlue of current Kpoint
eigenvalues[kp_counter-1,band_num-1,:]=ei_val
in_file.close()
If you would like to see the entire code I can attach here too.
Please let me know where is that index issue here.
Thanking you,
BaidyaS
Thank you. I have just found the problem. It looks like as you said there was space problem in the input file. Now it works.
Thanks.
Thanks for your reply. Here is the segment of the code where problem might arise as in the error message the line number 163 indicates.
# For loop goes to line by line of EIGENVAL file (afer 8th line), and record kpoints and eigenvalues
# depending on how many values are given. If # values are 4, it is for k_point,
# otherwise it is eigen value file.
for i,line in enumerate(lines[7::]): #starts from 8th line
# If the line is for k-point mash
if len(re.findall("[-a-zA-Z0-9.\+]+",line))==4:
temp=re.findall('[-a-zA-Z0-9.\+]+',line)
num_temp=[float(j) for j in temp]
kpoints[kp_counter,:]=num_temp
kp_counter+=1
# If the line is for Eigenvalues
elif len(re.findall("[-a-zA-Z0-9.\+]+",line)) > 0:
temp=re.findall('[-a-zA-Z0-9.\+]+',line)
band_num=int(temp[0])
ei_val_string=temp[1:1+ispin:]
ei_val=[float(k) for k in ei_val_string] #Eigenvlue of current Kpoint
eigenvalues[kp_counter-1,band_num-1,:]=ei_val
in_file.close()
If you would like to see the entire code I can attach here too.
Please let me know where is that index issue here.
Thanking you,
BaidyaS
Thank you. I have just found the problem. It looks like as you said there was space problem in the input file. Now it works.
Thanks.