Author Topic: AdaptiveGrid error  (Read 2966 times)

0 Members and 1 Guest are viewing this topic.

Offline asanchez

  • Heavy QuantumATK user
  • ***
  • Posts: 42
  • Country: ie
  • Reputation: 1
    • View Profile
AdaptiveGrid error
« on: February 2, 2016, 19:45 »
Hi all, I'm trying to compute the TransmissionSpectrum of a BulkConfiguration with the following script:
Code
bulk_configuration = nlread('scc.nc', BulkConfiguration)[-1]


# Adaptive grid

adaptive_grid = AdaptiveGrid(
        kA_range = [-0.5, 0.5],
        kB_range = [-0.5, 0.5],
        tolerance=1e-2,
        error_measure=Absolute,
        number_of_initial_levels=2,
        maximum_number_of_levels=7)

# -------------------------------------------------------------
# Transmission Spectrum
# -------------------------------------------------------------
transmission_spectrum = TransmissionSpectrum(
    configuration=bulk_configuration,
    energies=numpy.linspace(-0.05,0.05,7)*eV,
    kpoints=adaptive_grid,
    energy_zero_parameter=AverageFermiLevel,
    infinitesimal=1e-06*eV,
    self_energy_calculator=RecursionSelfEnergy(),
    )
But get the following error:
Code
Traceback (most recent call last):
  File "tran.py", line 23, in <module>
    self_energy_calculator=RecursionSelfEnergy(),
  File "./zipdir/NL/Analysis/TransmissionSpectrum.py", line 202, in __init__
  File "./zipdir/NL/ComputerScienceUtilities/Timer.py", line 45, in __call__
  File "./zipdir/NL/Analysis/TransmissionSpectrum.py", line 202, in <lambda>
  File "./zipdir/NL/Analysis/TransmissionSpectrum.py", line 1680, in calculateBulkTransmissionSpectrum
  File "./zipdir/NL/ComputerScienceUtilities/Functions.py", line 148, in numpyToStdVectorCartesian3D
AttributeError: AdaptiveGrid instance has no attribute 'shape'
What am I doing wrong? I did notice that the manual entry for AdaptiveGrid only references DeviceConfiguration objects (on the usage examples anyway) -- Does this only work for DeviceConfiguration? Thanks in advance

Offline Jess Wellendorff

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 933
  • Country: dk
  • Reputation: 29
    • View Profile
Re: AdaptiveGrid error
« Reply #1 on: February 3, 2016, 10:30 »
Yes, AdaptiveGrid is currently not supported for a BulkConfiguration, only for a DeviceConfiguration. We will consider adding this for ATK 2016.