61
General Questions and Answers / Re: Error in tutorial - unable to convert unit
« on: July 29, 2021, 12:23 »
The output is bloated with SLURM messages, however the important part is the error message:
So I guess you still have to use volts for the potential v_z, i.e. change line 70 in your script to:
Code
Traceback (most recent call last):
File "potential_plot.py", line 70, in <module>
axarr[1].plot(z.inUnitsOf(Ang), v_z.inUnitsOf(eV))
File "zipdir/NL/CommonConcepts/PhysicalQuantity.py", line 2173, in inUnitsOf
NL.ComputerScienceUtilities.Exceptions.NLValueError: Unable to convert unit value V to an incompatible unit eV.
So I guess you still have to use volts for the potential v_z, i.e. change line 70 in your script to:
Code
axarr[1].plot(z.inUnitsOf(Ang), v_z.inUnitsOf(Volt))