Author Topic: Generating the log file from the command line  (Read 5054 times)

0 Members and 1 Guest are viewing this topic.

Offline Mohammed

  • Heavy QuantumATK user
  • ***
  • Posts: 27
  • Country: eg
  • Reputation: 0
    • View Profile
Generating the log file from the command line
« on: July 4, 2018, 11:03 »
I am running my .py script from the command line while using a SLURM. So basically my command is:

srun -p quantis -c 16 --mem=60G -t 10-1 -o transmissionA2.log mpiexec.hydra -n 16 atkpython NEW_Device_Sub_Ox_A2mono.py &

the transmissionA2.log defined above gives me the terminal output, but I was looking for log file that is usually generated when I run a .py from the job manager on the GUI . My script is as follows (I am using an already generated device .nc file and running a transmission spectrum block on it)

# -*- coding: utf-8 -*-
# -------------------------------------------------------------
# Analysis from File
# -------------------------------------------------------------
path = u'/mnt/share/gfsVolume/mohammed/Atomistics/Device SubOx_A2mono.nc'
configuration = nlread(path, object_id='gID000')[0]

# -------------------------------------------------------------
# Transmission Spectrum
# -------------------------------------------------------------
kpoint_grid = MonkhorstPackGrid(
    na=15,
    nb=15,
    )

transmission_spectrum = TransmissionSpectrum(
    configuration=configuration,
    energies=numpy.linspace(-5,5,401)*eV,
    kpoints=kpoint_grid,
    energy_zero_parameter=AverageFermiLevel,
    infinitesimal=1e-06*eV,
    self_energy_calculator=RecursionSelfEnergy(),
    )
nlsave('/mnt/share/gfsVolume/mohammed/Atomistics/NEW_Device_Sub_Ox_A2mono.hdf5', transmission_spectrum)
nlprint(transmission_spectrum)

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
Re: Generating the log file from the command line
« Reply #1 on: July 6, 2018, 08:54 »
The log file is automatically generated by the Job Manager, so you have to use the Job Manager for that. Otherwise, you have to manually specify the log-filename when running atkpython through the command line, as you did. 

Offline Mohammed

  • Heavy QuantumATK user
  • ***
  • Posts: 27
  • Country: eg
  • Reputation: 0
    • View Profile
Re: Generating the log file from the command line
« Reply #2 on: July 9, 2018, 11:44 »
The reason for my question was because during the simulation nothing was being printed on screen to track the progress. The "calculating transmission" line only appeared after it had finished. But in any case the simulation was completed and I viewed the log file (or results), and this brings me to a more important question If I may ask. (Apologies if I am of topic from when I started the post)

As you can see from the code in my first post I specify that my energy zero parameter should be the AverageFermiLevel, yet by looking at the results I am getting an absolute value !! Any explanation  why ? For simplicity I only show the first part of the transmission file.

+------------------------------------------------------------------------------+
|                                                                              |
| Transmission Spectrum Analysis                                               |
|                                                                              |
+------------------------------------------------------------------------------+

                            |--------------------------------------------------|
Calculating Transmission   : ==================================================

+----------------------------------------------------------+
| Transmission Spectrum Report                             |
| -------------------------------------------------------- |
| Left electrode Fermi level  = -4.296750e+00 eV           |
| Right electrode Fermi level = -4.296750e+00 eV           |
| Energy zero                 = -4.296750e+00 eV           |
+----------------------------------------------------------+
   energy       T(up)
     eV
 -5.000000e+00   3.191915e-01
 -4.975000e+00   1.090114e-01
 -4.950000e+00   7.421144e-02
 -4.925000e+00   3.715330e-02
 -4.900000e+00   3.610812e-02
 -4.875000e+00   2.874695e-02
 -4.850000e+00   9.024125e-03
 -4.825000e+00   3.491315e-03
 
 .
 .
 .
 .
 .
 .
 .

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
Re: Generating the log file from the command line
« Reply #3 on: July 9, 2018, 15:55 »
If you set the energy zero parameter to AverageFermiLevel = (Left electrode Fermi level + Right electrode Fermi level)/2 = -4.296750e+00 eV, it just means that you plot the transmission spectrum T(E*+AverageFermiLevel) vs. E*, where E*=E-AverageFermiLevel, instead of plotting T(E) vs. E, where the energy E (as well as the electrode Fermi energies) is defined with respect to some zero reference energy internally set by QuantumATK.

So, it means that the zero energy E*=0 occurs at E=AverageFermiLevel, and T=T(AverageFermiLevel) at E*=0. This is why you see that "Energy zero = -4.296750e+00 eV" that is exactly "(Left electrode Fermi level + Right electrode Fermi level)/2 = -4.296750e+00 eV"), as given in the log file.

Offline Mohammed

  • Heavy QuantumATK user
  • ***
  • Posts: 27
  • Country: eg
  • Reputation: 0
    • View Profile
Re: Generating the log file from the command line
« Reply #4 on: July 9, 2018, 17:24 »
Thank you for this explanation. But following from there, if I want to use this spectrum to compute the I-V characteristics between an applied bias of  +2V to -2V, then this T(E) is not sufficient. Well at least for the negative bias because -4.296750-2 = 6.29750 eV. I have to increase my energy window in the transmission analysis ? As I only run it between -5eV and 5 eV.

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
Re: Generating the log file from the command line
« Reply #5 on: July 10, 2018, 09:05 »
You have to calculate the Transmission Spectrum for different bias voltages, so that T=T(E,V_bias), and then calculated the current, using this bias-dependent transmission.  You should increase the energy range where the transmission is computed indeed - this can be done in the settings in the Transmission spectrum analysis object or through python scripting, see https://docs.quantumwise.com/v2017/manuals/Types/TransmissionSpectrum/TransmissionSpectrum.html.
Another option is to use IVCurve analysis object, https://docs.quantumwise.com/v2017/manuals/Types/IVCurve/IVCurve.html.

 In the QuantumATK O-2018.06, there is a study object to do IVCharacteristics, see the tutorial at https://docs.quantumwise.com/tutorials/ivcharacteristics/ivcharacteristics.html.

Offline Mohammed

  • Heavy QuantumATK user
  • ***
  • Posts: 27
  • Country: eg
  • Reputation: 0
    • View Profile
Re: Generating the log file from the command line
« Reply #6 on: July 10, 2018, 10:56 »
Thank you Petr. Greatly appreciate you help  :)