[Pw_forum] efg.x input: a tiny bug?

Josef Zwanziger jzwanzig at dal.ca
Tue Nov 21 03:33:49 CET 2006


Dear Colleagues,

On exploring efg.x in detail, both with my own examples and example24,
I've found the following issue. INPUT_EFG requests the quadrupole moment
for each nucleus be entered in units of 10E-30 C/m^2, while the program
output repeats the input listed as units of 10E-30 m^2. The second case
makes more sense as quadrupole moments are typically given as areas;
however, for the example, oxygen-17 is input as 2.55, while the
quadrupole moment of oxygen-17 is 2.55 barns = 2.55E-28 m^2, not
2.55E-30 m^2. Nevertheless, the resulting output of about 6 MHz is about
right for Cq for SiO2. In efg.x, Cq is computed from the efg principal
element v(1), I presume in atomic units, as 

Cq = v(1)*Q*rytoev*2*ANGSTROM_AU**2*ELECTRONVOLT_SI*1E18/6.6262.

EFG's look like energy/(charge * length^2), so in Cq = eq*eQ/h, the eq
part will be, in SI units,

v(1) * (Joule/Hartree)*(1/electron charge in C)*(Bohr/0.529E-10 m)**2

Here the first two factors together equal rytoev*2, and the length
factor is the same as ANGSTROM_AU**2 * 1E20.

The eQ part of the calculation should be 

Q * (electron charge in C) = Q*ELECTRONVOLT_SI * 1E-28, presuming we
input Q directly in Barns, as the input of example24 seems to do.

Then on multiplying these factors and dividing by h, I get

v(1)*(rytoev*2)*(ANGSTROM_AU**2)*Q*ELECTRONVOLT_SI*(1E20*1E-28)/6.6262E-34,

and if I throw in 1E-6 to convert from Hz to MHz, the last line becomes

v(1)*(rytoev*2)*(ANGSTROM_AU**2)*Q*ELECTRONVOLT_SI*1E20/6.6262,

the same as the code except 1E18 -> 1E20. 

Now, the code as written is right if I input Q in units of 10E-30 m^2,
as it appears to want, but then I would have to enter Q as 255 in
example 24, not 2.55, and the computed Cq will be 600 MHz, not 6 MHz as
it should be. On the other hand, if I alter the code to change the
factor from 1E18 to 1E20 (as it seems like it should be), and enter Q in
the right units of 2.55 (E-28 m^2), then of course the output will still
be 600 MHz, not 6. Anyone tell me what I'm doing wrong? Sorry for the
long post but this is a simple thing that doesn't seem as simple as it
should be.

Thanks,
Joe



-- 
Josef W. Zwanziger
Prof. of Chemistry and Canada Research Chair in NMR Studies of Materials
Director, Atlantic Region Magnetic Resonance Centre
Dept. of Chemistry
Dalhousie University
Halifax, NS B3H 4J3 Canada

tel: 902.494.1960
fax: 902.494.1867
email: jzwanzig at dal.ca
web: http://jwz.chem.dal.ca



More information about the users mailing list