QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: GJK on August 4, 2014, 18:28
-
Hi,
Dipole moment calculation as said by the script http://quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/ref.electrondifferencedensity.html gives dipole moment for three axes.
How to calculate the total dipole moment???
-
if you have the dipole moment vector as [dx, dy, dz], than
take the norm as d_total = (d[0]**2 + d[1]**2 + d[2]**2)**0.5
hope that's what you meant.
-
Dear Mr.Carsten
First of all thanks for the reply.But that is not my question actually from the link http://quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/ref.electrondifferencedensity.html
The script calculated the dipoles and multipoles for my system.But the result is shown in three coordinates for center of mass,dipole etc...But actually the script is made as shown below to calculate the overall center of mass and dipole..But the results are displayed in three coordinates.
For example in the option Print monopole,print dipole I am getting three values instead of one which is the actual script.
center_of_mass = Mi*dX + Mj*dY+ Mk*dZ
m0 = density_sum*dV
m1 = (dX*dens_i + dY*dens_j + dZ*dens_k)*dV
print "center of mass (bohr) = ", center_of_mass
print "monopole (e) = ", m0
print "dipole (e*bohr) = ", m1
print "quadropole (e*bohr**2) = "
print m2
-
Yes, the 3 components of the dipole moment VECTOR
-
Ya Dr.Anders,
Question 1:
But the script says we get one value for dipole moment
eg: m1 = (dX*dens_i + dY*dens_j + dZ*dens_k)*dV is labelled as sum of three components which should be calulated and displayed as m1(single number) know???? but instead its displayed as three components.
Question 2:
Mr.Carsten has given me the equation if you have the dipole moment vector as [dx, dy, dz], than
take the norm as d_total = (d[0]**2 + d[1]**2 + d[2]**2)**0.5
What does the number 2 and 0.5 indicate???
-
1. dens_ijk are numbers, but dX dY dZ are not, they are vectors (as clearly indicated by the way they are used to compute the total volume of the cell in the same script, in the manual).
2. Maybe you are actually asking about what ** means it is the Python notation for power, 3**2=9.
-
Dear Dr.Anders,
Question 1:
I am getting my dipole moment result as eg:[3.553,2.689,5.335] but the script is made clearly to give the total of the three numbers(dipole moment for full system know) know???
So I should get a number for m1 at the nlprint rather than three values according to your script.That's my question???
-
The dipole is a vector, what you ask for is the length of the vector which is easily calculated as Sqrt(mx*mx+my*my+mz*mz)
-
Hi,
The link to the script to calculate dipole moment is not working. It takes to the atk manual. Is it possible to share it?
-
Try out this link https://docs.quantumwise.com/manuals/Types/ElectronDifferenceDensity/ElectronDifferenceDensity.html.
-
The page containing the script is missing. Could you please send me the total dipole moment script?
-
https://docs.quantumwise.com/manuals/Types/ElectronDensity/ElectronDensity.html#electrondensity-c
-
Thank you.
-
I run this script but gave an error like this:
"TypeError: 'PhysicalQuantity' object is not callable"
How can I solve the error?
-
Which version of ATK are you using? I have been able to run the script (taken from that manual) with no problem, using ATK 2016.4 and 2017.12.
-
I am using ATK 2017.1 and 2017.2. Both of them gave same error. You can download my hdf5 file from this link:
https://www.dropbox.com/s/lkayzhsg9ran4hg/ns33-m.hdf5?dl=0
The script I used was attached as a file.
-
Your script does not look like identical to the one in the manual. Generate the Electron Density and use the script from the manual. I enclose the script to my post.
-
Thank you. It worked.