Apologies, a small typo in the script, which was updated recently, caused this. Try again - should be fine now.
When downloading the script again, make sure you don't get a local cached version. The mistake was on line 8, which should have been
configurations = [configurations[j] for j in numpy.argsort(biases)]
And there might still be some mistakes within the script if we divided the previously converged scf run for each voltage into separate .nc files.
I have substituted the first 6 lines in the script with
# Define input and output NetCDF files here
scf_filename = "CMS-Ag-p_scf_%g.nc.nc"
analysis_filename = "CMS-Ag-p_analysis.nc"
biases = [0, 0.1, 0.2, 0.3]
# Read configurations from NetCDF files
configurations = []
for bias in biases:
configurations.append(nlread(scf_filename % bias, DeviceConfiguration)[0])
And the program still returns error message when the running nearly ends.
Traceback (most recent call last):
File "iv-voltage_drop.py", line 48, in <module>
geometry = nlread(scf_filename, DeviceConfiguration, read_state = False)[0]
File "./zipdir/NL/IO/NLSaveUtilities.py", line 244, in nlread
NL.ComputerScienceUtilities.Exceptions.NLValueError: The filename, CMS-Ag-p_scf_%g.nc, was not found - please check correct path and name.
The error might comes from the fact that the nlread command has not been incorporated into the loop over %g... so it seems not sufficient to only subsitute the first six lines...then how should we modify the script...
Yes, I see. You should also modify line 45 in the original script to be
geometry = nlread(scf_filename % 0, DeviceConfiguration, read_state = False)[0]
(Do you mean to have .nc.nc in the scf_filename?)