Hi all,
I'm trying to export electron density to file using the script given in this thread. I need to extract electron densities of lots of .nc files.
If the exportED.py is like this
scf=restoreSelfConsistenCalculation('/home/master/atk/1.nc')
electron_density=calculateElectronDensity(scf)
from export3d import *
export3D(electron_density)
And I execute this file as
/home/master/atk/atk /home/master/atk/exportED.py > /home/master/atk/electronDensity1.dat &
then, a file named electrondensity1.dat is successfully created in the directory. The code is excellent. However, I have dozens of .nc files of which the electron densities are to be extracted as:
1.nc -> electronDensity1.dat
2.nc -> electronDensity2.dat
.
.
.
etc. How can I achieve this as a batch mode instead of executing
/home/master/atk/atk /home/master/atk/exportED.py > /home/master/atk/electronDensity1.dat & (when 1.nc is pointed in exportED.py)
/home/master/atk/atk /home/master/atk/exportED.py > /home/master/atk/electronDensity2.dat & (when 2.nc is pointed in exportED.py)
.
.
etc. Any help is greatly appreciated

Cheers,
Serhan