QuantumATK W-2024.09 version released on Sep 9, 2024
0 Members and 1 Guest are viewing this topic.
config = nlread("file.nc",DeviceConfiguration)[0] density = ElectronDensity(config) z_axis_length = density.unitCell()[2][2].inUnitsOf(Angstrom) Nz = density.shape()[2] # Loop over all the data and calculate the average in the xy-plane print "Pos (Ang)\tAveraged electron density (%s)" % density.unit() for i in range(Nz): print i*z_axis_length/float(Nz),"\t",numpy.average(density[:,:,i])