Author Topic: Getting text values for projected Hartree potential  (Read 3082 times)

0 Members and 1 Guest are viewing this topic.

Offline Arya

  • Heavy QuantumATK user
  • ***
  • Posts: 31
  • Country: us
  • Reputation: 1
    • View Profile
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

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: Getting text values for projected Hartree potential
« Reply #1 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

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Getting text values for projected Hartree potential
« Reply #2 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.