-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_repr_matrix is unable to compute the rep of some rotations #12
Comments
Thank you for your suggestions and the clarification of the function basis. I have quickly implemented them for my d-orbital system and _expr_to_vector seems to execute without any problems, though I have not checked if the resulting reps are correct. In detail, I first replaced the d entry in _orbital_constants.py with 'd': ['sqrt(5/(16*pi))*(3*z**2-1)',
'sqrt(15/(4*pi))* z*x',
'sqrt(15/(4*pi))* z*y',
'sqrt(15/(16*pi))* (x**2 - y**2)',
'sqrt(15/(16*pi))* 2 * x*y'
], I also replaced theta = np.random.sample() * np.pi
phi = np.random.sample() * np.pi * 2.0
X = np.sin(theta) * np.cos(phi)
Y = np.sin(theta) * np.sin(phi)
Z = np.cos(theta)
vals = [(VEC[0], X), (VEC[1], Y), (VEC[2], Z)] It seems that only the numeric part of _expr_to_vector is used, so I did not do any alteration to the sympy part. Yes, I suggested to compute the orbital reps using quantum numbers, though that would be a bit unpractical, since the entire code is currently based on the function basis. Also since Wannier90 is also based on this basis, one should also always first transform into the quantum number basis before applying the rotation operator. Now I think it would be best to stay in the function basis. |
It seems like get_repr_matrix can not compute the orbital-representation of some rotations, like for example the 3-fold rotation {{0,0,1},{1,0,0},{0,1,0}} of d-orbtials. I think the problem can be traced back to _expr_to_vector, where this function tries to in this example represent x^2 ( the z^2 orbital after the 3-fold rotation) as a linear combination of z^2, xz, yz, x^2 - y^2, xy, which is not possible. Although it should obviously be possible to represent the 3-fold rotation in the d-orbital basis.
One could instead implement the orbital representation using a rotation operator https://en.wikipedia.org/wiki/Rotation_operator_(quantum_mechanics).
The text was updated successfully, but these errors were encountered: