Giter Site home page Giter Site logo

Comments (8)

sunqm avatar sunqm commented on September 28, 2024

from libcint.

mdewergi avatar mdewergi commented on September 28, 2024

Thank you for your answer but this is not a problem of ordering because I have already taken care to convert libcint orbital ordering to stda one. This is also why overlap, dipole moment in both length and velocity representations are computed correctly and that I am able to compute oscillator strengths and polarizabilities also correctly.

Here, if I take the first example for the x component. The matrix should be :
[[ 0. , 0. , 0. , 0. , -0. , 0. ],
[ 0. , 0. , 1. , 0. , 0. , 0. ],
[ 0. , -1. , 0. , 0. , 0. , 0. ],
[ 0. , 0. , 0. , 0. , 1.155, 0. ],
[-0. , 0. , 0. , -1.155, 0. , -1.155],
[ 0. , 0. , 0. , 0. , 1.155, 0. ]]
where both sign are reversed with respect to what you obtained.
This is what our integral subroutine are giving.

from libcint.

sunqm avatar sunqm commented on September 28, 2024

from libcint.

mdewergi avatar mdewergi commented on September 28, 2024

Thanks a lot for helping me with this! I have checked this and this is not at the level of the vector product that the difference occurs.
The difference is already there when computing i<k|rp|n>.
Still with the same example for the x component, with libcint, y_pz is

0.000 | 0.000 | 0.000 | 0.000 | 0.167 | 0.000
0.000 | 0.000 | 0.167 | 0.000 | 0.000 | 0.000
0.000 | -0.167 | 0.000 | 0.000 | 0.000 | 0.000
0.000 | 0.000 | 0.000 | 0.000 | 0.500 | 0.000
-0.167 | 0.000 | 0.000 | -0.500 | 0.000 | 0.167
0.000 | 0.000 | 0.000 | 0.000 | -0.167 | 0.000

and for z_py

0.000 | 0.000 | 0.000 | 0.000 | 0.167 | 0.000
0.000 | 0.000 | -0.167 | 0.000 | 0.000 | 0.000
0.000 | 0.167 | 0.000 | 0.000 | 0.000 | 0.000
0.000 | 0.000 | 0.000 | 0.000 | -0.167 | 0.000
-0.167 | 0.000 | 0.000 | 0.167 | 0.000 | 0.5
0.000 | 0.000 | 0.000 | 0.000 | -0.5 | 0.000

But with stda subroutines, elements in bold have the sign reversed.

from libcint.

sunqm avatar sunqm commented on September 28, 2024

from libcint.

mdewergi avatar mdewergi commented on September 28, 2024

Unfortunately, I cannot compute <\nabla i|j> with our more than 20 years old stda integral deck (already used before stda), at least in a straightforward manner. I am just comparing results between both integral decks not mixing them. My motivation for this is because when I use only libcint only, optical rotations and rotary strengths are wrong. Meaning that e.g. CH4 has a non-zero optical rotation value. The interfacing is pretty simple in a way since I only need to feed data to the library and extract integrals with values in the right order. Then it transforms them to the MO basis to uses it. Since it is working well for the overlap and the dipole moments (for real systems, with r and nabla operators, both length and velocity representations), there is no reason it should not work for the magnetic moment.

Here, the difference is that the magnetic moment is skew-symmetric and not symmetric. But this should not be affected by the interfacing. Yesterday, I did a lot of testing and printing, again. In the int1e_irp subroutine, the sign is actually given by the nabla part, g1 computed by G1E_D_J.

I thought a bit about this and in fact, to be sure we are right, we can reformulate the problem for the first example as this:
With libcint, I obtain this matrix for the x component:
[[ 0. , 0. , 0. , 0. , -0. , 0. ],
[ 0. , 0. , 1. , 0. , 0. , 0. ],
[ 0. , -1. , 0. , 0. , 0. , 0. ],
[ 0. , 0. , 0. , 0. , 1.155, 0. ],
[-0. , 0. , 0. , -1.155, 0. , 1.155],
[ 0. , 0. , 0. , 0. , -1.155, 0. ]]

while with stda, I have
[[ 0. , 0. , 0. , 0. , -0. , 0. ],
[ 0. , 0. , 1. , 0. , 0. , 0. ],
[ 0. , -1. , 0. , 0. , 0. , 0. ],
[ 0. , 0. , 0. , 0. , 1.155, 0. ],
[-0. , 0. , 0. , -1.155, 0. , -1.155],
[ 0. , 0. , 0. , 0. , 1.155, 0. ]]

In other words, libcint gives

i<dyy|(r-R)Xp|dyz>=-<dzz| |dyz>=<dyz| |dzz>=-<dyz| |dyy>

while stda gives

i<dyy|(r-R)Xp|dyz>=<dzz| |dyz>=-<dyz| |dzz>=-<dyz| |dyy>

So, if I look to orbital symmetries, they are all in the same yz plan where going from <dyy| |dyz> to <dzz| |dyz>, dyy has rotated of 90° to result to dzz. For libcint, doing so changes the integral sign while for stda, this is not the case. So the question is which one is right and for what reason the other one gives the reverse sign?

Of course, this is not answering other examples for which some of the values are different.

from libcint.

sunqm avatar sunqm commented on September 28, 2024

from libcint.

mdewergi avatar mdewergi commented on September 28, 2024

Yes you are right i<dzz|rxp|dyz> is positive while i<dyy|rxp|dyz> is negative.
There should be a strange convention in the stda program that I cannot put my hand on...

from libcint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.