Author Topic: Can I run this command using VNL?  (Read 8494 times)

0 Members and 1 Guest are viewing this topic.

Offline lknife

  • QuantumATK Guru
  • ****
  • Posts: 214
  • Country: us
  • Reputation: 1
    • View Profile
Can I run this command using VNL?
« on: June 14, 2017, 16:48 »
Dear experts,

I am studying the tutorial "Modeling metal–semiconductor contacts: The Ag–Si interface". There is a script named "hdp.py" and need to be run by "atkpython hdp.py device.nc". Since I am using the windows system, I don't know how to run it through VNL.

Can anybody here help me with this problem?

Thank you very much for your kind help!

Offline lknife

  • QuantumATK Guru
  • ****
  • Posts: 214
  • Country: us
  • Reputation: 1
    • View Profile
Re: Can I run this command using VNL?
« Reply #1 on: June 14, 2017, 17:04 »
I got the "ElectrostaticDifferencePotential" with ATK2015 instead of "HartreeDifferencePotential" with ATK2016. When I tried to run the hdp.py using job manager, an error message appeared:

------------------------------------------------
 File "hdp9nm.py", line 50, in <module>
    pot_z = pot_z.inUnitsOf(eV)
  File ".\zipdir\NL\CommonConcepts\PhysicalQuantity.py", line 1753, in inUnitsOf
NL.ComputerScienceUtilities.Exceptions.NLValueError: Unable to convert unit value V to an incompatible unit eV.
---------------------------------------------------------

Attached are the .py file and the .log file, wishing someone here can help me with this problem.

Thank you very much for you time and kind help!

Offline Jess Wellendorff

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 933
  • Country: dk
  • Reputation: 29
    • View Profile
