QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: caocao on October 15, 2011, 05:34

Title: planar/microscrope charge density/potential
Post by: caocao on October 15, 2011, 05:34
Dear all,
How can l plot the planar/microscrope  charge density/potential curve by using ATK?
Title: Re: planar/microscrope charge density/potential
Post by: zh on October 15, 2011, 13:55
The procedure for the planar/microscope charge density/potential is the same as the calculation of work function. The scripts for the calculations of work function have been discussed many times in this forum. Please check them by searching "work function".
Title: Re: planar/microscrope charge density/potential
Post by: caocao on October 15, 2011, 15:12
Actually, i want to plot these curves, and then calculate the schottky barriers.
Title: Re: planar/microscrope charge density/potential
Post by: caocao on October 16, 2011, 04:50
just like this
Title: Re: planar/microscrope charge density/potential
Post by: Anders Blom on October 16, 2011, 11:26
You have to make the plot yourself, but the basic data is easily available in ATK, via the ElectronDensity and EffectivePotential. You can extract this to a Cube file, or make the plane-averaging directly in Python with ATK, sort of like

Code: python
config = nlread("file.nc",DeviceConfiguration)[0]
density = ElectronDensity(config)
z_axis_length = density.unitCell()[2][2].inUnitsOf(Angstrom)
Nz = density.shape()[2]
# Loop over all the data and calculate the average in the xy-plane
print "Pos (Ang)\tAveraged electron density (%s)" % density.unit()
for i in range(Nz):
    print i*z_axis_length/float(Nz),"\t",numpy.average(density[:,:,i])