Author Topic: error in transmission spectra run at a specific vibrational modes  (Read 2906 times)

0 Members and 1 Guest are viewing this topic.

Offline Sabyasachi Sen

  • Heavy QuantumATK user
  • ***
  • Posts: 52
  • Country: in
  • Reputation: 0
    • View Profile
I attach herewith the input and output of a transmission spectra run at a specific vibrational modes. But it did not run, kindly opine how to correct the input file.

with regards,

Sabyasachi Sen

Offline zh

  • QuantumATK Support
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: error in transmission spectra run at a specific vibrational modes
« Reply #1 on: February 17, 2017, 01:46 »
This may be caused by the different length of data in the "pl.plot()".

Please add the following line before "for i in modes:" to check the dimension of "SymP_LOE", "SymN_LOE", and so on:
print SymP_LOE.shape()

According to the manual:
http://docs.quantumwise.com/manuals/Types/InelasticTransmissionSpectrum/InelasticTransmissionSpectrum.html#NL.Analysis.InelasticTransmissionSpectrum.InelasticTransmissionSpectrum.inelasticTransmissionAsymmetricNegativeBias

The shape of "SymP_LOE" should be (number_of_energies, number_of_kpoints, number_of_qpoints, number_of_spins) for mode = integer.
pl.plot(E,SymP_LOE[i,:,0,0],'-',label='mode %d, + (LOE)' %i)
So if you change it to following line, it may work:
pl.plot(E,SymP_LOE[i,:,0,0,0],'-',label='mode %d, + (LOE)' %i)

The same changes are applied to other three lines:
pl.plot(E,AsymP_LOE[i,:,0,0,0],'-',label='mode %d, + (LOE)' %i)
pl.plot(E,SymP_XLOE[i,:,0,0,0],'-',label='mode %d, + (XLOE)' %i)
pl.plot(E,AsymP_XLOE[i,:,0,0,0],'-',label='mode %d, + (XLOE)' %i)

Please try it.



Offline Sabyasachi Sen

  • Heavy QuantumATK user
  • ***
  • Posts: 52
  • Country: in
  • Reputation: 0
    • View Profile
Re: error in transmission spectra run at a specific vibrational modes
« Reply #2 on: February 18, 2017, 07:58 »
I have tried but again it failed. I reattach the input and screen shot taken showing the error.

Sabyasachi Sen

Offline zh

  • QuantumATK Support
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: error in transmission spectra run at a specific vibrational modes
« Reply #3 on: February 18, 2017, 10:48 »
I have tried but again it failed. I reattach the input and screen shot taken showing the error.

Sabyasachi Sen

The errors in this time aren't related to atkpython.  First, you should ensure that you use atkpython (not the other python installed by yourself or provided by your computer system) to run the script file.  Second, make a proper setup for the python path.

The error indicates that you have used the matplotlib package from your own installment (./build/.....).

Offline Sabyasachi Sen

  • Heavy QuantumATK user
  • ***
  • Posts: 52
  • Country: in
  • Reputation: 0
    • View Profile
Re: error in transmission spectra run at a specific vibrational modes
« Reply #4 on: February 18, 2017, 12:13 »
In my machine VNL2015.1 is installed, shall I have to install ATKpyton separately. I have only given a run to the programme using the comman, atkpython  filename.py > filename.out


Offline zh

  • QuantumATK Support
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: error in transmission spectra run at a specific vibrational modes
« Reply #5 on: February 19, 2017, 08:02 »
Thanks for your information.

Now I roughly know what cause the error.   It is no necessary to install atkpython separately, since you can run atkpython command. 
The error you met was because you may run the atkpython on the remote computer server and try to launch the X-windows (due to calling the matplotlib).

1) add the following lines into your script file at the beginning lines:
import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')

or  2) when you login into your remove computer sever, add the "-X" into the ssh command, that is,  ssh  -X  hostname_your_computer_sever

or 3) install Xming (https://sourceforge.net/projects/xming/) on your local computer with Windows system.

Please refer to the following websites:
http://stackoverflow.com/questions/19309085/no-display-name-and-no-display-environment-variable-using-tkinter-through-ssh
http://stackoverflow.com/questions/2801882/generating-a-png-with-matplotlib-when-display-is-undefined