Author Topic: How to extract effective potential and J from IVCharacteristics block?  (Read 459 times)

0 Members and 1 Guest are viewing this topic.

Offline dmicje12

  • Heavy QuantumATK user
  • ***
  • Posts: 25
  • Country: tw
  • Reputation: 0
    • View Profile
Hello, everyone!

I used the IVCharacteristics function to calculate the effective potential at many different voltage points.
Now, I want to extract the effective potential and current density data at a specific voltage point for further processing.
However, I'm not sure which command I should use to extract the data.

Could anyone help me with this?
Thank you all!

Based on my current understanding,
if the HDF5 file only contains device_configuration and effective potential,
this type of command can be used to read the data:
veff1 = nlread('result.hdf5', EffectivePotential)[0]
However, I am still unsure about the reading format for IVCharacteristics.

There are additional questions
Is there a way to read these device_configurations from IVCharacteristics and use them to calculate other physical quantities?
Thank you all!





« Last Edit: January 15, 2025, 08:16 by dmicje12 »

Offline dmicje12

  • Heavy QuantumATK user
  • ***
  • Posts: 25
  • Country: tw
  • Reputation: 0
    • View Profile
I really need help
I tried a lot of command writing methods but couldn't read it.
I've searched all over the GUI interface and still can't find a way to read it.
Thanks!
=====================================
A very serious problem occurred
I was trying to read hdf5 data and suddenly I couldn’t read it.
Please tell me how to solve this problem
« Last Edit: January 15, 2025, 09:16 by dmicje12 »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5609
  • Country: dk
  • Reputation: 107
    • View Profile
    • QuantumATK at Synopsys
The IVCharacteristics is not an object saved to the HDF5 file, it's a framework for computing lots of individual sets of configurations and later analyze them, but each configuration, transmission spectrum, potential, etc are saved as individual objects in the HDF5 file. Therefore, you can also read them easily using the nlread command, but it can be somewhat tricky to identify which one is which... If you use
Code
nlread("file.hdf5")
it will return ALL objects in the file, in a list. You can narrow this down by a particular class, so
Code
nlread("file.hdf5", DeviceConfiguration)
will return a list of all configurations. Finally, you can ask for a specific configuration etc, by using
Code
nlread("file.hdf5", object_id="name of object")[-1]
Note that nlread ALWAYS returns a list, even if only one object is found. This is why you need [-1] also when requesting a particular object. You can of course also use index=0 but this forum formats bracket-0-bracket funnily... It also smashes all text into one line when I use code blocks, making it hard to read, sorry. The easiest way know the object name is to look in the GUI - you see it in your screenshots in the "name" column. Programmatically you can ask a file which object IDs it has using
Code
from NL.IO.NLSaveUtilities import nlinspect
file_data = nlinspect("Builder_Stash.hdf5")
for i in file_data:
    print(i.object_id)
You can in this way extract the converged state of a configuration at a specific bias (gate and source/drain) and compute additional quantities without ever having to redo the DFT+NEGF part. It is also possible to do additional analysis via the IVCharacteristics object itself, using the addAnalysis method (https://docs.quantumatk.com/manual/Types/IVCharacteristics/IVCharacteristics.html#NL.Study.IVCharacteristics.IVCharacteristics.addAnalysis). It's hard to tell what went wrong with the file, hopefully it's not corrupt. Maybe try reading it from the command Python environment instead, or restart the NanoLab GUI to see if that helps.
« Last Edit: January 16, 2025, 03:05 by Anders Blom »

Offline dmicje12

  • Heavy QuantumATK user
  • ***
  • Posts: 25
  • Country: tw
  • Reputation: 0
    • View Profile
Thanks for reply! There is some questions: =============================================================================================================== 1.I tried the "nlinspect" method in your reply The generated file is shown in Attachment 1. I cannot tell which object has the effective potential or current density at which voltage point. Is there any way to help me parse this data? =============================================================================================================== 2.What does object_id mean? When I unpack IVCharacteristics,I can see the "type" and "name" of the calculation result. For example, if I want to read the Current density of Gate -1 Volt, Drain -0.05 Volt, I use the following command:
Code
file_data = nlread("file.hdf5",CurrentDensity,object_id="Gate -1 Volt, Drain -0.05 Volt")[-1]
It will display "IndexError: list index out of range" as shown in Attachment 2 =============================================================================================================== 3.Is there no way to extract the effective potential and current density calculated using IVCharacteristics addAnalysis method? The effective potential and current density I mentioned in this article are calculated using the IVCharacteristics addAnalysis method, as shown in the attached figure. ====================================================================================================================== Thanks again for your reply!
« Last Edit: January 16, 2025, 08:23 by dmicje12 »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5609
  • Country: dk
  • Reputation: 107
    • View Profile
    • QuantumATK at Synopsys
Yes, the IVCharacteristics is a complex thing... Try to just print the full "file_data" to figure out better what's in the file, but also I realized that maybe the file you are looking at isn't actually the relevant one - the individual analysis output from the different biases etc are saved in separate files, isn't it?