Author Topic: Questions on Energy dependent LDOS  (Read 3139 times)

0 Members and 1 Guest are viewing this topic.

Offline kaypu

  • QuantumATK Guru
  • ****
  • Posts: 135
  • Country: 00
  • Reputation: 1
    • View Profile
Questions on Energy dependent LDOS
« on: November 9, 2014, 14:16 »
hi:
 i use this py(in the attachment) to plot the Energy dependent LDOS at bias of 0.4V. the LDOS in the different energy(-1eV~1eV) are saved to LDOS1-LDOS4. but it doesn't work.
*******************
File "LDOS-plot.py", line 25, in <module>
    X, Y = numpy.meshgrid(z, energies)
  File "./build/lib/python2.7/site-packages/numpy/lib/function_base.py", line 3379, in meshgrid
  File "./zipdir/NL/CommonConcepts/PhysicalQuantity.py", line 456, in __mul__
  File "./zipdir/NL/CommonConcepts/PhysicalQuantity.py", line 249, in unit
AttributeError: 'PhysicalQuantity' object has no attribute '_PhysicalQuantity__unit'
*******************
atk version 2014.1

what's wrong? need to modify the py?

thanks

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Questions on Energy dependent LDOS
« Reply #1 on: November 9, 2014, 21:38 »
Try to replace "convertTo" by "inUnitsOf" when you convert from Bohr to Ang on the grid volume element.

Offline kaypu

  • QuantumATK Guru
  • ****
  • Posts: 135
  • Country: 00
  • Reputation: 1
    • View Profile
Re: Questions on Energy dependent LDOS
« Reply #2 on: November 10, 2014, 01:00 »
thank you, but still didn't work.  i replace "convertTo" by "inUnitsOf" in line 9, right?
******************
Traceback (most recent call last):
  File "LDOS-plot2014.py", line 10, in <module>
    dz = dZ.norm()
AttributeError: 'numpy.ndarray' object has no attribute 'norm'
*****************

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Questions on Energy dependent LDOS
« Reply #3 on: November 10, 2014, 10:20 »
Ah, bummer. Then do this: the problem is meshgrid, which doesn't like objects with units, so use z.inUnitsOf(Ang) inside that call.