QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: Arya on March 6, 2014, 01:41

Title: Getting text values for projected Hartree potential
Post by: Arya on March 6, 2014, 01:41
Hi,

Once a self consistent calculation is completed, we can project it on x,y,z dimensions. Now can I get the text representation of this projected plot in form of 1D array.

Thanks,
-Arya
Title: Re: Getting text values for projected Hartree potential
Post by: zh on March 6, 2014, 07:02
You can get the planar-average values of Hartree potential along the z axis by following the example in the manual:
http://quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/ref.electrostaticdifferencepotential.html
Quote
# Import an ElectrostaticDifferencePotential object
potential = nlread('results.nc', ElectrostaticDifferencePotential)[0]

# Calculate the mean
v_z = numpy.apply_over_axes(numpy.mean,potential[:,:,:],[0,1]).flatten()
v_z *= potential[:,:,:].unit()

# Print out the result
dX, dY, dZ = potential.volumeElement()
dz = dZ.norm()

shape = potential.shape()
for i in range(shape[2]):
    print dz*i, v_z
Title: Re: Getting text values for projected Hartree potential
Post by: Anders Blom on March 7, 2014, 18:12
You can also use the 1D Projection tool in VNL 13.8 for a very easy way to create cuts along lines or averages over planes, and plot the results. However it actually doesn't give you possibility to export the data, we'll add that soon.