91
Scripts, Tutorials and Applications / Re: An Error for calculating the current of LiH2 chain
« on: March 28, 2010, 11:31 »
Probably your problem can be solved by changing the script as follows:
before)
transmission_spectrum = nlread("LiH2.nc",Transmission Spectrum)
after)
transmission_spectrum = nlread("LiH2.nc",TransmissionSpectrum)[0]
Please note that an index starts from not "1" but "0" in Python.
I guess there is only one Transmission data in your "LiH2.nc" and that's why you got the error message "IndexError: list index out of range" in the first calculation.
before)
transmission_spectrum = nlread("LiH2.nc",Transmission Spectrum)
after)
transmission_spectrum = nlread("LiH2.nc",TransmissionSpectrum)[0]
Please note that an index starts from not "1" but "0" in Python.
I guess there is only one Transmission data in your "LiH2.nc" and that's why you got the error message "IndexError: list index out of range" in the first calculation.