Re: Can I run this command using VNL?
« Reply #2 on: June 15, 2017, 09:57 »
As mentioned in the ATK 2016 manual (http://docs.quantumwise.com/manuals/Introduction.html#atk-2016) the definitions of Hartree and Electrostatic potentials was changed with ATK 2016 and forward: EDP is now in units of of Volt, not eV. That's also exactly what the error message says.  More information at http://docs.quantumwise.com/manuals/Types/HartreePotential/HartreePotential.html#the-hartree-potential-and-the-electrostatic-potential

Offline lknife

  • QuantumATK Guru
  • ****
  • Posts: 214
  • Country: us
  • Reputation: 1
    • View Profile
Re: Can I run this command using VNL?
« Reply #3 on: June 15, 2017, 14:10 »
Thank you very much for you help!

Offline lknife

  • QuantumATK Guru
  • ****
  • Posts: 214
  • Country: us
  • Reputation: 1
    • View Profile
Re: Can I run this command using VNL?
« Reply #4 on: June 15, 2017, 22:13 »
Even though I changed the unit of the ElectrostaticDifferencePotential to Volt, error messages still appeared:

-------------------------------------------------------------
Traceback (most recent call last):
  File "hdp9nm.py", line 50, in <module>
    pot_z = pot_z.inUnitsOf(Volt)
  File ".\zipdir\NL\CommonConcepts\PhysicalQuantity.py", line 739, in inUnitsOf
NL.ComputerScienceUtilities.Exceptions.NLValueError: Unable to convert unit value [-0.00435305 -0.00433779 -0.00432016 ...,  0.01351189  0.01346716
  0.01349285] Hartree to an incompatible unit V.
tible unit V.
-------------------------------------------------------------

Could you please help me to modify the hdp.py so that it can deal with the  ElectrostaticDifferencePotential and get the similar result as it deal with the HartreeDifferencePotential? I want it to read-in the ElectrostaticDifferencePotential from a .nc file in the script and can be run by Job manager.

Thank you very much for your time and kind help!

Offline Jess Wellendorff

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 933
  • Country: dk
  • Reputation: 29
    • View Profile
Re: Can I run this command using VNL?
« Reply #5 on: June 16, 2017, 07:55 »
The log file says you are now running ATK 2015, in which case you should stick to the "old" definitions of Hartree and Electrostatic potentials.

Offline lknife

  • QuantumATK Guru
  • ****
  • Posts: 214
  • Country: us
  • Reputation: 1
    • View Profile
Re: Can I run this command using VNL?
« Reply #6 on: June 18, 2017, 05:00 »
I am sorry that I am a new born of ATK and do not know how to do as you said. Where and how to "stick" to the "old" definitions of Hartree and Electrostatic potentials ?

Thank you!

Offline Jess Wellendorff

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 933
  • Country: dk
  • Reputation: 29
    • View Profile
Re: Can I run this command using VNL?
« Reply #7 on: June 19, 2017, 08:50 »
OK, here goes: - ATK 2015 and previous versions: The ElectrostaticPotential was defined from the solution to the Poisson equation, and had units of eV. - ATK 2016 and later versions: The potential that solves the Poisson equation is now called the HartreePotential. So what use to be the EDP is now HDP. The "new" definition of EDP is
Code
EDP=-(HDP/e)
as explained in the ATK manual: http://docs.quantumwise.com/manuals/Types/HartreePotential/HartreePotential.html#hartreepotential-hartree-and-electrostatic I attach two PNGs that illustrate this, and also the scripts used to run the calculations.

Offline lknife

  • QuantumATK Guru
  • ****
  • Posts: 214
  • Country: us
  • Reputation: 1
    • View Profile
Re: Can I run this command using VNL?
« Reply #8 on: June 19, 2017, 17:58 »
Thank you very much for your reply!

However, what I wanted to do is to modify the hdp.py file in the tutorial "Modeling metal–semiconductor contacts: The Ag–Si interface" so that it can calculate the average of the ElectrostaticDifferencePotential along the z direction to avoid the the wiggles of the potential.

The script you posted here cannot help me with this problem.

Anyway, thank you very much again for your kind help!

Offline lknife

  • QuantumATK Guru
  • ****
  • Posts: 214
  • Country: us
  • Reputation: 1
    • View Profile
Re: Can I run this command using VNL?
« Reply #9 on: June 19, 2017, 18:08 »
Do you mean that since EDP=-(HDP/e), I can get the HDP from EDP by adding these code lines to the script,

------------------------------------------------------------------
# Load the EDP previously calculated
pot1 = nlread(fname2, ElectrostaticDifferencePotential)[0]
# Convert the EDP to HDP
pot = -pot1*e
------------------------------------------------------------------

thus, after converting the EDP to HDP, I can use the hdp.py as usual?

Offline Jess Wellendorff

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 933
  • Country: dk
  • Reputation: 29
    • View Profile
Re: Can I run this command using VNL?
« Reply #10 on: June 20, 2017, 08:02 »
Conversion from EDP to HDP:
Code
EDP = nlread(fname, ElectrostaticDifferencePotential)[0]
(c_axis, edp_pot) = EDP.axisProjection(axis='c')
hdp_pot = -1 * edp_pot.inUnitsOf(Volt) *  elementary_charge * Volt
such that hdp_pot is the values of the average Hartree potential along points on the C-axis. You can also use other axis projections: http://docs.quantumwise.com/manuals/Types/ElectrostaticDifferencePotential/ElectrostaticDifferencePotential.html#NL.Analysis.ElectrostaticDifferencePotential.ElectrostaticDifferencePotential.axisProjection

Offline lknife

  • QuantumATK Guru
  • ****
  • Posts: 214
  • Country: us
  • Reputation: 1
    • View Profile
Re: Can I run this command using VNL?
« Reply #11 on: June 20, 2017, 21:54 »
Thank you very much for your kind help! I'll try it.

Offline lknife

  • QuantumATK Guru
  • ****
  • Posts: 214
  • Country: us
  • Reputation: 1
    • View Profile
Re: Can I run this command using VNL?
« Reply #12 on: June 21, 2017, 04:12 »
When I tried to run the script, it failed with these error messages:
---------------------------------------------------------------------------------
 File "hdp9nm_corrected version_new.py", line 44, in <module>
    pot = -1 * edp_pot.inUnitsOf(Volt) * elementary_charge * Volt
  File ".\zipdir\NL\CommonConcepts\PhysicalQuantity.py", line 739, in inUnitsOf
NL.ComputerScienceUtilities.Exceptions.NLValueError: Unable to convert unit value [ -92.51098596  -92.18665482  -91.81209356 ...,  287.15458342  286.20406093
  286.74999692] Hartree to an incompatible unit V.
tible unit V.
----------------------------------------------------------------------------------------------
Could you please help me more with this problem? Thank you very much for you kind help!

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Can I run this command using VNL?
« Reply #13 on: June 21, 2017, 09:22 »
Obviously, you should change the unit (in the "inUnitsOf" part) in the script to eV or Hartree then, instead of V. I think you are mixing 2016 and 2015 too much for your own good. Stick to 2015, and all is easy - there is no HartreePotential, only ElectrostaticDifferencePotential, and it's in eV (or Hartree whatever you prefer). However, it actually is the same as the Hartree potential in 2016, but with opposite sign.
« Last Edit: June 21, 2017, 09:24 by Anders Blom »

Offline lknife

  • QuantumATK Guru
  • ****
  • Posts: 214
  • Country: us
  • Reputation: 1
    • View Profile
Re: Can I run this command using VNL?
« Reply #14 on: June 21, 2017, 20:07 »
I have solved the problem.

Thanks for all of you who helped me on this problem. I have learned a lot from you and I began to have some ideas on how to get information from the manual and write scripts of my own for a certain analysis.

However, I have another question on the EDP along z direction. I posted a topic named "What's wrong with my ElectrostaticDifferencePotential result?". For the EDP calculation, the bias was set to (0.1V, 0V) for the left electrode and right electrode, respectively. However, the potential did not end at the electrode at the preset values. Please see attached figures, can any of you help me with this problem? 

The device configurations for hdp9nm.png and hdp9nm_doping.png are the same. I doped the left part of the device (semiconductor part) for hdp9nm_doping with a n-doping level of 5*10^19 in order to shorten the screening length of the semiconductor part. It's the only difference between them. The bias for the EDP calculation was set to (0.1V, 0V). However, both of the figures did not end at the left electrode at 0.1V (or -0.1V). For hdp9nm, it ends at about 0.4 while for hdp9nm_doping, it ends at 1.0. I don't know why.

I appreciate you if you can help me with this problem.
« Last Edit: June 22, 2017, 03:06 by lknife »