The last few days I have been refactoring script molden2qmc.py, trying to understand the algorithm of conversion.

Normalization algorithm of MO-coefficients, and Cartesian->Spherical transformation remains unclear to me.

Because the script is written in python, I did not break the tradition, therefore I also used python.

The current version of the script, is in the repo https://github.com/Konjkov/molden2qmc

Could you explain how the conversion coefficient were calculated for the d and f orbitals.

I use them in the next functions :

- Code: Select all
`def d_normalize(self, coefficient):`

"""

The following order of D functions is expected:

5D: D 0, D+1, D-1, D+2, D-2

"""

return (coefficient[0] / sqrt(3),

coefficient[1] * 2.0,

coefficient[2] * 2.0,

coefficient[3],

coefficient[4] * 2.0)

def f_normalize(self, coefficient):

"""

The following order of F functions is expected:

7F: F 0, F+1, F-1, F+2, F-2, F+3, F-3

"""

return (coefficient[0] * sqrt(8.0/15.0),

coefficient[1] * 2.0 / sqrt(45),

coefficient[2] * 2.0 / sqrt(45),

coefficient[3] * sqrt(2) / 15.0,

coefficient[4] * sqrt(2) / 15.0,

coefficient[5] / sqrt(3) / 15.0,

coefficient[6] / sqrt(3) / 15.0)

In the initial code, they look like this:

- Code: Select all
`d5_vectors.append(d5_vectors2[0] * one_over_rt_three)`

d5_vectors.append(d5_vectors2[1] * 2.)

d5_vectors.append(d5_vectors2[2] * 2.).

d5_vectors.append(d5_vectors2[3] ).

d5_vectors.append(d5_vectors2[4] * 2.)

harm_f_1 = (8./15.0)**0.5

harm_f_2 = 2.0 * (1/(5**0.5))/3.0

harm_f_3 = rt2 / 15.0

harm_f_4 = (2.0**1.5) / 30.0

harm_f_5 = one_over_rt_three/15.0

So also could you tell how to calculate the similar coefficients for the normalization of g- orbitals.

My second question is about the transformation of Cartesian-> Spherical.

I found an article in wiki http://en.wikipedia.org/wiki/Table_of_s ... _harmonics

but I did not notice the correspondence in coefficients in the article and in the script.

It seemed to me that in the conversion of d-orbitals omitted (1/4)sqrt(15/pi) multiplier.

However, I failed to find a pattern in the following block of code:

- Code: Select all
`f7_vectors.append(zero * 0.331990278)`

f7_vectors.append(plus_1 * 0.059894236)

f7_vectors.append(minus_1* 0.064894235)

f7_vectors.append(plus_2* 0.059227155)

f7_vectors.append(minus_2* 0.050227159)

f7_vectors.append(plus_3 * 0.010915709)

f7_vectors.append(minus_3* 0.010915709)

Is there any analytical expression for this coefficient ?

I would also like to know the considerations about convertation of cartesian representation of g-orbital to spherical.

Best regard, Vladimir.