QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: Zhongjun Li on January 19, 2013, 07:02
-
Dear everyone,
In order to achieve local density of state of my system, I want to write the configurations, electron density, and LDOS to a vnl file named LDOS-10.VNL, the part script as following:
...................................
two_probe_conf = configurations["aaaa"]
....................................
# Calculate electron density from old NetCDF data
electron_density = calculateElectronDensity(scf)
# Calculate local DOS for non-electrode atoms
ldos = calculateLocalDensityOfStates(
scf,
energy = 0.0*eV,
quantum_number = (0.0,0.0)
)
# Store obtained results in vnl file using different IDs
file=VNLFile("LDOS-10.vnl"
file.addToSample(two_probe_conf, 'LDOS-10') #line 173
file.addToSample(electron_density, 'LDOS-10') #line 174
file.addToSample(ldos, 'LDOS-10') #line 175
the above script can not work, and the errors are as
SError: [Errno 2] No such file or directory: 'LDOS-10.vnl'
Traceback (most recent call last):
File "<string>", line 174, in ?
OSError: [Errno 2] No such file or directory: 'LDOS-10.vnl'
Traceback (most recent call last):
File "GhG9_LDOS_Vb04.py", line 174, in ?
vnl_file.addToSample(electron_density, 'LDOS-10')
OSError: [Errno 2] No such file or directory: 'LDOS-10.vnl'
Traceback (most recent call last):
File "<string>", line 175, in ?
OSError: [Errno 2] No such file or directory: 'LDOS-10.vnl'
These errors may be caused by the writing data in parallel version of ATK.
How can I modify my script to resolve my question. Now I have no enough money to buy higher version of ATK.
Thank you for your attention.
-
It would be easier if you posted the script in full, because it looks odd, with the incomplete line
file=VNLFile("LDOS-10.vnl"
Also the full error message, the first line should be OSError, not SError, maybe something else was cut off too.
Obviously you should check that you have write permissions to the current working directory.
However, you did mention running in parallel, and as I remember the old code was not fully MPI safe, so you should make sure to only save into the VNL file on the master node (using if processIsMaster(), like in http://quantumwise.com/documents/manuals/ATK-2008.10/chap.parallel.html#sect1.parallel.io).
-
Dear Prof. Anders Blom,
Thank you for your reply. I have run scf in parallel by several cpu, and then calculated ldos by one cpu. The website link you gave may help me, I try it later.