QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: cca_rmv on May 8, 2014, 23:32
-
I am getting strange result with cbs.evaluate() query
With,
cbs = ComplexBandstructure(
configuration=bulk_configuration,
energies=numpy.linspace(0.0,0.0,1)*eV,
k_point = (0,0),
energy_zero_parameter=FermiLevel,
)
when I query
k_complex= cbs.evaluate ()
it returns [([PhysicalQuantity([],1/Ang)], [PhysicalQuantity([(-1.70729730420379e-15+0.34574840251025407j) ... ,1/Ang)])] in some cases, while in other case, it returns only [PhysicalQuantity([(-1.70729730420379e-15+0.34574840251025407j) ... ,1/Ang)]. Note an extra [([PhysicalQuantity([],1/Ang)]]) in first case.
I would like to understand why same query in two different compound gives results in different format. In additions, I would like know if there is anyway to convert the first kind of returns to second kind.
Thank you.
-
Which version of ATK? We made some improvements recently...
-
I am using Atomistix ToolKit 13.8.1 [Build 809ce91].
I want to find the minimum of imaginary part of complex k for given energy and kpoints in 2D Brilluoin zone. Following script ( see at the end) for simple perovskite returns me k-point and minimum of kappa in given the energy window. However if I use the same script, with different structure for example sqrt(2)xsqrt(2)x2 orthorhombic cell, I get kpoints and [[]], because k_complex returns me extra empty [PhysicalQuantity([],1/Ang)]. Can you please help me to fix the script so that it works for all.
Thank you.
from NanoLanguage import *
import itertools, numpy
bulk_configuration = nlread('scf.nc', BulkConfiguration)[0]
# Number of k-points in each cell direction
n0,n1 = (2, 2)
ne=1
# ----------------------------------------------------------------
# Generate a uniform k-point sampling grid for the reciprocal unit cell (NOT the Brillouin zone)
k0 = numpy.linspace(-0.5,0.5,n0)
k1 = numpy.linspace(-0.5,0.5,n1)
kpoints = numpy.array(list(itertools.product(k0,k1)))
f=open("kpt_min_kappa.dat", "w")
# Evaluate the band structure in all k-i
# Select the desired bands
for kpt in range(len(kpoints)):
kpoint=kpoints[kpt]
cbs = ComplexBandstructure(
configuration=bulk_configuration,
energies=numpy.linspace(0.0,0.0,ne)*eV,
k_point = kpoint,
energy_zero_parameter=FermiLevel,
)
k_real, k_complex = cbs.evaluate()
imag_k=[]
print k_complex
for (j, energy) in enumerate(cbs.energies().inUnitsOf(eV)):
if len(k_complex[j]) > 0:
print len(k_complex[j])
for x in numpy.array(k_complex[j]):
print x
ki = x.imag
imag_k.append(ki)
minkim=min(imag_k)
f.write("{} {} \n".format(kpoint, minkim))
f.close()
-
There is nothing strange about that - you are just evaluating the states at Gamma, and that's in the band gap, so there are no real states. Don't confuse k_complex with the complex solutions... It's actually the real solutions (propagating states) that are missing in your case - you are in the gap.
-
Thank you very much.