QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: alan on May 24, 2009, 05:12

Title: question about calculate the local_density_of_states
Post by: alan on May 24, 2009, 05:12
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?
 
Title: Re: question about calculate the local_density_of_states
Post by: Anders Blom on May 24, 2009, 11:10
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.
Title: Re: question about calculate the local_density_of_states
Post by: Anders Blom on May 24, 2009, 19:25
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).
Title: Re: question about calculate the local_density_of_states
Post by: alan on May 25, 2009, 06:07
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?
Title: Re: question about calculate the local_density_of_states
Post by: Anders Blom on May 25, 2009, 09:05
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.
Title: Re: question about calculate the local_density_of_states
Post by: Anders Blom on May 26, 2009, 09:11
Did you figure it out? I got a notification of a reply to this topic, but it seems you deleted you post? Hope it means all is working :)