Author Topic: select a particular cut-plane of electrostaticdifference  (Read 3085 times)

0 Members and 1 Guest are viewing this topic.

Offline Wanzhi Qiu

  • Regular QuantumATK user
  • **
  • Posts: 11
  • Country: au
  • Reputation: 0
    • View Profile
Hi, I would like to find the difference in electrostaticdifference (EDP) of two systems corresponding to different cut-planes. In particular, for system A I need EDP at cut-plane x=x1 (edpA_x1), and for system B at cut-plane x=x2 (edpB_x2)., so I can compute edpA_x1 - edpB_x2..
However,  the following script only computes the difference of the whole systems and so doesn't work for me:

edpA = nlread("systemA.nc", ElectrostaticDifferencePotential)[0] 
edpB = nlread("systemB.nc", ElectrostaticDifferencePotential)[0] 
nlsave("diff.nc", edpA-edpB) 

Any idea on selecting a particular cut-plane?

Also, when I export the EDP data into a CUBE file, the values contained in the file are much smaller as compared with what observed in VNL viewer. This is confusing.. Please advise. Many thanks.




Offline kstokbro

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 392
  • Reputation: 13
    • View Profile
    • QuantumWise
Re: select a particular cut-plane of electrostaticdifference
« Reply #1 on: December 10, 2013, 15:10 »
For the exporting to the cube file, there might be a difference in the units.

To subtract values at different cutplanes, there are several options:
checkout http://www.quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/ref.electrostaticdifferencepotential.html

forinstance
vA = edpA.toArray()
vB = edpB.toArray()
vDiff = vA[x1_index,:,:] -vB[x2_index,:,:]

print vDiff
It requires that  you know the index of each plane. You can find the index using
dX, dY, dZ = edpA.volumeElement()
dx = dX.norm()
x1_index = x1/dx




Offline Wanzhi Qiu

  • Regular QuantumATK user
  • **
  • Posts: 11
  • Country: au
  • Reputation: 0
    • View Profile
Re: select a particular cut-plane of electrostaticdifference
« Reply #2 on: December 11, 2013, 00:51 »
This helps a lot, thanks. One thing is that I have problem in viewing the vDiff.
Is there anyway to show vDiff in VNL, for example, by saving it into a .nc file then use VNL's Results Viewer to visualize and plot it? I tried nlsave("diff.nc", vDiff) but it didn't work..

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: select a particular cut-plane of electrostaticdifference
« Reply #3 on: December 16, 2013, 16:03 »
Your best option is probably to plot the contour plane directly in the script, using matplotlib.