QuantumATK > General Questions and Answers

question about calculate the local_density_of_states

(1/2) > >>

alan:
Hi:
i want to calculate the local_density_of_states of the structure that one fe atom adsorb on the graphene nanoribbon
part of my script is as follows:
local_density_of_states = calculateLocalDensityOfStates(
    self_consistent_calculation = scf,
    energy = 0.0*electronVolt,
    quantum_number = ((0.0,0.0),Spin.Up),
    green_function_infinitesimal = 1.0e-5*electronVolt
)
if processIsMaster(): file.addToSample(local_density_of_states, 'twoprobe_configuration', 'Local Density Of States')

local_density_of_states_1 = calculateLocalDensityOfStates(
    self_consistent_calculation = scf,
    energy = 0.0*electronVolt,
    quantum_number = ((0.0,0.0),Spin.Down),
    green_function_infinitesimal = 1.0e-5*electronVolt
)
if processIsMaster(): file.addToSample(local_density_of_states_1, 'twoprobe_configuration', 'Local Density Of States 1')


but i were been told that:NLValueError:One of or more atoms has a different number of orbitals.
how can i do ,if i want to calculate the LDOS of fermi energy?
what dose the quantum_number in "quantum_number = ((0.0,0.0),Spin.Down)"mean? dose it mean at a certain k point ,a certain energy such as fermi energy,the density_of_states of spin down state?or it means a series of k points?
 

Anders Blom:
This error does not arise from the lines of code you have quoted, but somewhere earlier (probably) in the script. Most likely you are trying to initialize a new calculation based on an existing checkpoint file (nc file). This only works if they systems are identical in terms of atoms, their order, and the basis set.

The notation for the quantum numbers can be a bit tricky. For the example you show it's a single k-point, at the Fermi energy (given separately) for spin down.

Anders Blom:
My guess is that you used VNL to generate the script, and ticked the box to restore self-consistent calculation from checkpoint. In that case, to proceed with analysis and calculating the LDOS etc, you must also remember to untick the box "Only use initial density" (which is used when you wish to restart a calculation).

alan:
thank you for your reply.
I have modified my script accod according to your proposal.
It works well now.
but i have an other question :
can we export the date of LDOS directly?

Anders Blom:
Sure, it just requires a bit of manual scripting. Use the toArray() function to extract the data as a Numpy array, then you can manipulate the data as you want.

For a similar example, see http://quantumwise.com/forum/index.php?topic=21.0; the script voltagedrop.py in first post there shows how to extract the data and do some simple manipulations. Also see http://quantumwise.com/forum/index.php?topic=39.0.

Navigation

[0] Message Index

[#] Next page

Go to full version