Author Topic: How to export the spectral current from InelasticTransmission spectrum  (Read 133 times)

0 Members and 1 Guest are viewing this topic.

Offline weixiang

  • Heavy ATK user
  • ***
  • Posts: 52
  • Country: us
  • Reputation: 0
    • View Profile
Hi,
Is there a way to calculate the spectral current from the InelasticTransmission spectrum object? e.g. just like the regular method used in normal transmission spectrum TransmissionSpectrum.spectralCurrent()?
I checked the manual, but there is no such method or any related method for InelasticTransmission class.
In the VNL, from the Inelastic Transmission Spectrum Analyzer I can see the spectral current, but I don't know how to export the data.

Thank you in advance for any help!

Offline Daniele Stradi

  • QuantumWise Staff
  • Supreme ATK Wizard
  • *****
  • Posts: 270
  • Country: dk
  • Reputation: 3
    • View Profile
Hi,

the method implemented in the InelasticTransmissionSpectrum tool does not allow for the calculation of the spectral current in the same way as done in the TransmissionSpectrum tool. Probably what you need is to use the inelasticCurrent query function, see https://docs.quantumwise.com/manual/Types/InelasticTransmissionSpectrum/InelasticTransmissionSpectrum.html

If you can attach a snapshot of the plot that you are interested in, then we could be more precise.

Best regards,
Daniele

Offline weixiang

  • Heavy ATK user
  • ***
  • Posts: 52
  • Country: us
  • Reputation: 0
    • View Profile
Thank for the reply!
What I am interested in is the Spectral current plot type provided in the Inelastic Transmission Spectrum Analyzer. (see attached image)
I can see the spectral current but cannot export the data for further processing.

Offline weixiang

  • Heavy ATK user
  • ***
  • Posts: 52
  • Country: us
  • Reputation: 0
    • View Profile
Anyone has any thought about my question?

Offline Anders Blom

  • QuantumWise Staff
  • Supreme ATK Wizard
  • *****
  • Posts: 4966
  • Country: dk
  • Reputation: 78
    • View Profile
    • QuantumWise
We actually provide the source code for most plugins, so you can find how the spectral current is computed by inspecting the Python code of the Inelastic Transmission Spectrum Analyzer in lib/site-packages/AddOns.
You will then find this:

Code: python [Select]

def plotSpectralCurrent(self):
        """
        Plot spectral current vs. energy.
        """
        # Get the inelastic transmission spectrum object.
        its = self._model['inelastic_transmission_spectrum']

        # Get data from model.
        bias_point     = self._model['bias_point'] * Volt
        fermi_shift    = self._model['fermi_shift'] * eV
        temperature    = self._model['temperature'] * Kelvin
        phonon_modes   = self._phononModes()
        kpoints        = self._kPoints()
        qpoints        = self._qPoints()
        spin           = self._model['spin']

        # Calculate spectral current
        i, i_s, energies = its.inelasticCurrentIntegral(bias=bias_point,
                                                        modes=phonon_modes,
                                                        temperature=temperature,
                                                        fermi_shift=fermi_shift,
                                                        k_indices=kpoints,
                                                        q_indices=qpoints,
                                                        spin=spin)
        i_s = i_s.inUnitsOf(Ampere/eV)[0, :]

        self.figure().clear()
        self._axes1 = self.figure().add_subplot(111)
        self._plot1 = self._axes1.plot(energies.inUnitsOf(eV), i_s, 'k-')

        self._axes1.set_xlabel('Energy (eV)')
        self._axes1.set_ylabel('Spectral current (A/eV)')

        self.draw()


You should be able to use this in a script to get what you need. Also see https://docs.quantumatk.com/manual/Types/InelasticTransmissionSpectrum/InelasticTransmissionSpectrum.html, although it's not so clear from that page...
« Last Edit: April 19, 2019, 21:08 by Anders Blom »