QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: qiuweicheng on March 27, 2017, 09:51

Title: Can't open the results of PLOS
Post by: qiuweicheng on March 27, 2017, 09:51
Hi, I caluate PLDOS.py file.

 # -*- coding: utf-8 -*-
# -------------------------------------------------------------
# Analysis from File
# -------------------------------------------------------------
path = u'Device-NiGrCo.nc'
configuration = nlread(path, object_id='gID000')[0]

# -------------------------------------------------------------
# Projected Local Density Of States
# -------------------------------------------------------------
kpoint_grid = MonkhorstPackGrid(
    na=151,
    nb=151,
    )

projected_local_density_of_states = ProjectedLocalDensityOfStates(
    configuration=configuration,
    method=LocalDeviceDensityOfStates,
    energies=numpy.linspace(-2, 2, 101)*eV,
    kpoints=kpoint_grid,
    contributions=All,
    self_energy_calculator=RecursionSelfEnergy(),
    energy_zero_parameter=AverageFermiLevel,
    infinitesimal=1e-06*eV,
    )
nlsave('Device-NiGrCo.nc', projected_local_density_of_states)

The Device-NiGrCo.nc  has existed, which contains the results of trasmissionSpectrum.  After the calculation of PLDOS.py, I can't open the result of PLDOS?
There is a ATKNCImporter Error, as shown below:
Traceback (most recent call last):
  File ".\zipdir\NL\GUI\MainWindow\LabFloor\LabFloorModel.py", line 234, in load
  File "D:\Program Files (x86)\QuantumWise\VNL-ATK-2016.4\Lib\site-packages\AddOns\ATKNCImporter\ATKNCImporter.py", line 96, in load
    data = nlread(filename, object_id=object_id, read_state=read_full)[0]
  File ".\zipdir\NL\IO\NLSaveUtilities.py", line 422, in nlread
  File ".\zipdir\NL\ComputerScienceUtilities\Timer.py", line 45, in __call__
  File ".\zipdir\NL\IO\NLSaveUtilities.py", line 422, in <lambda>
  File ".\zipdir\NL\Analysis\TransmissionSpectrum.py", line 1436, in nlreadTransmissionSpectrum
KeyError: 'energy_zero_parameter'
Title: Re: Can't open the results of PLOS
Post by: Petr Khomyakov on March 27, 2017, 13:38
Could you enclose the original python script(s) where you did the device calculation and transmission spectrum analysis?
Title: Re: Can't open the results of PLOS
Post by: Petr Khomyakov on March 27, 2017, 15:21
In addition to my previous post, if you did the device calculation and transmission spectrum analysis in one version of ATK, e.g., ATK-2015, and then generated PLDOS in a newer version, e.g., ATK-2016, that would have created a problem such as that you have reported.
Title: Re: Can't open the results of PLOS
Post by: qiuweicheng on March 28, 2017, 02:34
Yes, I did the device calculation and transmission spectrum analysis in one version of ATK-2012, and then generated PLDOS in a newer version  ATK-2016.  Is there any way to open the results of PLOS
Title: Re: Can't open the results of PLOS
Post by: Anders Blom on March 28, 2017, 07:58
The key is to save the results in separate files, never mix versions in the same NC file.
Title: Re: Can't open the results of PLOS
Post by: Petr Khomyakov on March 28, 2017, 09:22
You have to redo all the calculations in ATK-2016 to be able to view the PLDOS.